diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-30 12:25:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-30 12:25:16 +0300 |
commit | 1680d159ecbf75591d2dab1416ff8144c27d4de5 (patch) | |
tree | cd34ad27487036265f08d7aa63476c160280d899 /src/net/tmwa/beinghandler.cpp | |
parent | 9913b4b481ddcaf0fa8499f3554c85bb588be7f0 (diff) | |
download | plus-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.gz plus-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.bz2 plus-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.xz plus-1680d159ecbf75591d2dab1416ff8144c27d4de5.zip |
Rename player_node variable into localPlayer.
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 11467a0e1..2ea77d925 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -298,7 +298,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, if (dstBeing->getType() == ActorType::PLAYER) dstBeing->setOtherTime(); - if (!player_node) + if (!localPlayer) { BLOCK_END("BeingHandler::processBeingChangeLook") return; @@ -322,22 +322,22 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, dstBeing->setSprite(SPRITE_WEAPON, id, "", 1, true); if (!mHideShield) dstBeing->setSprite(SPRITE_SHIELD, id2); - player_node->imitateOutfit(dstBeing, SPRITE_SHIELD); + localPlayer->imitateOutfit(dstBeing, SPRITE_SHIELD); break; case 3: // Change lower headgear for eAthena, pants for us dstBeing->setSprite(SPRITE_BOTTOMCLOTHES, id, color, static_cast<unsigned char>(id2)); - player_node->imitateOutfit(dstBeing, SPRITE_BOTTOMCLOTHES); + localPlayer->imitateOutfit(dstBeing, SPRITE_BOTTOMCLOTHES); break; case 4: // Change upper headgear for eAthena, hat for us dstBeing->setSprite(SPRITE_HAT, id, color, static_cast<unsigned char>(id2)); - player_node->imitateOutfit(dstBeing, SPRITE_HAT); + localPlayer->imitateOutfit(dstBeing, SPRITE_HAT); break; case 5: // Change middle headgear for eathena, armor for us dstBeing->setSprite(SPRITE_TOPCLOTHES, id, color, static_cast<unsigned char>(id2)); - player_node->imitateOutfit(dstBeing, SPRITE_TOPCLOTHES); + localPlayer->imitateOutfit(dstBeing, SPRITE_TOPCLOTHES); break; case 6: // eAthena LOOK_HAIR_COLOR dstBeing->setHairColor(SPRITE_HAIR, static_cast<uint8_t>(id)); @@ -351,42 +351,42 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, dstBeing->setSprite(SPRITE_SHIELD, id, color, static_cast<unsigned char>(id2)); } - player_node->imitateOutfit(dstBeing, SPRITE_SHIELD); + localPlayer->imitateOutfit(dstBeing, SPRITE_SHIELD); break; case 9: // eAthena LOOK_SHOES dstBeing->setSprite(SPRITE_SHOE, id, color, static_cast<unsigned char>(id2)); - player_node->imitateOutfit(dstBeing, SPRITE_SHOE); + localPlayer->imitateOutfit(dstBeing, SPRITE_SHOE); break; case 10: // LOOK_GLOVES dstBeing->setSprite(SPRITE_GLOVES, id, color, static_cast<unsigned char>(id2)); - player_node->imitateOutfit(dstBeing, SPRITE_GLOVES); + localPlayer->imitateOutfit(dstBeing, SPRITE_GLOVES); break; case 11: // LOOK_CAPE dstBeing->setSprite(SPRITE_CAPE, id, color, static_cast<unsigned char>(id2)); - player_node->imitateOutfit(dstBeing, SPRITE_CAPE); + localPlayer->imitateOutfit(dstBeing, SPRITE_CAPE); break; case 12: dstBeing->setSprite(SPRITE_MISC1, id, color, static_cast<unsigned char>(id2)); - player_node->imitateOutfit(dstBeing, SPRITE_MISC1); + localPlayer->imitateOutfit(dstBeing, SPRITE_MISC1); break; case 13: dstBeing->setSprite(SPRITE_MISC2, id, color, static_cast<unsigned char>(id2)); - player_node->imitateOutfit(dstBeing, SPRITE_MISC2); + localPlayer->imitateOutfit(dstBeing, SPRITE_MISC2); break; case 14: dstBeing->setSprite(SPRITE_EVOL1, id, color, static_cast<unsigned char>(id2)); - player_node->imitateOutfit(dstBeing, SPRITE_EVOL1); + localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL1); break; case 15: dstBeing->setSprite(SPRITE_EVOL2, id, color, static_cast<unsigned char>(id2)); - player_node->imitateOutfit(dstBeing, SPRITE_EVOL2); + localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL2); break; case 16: dstBeing->setLook(static_cast<uint8_t>(id)); @@ -404,7 +404,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, void BeingHandler::processNameResponse2(Net::MessageIn &msg) { BLOCK_START("BeingHandler::processNameResponse2") - if (!actorManager || !player_node) + if (!actorManager || !localPlayer) { BLOCK_END("BeingHandler::processNameResponse2") return; @@ -416,9 +416,9 @@ void BeingHandler::processNameResponse2(Net::MessageIn &msg) Being *const dstBeing = actorManager->findBeing(beingId); if (dstBeing) { - if (beingId == player_node->getId()) + if (beingId == localPlayer->getId()) { - player_node->pingResponse(); + localPlayer->pingResponse(); } else { @@ -429,9 +429,9 @@ void BeingHandler::processNameResponse2(Net::MessageIn &msg) if (dstBeing->getType() == ActorType::PLAYER) dstBeing->updateColors(); - if (player_node) + if (localPlayer) { - const Party *const party = player_node->getParty(); + const Party *const party = localPlayer->getParty(); if (party && party->isMember(dstBeing->getId())) { PartyMember *const member = party->getMember( @@ -440,7 +440,7 @@ void BeingHandler::processNameResponse2(Net::MessageIn &msg) if (member) member->setName(dstBeing->getName()); } - player_node->checkNewName(dstBeing); + localPlayer->checkNewName(dstBeing); } } } @@ -451,7 +451,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, const int msgType) const { BLOCK_START("BeingHandler::processPlayerMoveUpdate") - if (!actorManager || !player_node) + if (!actorManager || !localPlayer) { BLOCK_END("BeingHandler::processPlayerMoveUpdate") return; @@ -500,7 +500,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, dstBeing->setDirection(dir); } - if (Party *const party = player_node->getParty()) + if (Party *const party = localPlayer->getParty()) { if (party->isMember(id)) dstBeing->setParty(party); @@ -571,14 +571,14 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); dstBeing->setHairColor(hairColor); } - player_node->imitateOutfit(dstBeing); + localPlayer->imitateOutfit(dstBeing); if (msgType == 3) { uint16_t srcX, srcY, dstX, dstY; msg.readCoordinatePair(srcX, srcY, dstX, dstY); - player_node->followMoveTo(dstBeing, srcX, srcY, dstX, dstY); + localPlayer->followMoveTo(dstBeing, srcX, srcY, dstX, dstY); dstBeing->setTileCoords(srcX, srcY); dstBeing->setDestination(dstX, dstY); @@ -594,11 +594,11 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, dstBeing->setDirectionDelayed(static_cast<uint8_t>(d)); } - if (player_node->getCurrentAction() != BeingAction::STAND) - player_node->imitateAction(dstBeing, BeingAction::STAND); - if (player_node->getDirection() != dstBeing->getDirection()) + if (localPlayer->getCurrentAction() != BeingAction::STAND) + localPlayer->imitateAction(dstBeing, BeingAction::STAND); + if (localPlayer->getDirection() != dstBeing->getDirection()) { - player_node->imitateDirection(dstBeing, + localPlayer->imitateDirection(dstBeing, dstBeing->getDirection()); } } @@ -610,7 +610,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, dstBeing->setTileCoords(x, y); dstBeing->setDirection(dir); - player_node->imitateDirection(dstBeing, dir); + localPlayer->imitateDirection(dstBeing, dir); } const uint16_t gmstatus = msg.readInt16(); @@ -625,7 +625,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, { case 0: dstBeing->setAction(BeingAction::STAND, 0); - player_node->imitateAction(dstBeing, BeingAction::STAND); + localPlayer->imitateAction(dstBeing, BeingAction::STAND); break; case 1: @@ -638,7 +638,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, case 2: dstBeing->setAction(BeingAction::SIT, 0); - player_node->imitateAction(dstBeing, BeingAction::SIT); + localPlayer->imitateAction(dstBeing, BeingAction::SIT); break; default: |