summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/beinghandler.cpp64
-rw-r--r--src/net/eathena/chathandler.cpp4
-rw-r--r--src/net/eathena/gamehandler.cpp10
-rw-r--r--src/net/eathena/guildhandler.cpp8
-rw-r--r--src/net/eathena/npchandler.cpp4
-rw-r--r--src/net/eathena/partyhandler.cpp4
6 files changed, 47 insertions, 47 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index d44b2508b..fe153a474 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -290,7 +290,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg,
if (dstBeing->getType() == ActorType::PLAYER)
dstBeing->setOtherTime();
- if (!player_node)
+ if (!localPlayer)
return;
switch (type)
@@ -305,22 +305,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->setSpriteColor(SPRITE_HAIR, ItemDB::get(
@@ -335,42 +335,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;
default:
logger->log("QQQ3 CHANGE_LOOKS: unsupported type: "
@@ -383,7 +383,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg,
void BeingHandler::processNameResponse2(Net::MessageIn &msg)
{
- if (!actorManager || !player_node)
+ if (!actorManager || !localPlayer)
return;
const int len = msg.readInt16();
@@ -392,9 +392,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
{
@@ -405,9 +405,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(
@@ -416,7 +416,7 @@ void BeingHandler::processNameResponse2(Net::MessageIn &msg)
if (member)
member->setName(dstBeing->getName());
}
- player_node->checkNewName(dstBeing);
+ localPlayer->checkNewName(dstBeing);
}
}
}
@@ -425,7 +425,7 @@ void BeingHandler::processNameResponse2(Net::MessageIn &msg)
void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
const int msgType) const
{
- if (!actorManager || !player_node)
+ if (!actorManager || !localPlayer)
return;
// An update about a player, potentially including movement.
@@ -466,7 +466,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);
@@ -522,14 +522,14 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
dstBeing->updateSprite(SPRITE_HAIR, hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(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);
@@ -545,11 +545,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());
}
}
@@ -560,7 +560,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();
@@ -575,7 +575,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:
@@ -588,7 +588,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:
@@ -707,8 +707,8 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
dstBeing->setWalkSpeed(Vector(speed, speed, 0));
dstBeing->setSubtype(job, 0);
- if (dstBeing->getType() == ActorType::MONSTER && player_node)
- player_node->checkNewName(dstBeing);
+ if (dstBeing->getType() == ActorType::MONSTER && localPlayer)
+ localPlayer->checkNewName(dstBeing);
const int hairStyle = msg.readInt16();
const uint16_t weapon = msg.readInt16();
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index a9d11f563..daa3891e8 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -94,10 +94,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
void ChatHandler::talk(const std::string &restrict text,
const std::string &restrict channel A_UNUSED) const
{
- if (!player_node)
+ if (!localPlayer)
return;
- const std::string mes = std::string(player_node->getName()).append(
+ const std::string mes = std::string(localPlayer->getName()).append(
" : ").append(text);
MessageOut outMsg(CMSG_CHAT_MESSAGE);
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index 9c7e84554..c21b37611 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -113,10 +113,10 @@ void GameHandler::connect()
if (client->getState() == STATE_CONNECT_GAME)
{
// Change the player's ID to the account ID to match what eAthena uses
- if (player_node)
+ if (localPlayer)
{
- mCharID = player_node->getId();
- player_node->setId(token.account_ID);
+ mCharID = localPlayer->getId();
+ localPlayer->setId(token.account_ID);
}
else
{
@@ -133,10 +133,10 @@ void GameHandler::connect()
outMsg.writeInt8(Being::genderToInt(token.sex));
/*
- if (player_node)
+ if (localPlayer)
{
// Change the player's ID to the account ID to match what eAthena uses
- player_node->setId(token.account_ID);
+ localPlayer->setId(token.account_ID);
}
*/
// We get 4 useless bytes before the real answer comes in (what are these?)
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index 33ff12a57..6beebee9f 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -240,12 +240,12 @@ void GuildHandler::inviteResponse(const int guildId,
void GuildHandler::leave(const int guildId) const
{
- if (!player_node)
+ if (!localPlayer)
return;
MessageOut msg(CMSG_GUILD_LEAVE);
msg.writeInt32(guildId);
- msg.writeInt32(player_node->getId()); // Account ID
+ msg.writeInt32(localPlayer->getId()); // Account ID
msg.writeInt32(PlayerInfo::getCharId()); // Char ID
msg.writeString("", 40); // Message
}
@@ -266,10 +266,10 @@ void GuildHandler::kick(const GuildMember *restrict const member,
void GuildHandler::chat(const int guildId A_UNUSED,
const std::string &text) const
{
- if (!player_node)
+ if (!localPlayer)
return;
- const std::string str = std::string(player_node->getName()).append(
+ const std::string str = std::string(localPlayer->getName()).append(
" : ").append(text);
MessageOut msg(CMSG_GUILD_MESSAGE);
msg.writeInt16(static_cast<uint16_t>(str.size() + 4));
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index 297e333cf..76ae7d3b5 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -224,8 +224,8 @@ int NpcHandler::getNpc(Net::MessageIn &msg, const bool haveLength)
mDialog = new NpcDialog(npcId);
mDialog->postInit();
mDialog->saveCamera();
- if (player_node)
- player_node->stopWalking(false);
+ if (localPlayer)
+ localPlayer->stopWalking(false);
NpcDialog::mNpcDialogs[npcId] = mDialog;
}
}
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp
index 08074fa23..2c4fa63e4 100644
--- a/src/net/eathena/partyhandler.cpp
+++ b/src/net/eathena/partyhandler.cpp
@@ -137,10 +137,10 @@ void PartyHandler::invite(const std::string &name) const
void PartyHandler::inviteResponse(const std::string &inviter A_UNUSED,
const bool accept) const
{
- if (player_node)
+ if (localPlayer)
{
MessageOut outMsg(CMSG_PARTY_INVITED);
- outMsg.writeInt32(player_node->getId());
+ outMsg.writeInt32(localPlayer->getId());
outMsg.writeInt32(accept ? 1 : 0);
}
}