diff options
-rw-r--r-- | src/map.cpp | 4 | ||||
-rw-r--r-- | src/net/ea/beinghandler.cpp | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/map.cpp b/src/map.cpp index 3da94ea8..7ee18450 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -539,9 +539,7 @@ bool Map::occupied(int x, int y) const { const Being *being = *i; - // Eathena: The Job 45 is a portal, so they don't collide. - if (being->getTileX() == x && being->getTileY() == y - && being->getJob() != 45) + if (being->getTileX() == x && being->getTileY() == y) return true; } diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 714150f7..6dcf9631 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -81,6 +81,8 @@ Being *createBeing(int id, short job) type = Being::NPC; else if (job > 1000 && job <= 2000) type = Being::MONSTER; + else if (job == 45) + return NULL; // Skip portals Being *being = beingManager->createBeing(id, type, job); @@ -138,6 +140,9 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) } dstBeing = createBeing(id, job); + + if (!dstBeing) + break; } if (dstBeing->getType() == Being::PLAYER) @@ -529,6 +534,9 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) if (!dstBeing) { dstBeing = createBeing(id, job); + + if (!dstBeing) + break; } if (dstBeing->getType() == Being::PLAYER) |