diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-21 02:01:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-21 02:01:24 +0300 |
commit | d2e83863e6e5faa6d6eeb3ab0c0a384dac3a0a11 (patch) | |
tree | 154752870ab1ba3118bd981a492c2ca3d049655e /src/net | |
parent | 08331e4e8e06912c278f6c1536db9a922d9d32e0 (diff) | |
download | plus-d2e83863e6e5faa6d6eeb3ab0c0a384dac3a0a11.tar.gz plus-d2e83863e6e5faa6d6eeb3ab0c0a384dac3a0a11.tar.bz2 plus-d2e83863e6e5faa6d6eeb3ab0c0a384dac3a0a11.tar.xz plus-d2e83863e6e5faa6d6eeb3ab0c0a384dac3a0a11.zip |
Fix some issues after automatic code checking.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/beinghandler.cpp | 11 | ||||
-rw-r--r-- | src/net/ea/buysellhandler.cpp | 5 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 91c83a4e9..f59283e23 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -121,10 +121,8 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg, bool visible) Uint16 weapon, shield; Uint16 stunMode; Uint32 statusEffects; - int guild; Being *dstBeing; int hairStyle, hairColor; - int hp, maxHP, oldHP; int spawnId; // Information about a being in range @@ -214,22 +212,21 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg, bool visible) if (dstBeing->getType() == ActorSprite::MONSTER) { - hp = msg.readInt32(); - maxHP = msg.readInt32(); + int hp = msg.readInt32(); + int maxHP = msg.readInt32(); if (hp && maxHP) { - oldHP = dstBeing->getHP(); + int oldHP = dstBeing->getHP(); if (!oldHP || oldHP > hp) dstBeing->setHP(hp); dstBeing->setMaxHP(maxHP); } gloves = 0; - guild = 0; } else { gloves = msg.readInt16(); // head dir - "abused" as gloves - guild = msg.readInt32(); // guild + msg.readInt32(); // guild msg.readInt16(); // guild emblem } // logger->log("being guild: " + toString(guild)); diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp index 35180c10f..2ee586c92 100644 --- a/src/net/ea/buysellhandler.cpp +++ b/src/net/ea/buysellhandler.cpp @@ -47,9 +47,10 @@ namespace Ea { -BuySellHandler::BuySellHandler() +BuySellHandler::BuySellHandler() : + mNpcId(0), + mBuyDialog(0) { - mNpcId = 0; } void BuySellHandler::requestSellList(std::string nick) |