diff options
Diffstat (limited to 'src/game-server/state.cpp')
-rw-r--r-- | src/game-server/state.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp index fa51972c..19c3ea60 100644 --- a/src/game-server/state.cpp +++ b/src/game-server/state.cpp @@ -37,6 +37,7 @@ #include "game-server/mapmanager.hpp" #include "game-server/monster.hpp" #include "game-server/npc.hpp" +#include "game-server/trade.hpp" #include "net/messageout.hpp" #include "utils/logger.h" @@ -499,6 +500,12 @@ void GameState::remove(Thing *ptr) if (ptr->canMove()) { + if (ptr->getType() == OBJECT_CHARACTER) + { + Character *ch = static_cast< Character * >(ptr); + if (Trade *t = ch->getTrading()) t->cancel(ch); + } + MovingObject *obj = static_cast< MovingObject * >(ptr); MessageOut msg(GPMSG_BEING_LEAVE); msg.writeShort(obj->getPublicID()); |