RanvierMUD / core

Core engine code for Ranvier
https://ranviermud.com
MIT License
45 stars 41 forks source link

make MobManager#removeMob act on sourceRoom #98

Open Sakeran opened 5 years ago

Sakeran commented 5 years ago

Most of the room-specific logic in MobManager#removeMob should act on the mob's source room (as set by Room#spawnNpc), instead of its current room. Otherwise, the mob is never removed from its source room's spawnedNpcs set, (and possibly the relevant Area's npc set) if it is removed while in any room other than its source.

seanohue commented 4 years ago

Tested this and verified that it is needed. Without this PR, respawn logic gets buggy.

azigler commented 4 years ago

This works great, thanks!