DarkCastleMUD / DarkCastle

Dark Castle is a text-based MUD (multi-user dungeon) that was originally based on DIKU MUD around 1995. It has been running since then.
https://www.dcastle.org/
GNU Lesser General Public License v2.1
12 stars 11 forks source link

[BUG] isnpc($n) #224

Closed TehDreadPirateRoberts closed 10 months ago

TehDreadPirateRoberts commented 11 months ago

Describe the bug When isnpc($n) is used in a mprog, it is responding to a NPC as though it were a PC.

I noticed this because the following error came up: //(world) Obj 21909, com 1, line 8: Mptransfer - No such person. //(world) Obj 21909, com 1, line 10: Mpforce - No such victim.

To Reproduce Steps to reproduce the behavior: I added the follow with opedit to: _Object: slot machine Vnum: 21913.

1>all_greetprog 100 if isnpc($n) say isnpc thinks $n is a NPC else say isnpc thinks $n is a PC endif

When a NPC walks into the room the following then occured: a slot machine says 'isnpc thinks waitress is a PC'

Expected behavior isnpc($n) should recognize that a NPC is a NPC and not a PC....

Additional context I noticed this behaviour on both object progs and mob progs.

jhhudso commented 10 months ago

fixed in latest commit.