/* Insert from line 392 in act.informative.c to "continue;" */ /* hide npcs whose description starts with a '.' from non-holylighted people - Idea from Elaseth of TBA */ /* or use a character string like a trailing ". ". * It can be copied to four other places in this file, originally lines 90, 207, 394, 608 and 736, * and utilized to create "levels" of secrecy, such as one space, two spaces, three spaces, etc. */ /* http://www.java2s.com/Code/C/String/Findingoccurrencesofonestringinanotherstrstr.htm */ char stringSearch[] = ". "; int j = 1; bool secret; for(j = 0 ; i->player.long_descr[j] != '\0' ; j++); for(j = 0 ; stringSearch[j] != '\0' ; j++); if ((strstr(i->player.long_descr, stringSearch)) != NULL) secret = true; /* http://www.java2s.com/Code/C/String/Findingoccurrencesofonestringinanotherstrstr.htm */ if (!IS_NPC(ch) && !PRF_FLAGGED(ch, PRF_HOLYLIGHT) && IS_NPC(i) && i->player.long_descr && ((*i->player.long_descr == '.') || secret)) continue;