From 482782d74c61e226ed1ce81700708244565291f5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 Jun 2015 23:58:16 +0300 Subject: Add missing checks into net directory. --- src/net/eathena/beinghandler.cpp | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'src/net/eathena/beinghandler.cpp') diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 10161d922..26e78cd84 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -479,6 +479,8 @@ Being *BeingHandler::createBeing2(Net::MessageIn &msg, void BeingHandler::undress(Being *const being) const { + if (!being) + return; being->setSprite(SPRITE_WEAPON, 0); being->setSprite(SPRITE_HEAD_BOTTOM, 0); being->setSprite(SPRITE_CLOTHES_COLOR, 0); @@ -1507,37 +1509,6 @@ void BeingHandler::processBeingSoundEffect(Net::MessageIn &msg) msg.readInt32("source being id"); } -void BeingHandler::applyPlayerAction(Net::MessageIn &msg, - Being *const being, - const uint8_t type) -{ - switch (type) - { - case 0: - being->setAction(BeingAction::STAND, 0); - localPlayer->imitateAction(being, BeingAction::STAND); - break; - - case 1: - if (being->getCurrentAction() != BeingAction::DEAD) - { - being->setAction(BeingAction::DEAD, 0); - being->recalcSpritesOrder(); - } - break; - - case 2: - being->setAction(BeingAction::SIT, 0); - localPlayer->imitateAction(being, BeingAction::SIT); - break; - - default: - // need set stand state? - UNIMPLIMENTEDPACKET; - break; - } -} - void BeingHandler::viewPlayerEquipment(const Being *const being) { if (!being) -- cgit v1.2.3-60-g2f50