summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-16 13:50:02 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-16 13:50:02 +0300
commitb2d53621965a559ab31fb2425ae3b1b294ce571e (patch)
treed34a75c01f8da6f81bff8719454c5458ecae0ce6 /src
parent5056f25afdcba11410b2450112bb3b516320a705 (diff)
downloadmv-b2d53621965a559ab31fb2425ae3b1b294ce571e.tar.gz
mv-b2d53621965a559ab31fb2425ae3b1b294ce571e.tar.bz2
mv-b2d53621965a559ab31fb2425ae3b1b294ce571e.tar.xz
mv-b2d53621965a559ab31fb2425ae3b1b294ce571e.zip
eathena: remove packet SMSG_PLAYER_UPDATE_2.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/beinghandler.cpp128
-rw-r--r--src/net/eathena/beinghandler.h2
-rw-r--r--src/net/eathena/protocol.h1
3 files changed, 0 insertions, 131 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 7369a1fce..2e32d6199 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -88,7 +88,6 @@ BeingHandler::BeingHandler(const bool enableSync) :
SMSG_BEING_NAME_RESPONSE2,
SMSG_PLAYER_GUILD_PARTY_INFO,
SMSG_BEING_CHANGE_DIRECTION,
- SMSG_PLAYER_UPDATE_2,
SMSG_PLAYER_STOP,
SMSG_PLAYER_MOVE_TO_ATTACK,
SMSG_PLAYER_STATUS_CHANGE,
@@ -228,10 +227,6 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
processBeingChangeDirection(msg);
break;
- case SMSG_PLAYER_UPDATE_2:
- processPlayerUpdate2(msg);
- break;
-
case SMSG_PLAYER_STOP:
processPlayerStop(msg);
break;
@@ -539,129 +534,6 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing,
}
}
-void BeingHandler::processPlayerUpdate2(Net::MessageIn &msg)
-{
- if (!actorManager || !localPlayer)
- return;
-
- // An update about a player, potentially including movement.
- const int id = msg.readInt32("account id");
- const int16_t speed = msg.readInt16("speed");
- const uint16_t stunMode = msg.readInt16("opt1");
- uint32_t statusEffects = msg.readInt16("opt2");
- statusEffects |= (static_cast<uint16_t>(msg.readInt16("options"))) << 16U;
- const int16_t job = msg.readInt16("class");
- int disguiseId = 0;
- if (id < 110000000 && job >= 1000)
- disguiseId = job;
-
- Being *dstBeing = actorManager->findBeing(id);
-
- if (!dstBeing)
- {
- if (actorManager->isBlocked(id) == true)
- return;
-
- dstBeing = createBeing(id, job);
-
- if (!dstBeing)
- return;
- }
- else if (disguiseId)
- {
- actorManager->undelete(dstBeing);
- if (serverVersion < 1)
- beingHandler->requestNameById(id);
- }
-
- uint8_t dir = dstBeing->getDirectionDelayed();
- if (dir)
- {
- if (dir != dstBeing->getDirection())
- dstBeing->setDirection(dir);
- }
-
- if (Party *const party = localPlayer->getParty())
- {
- if (party->isMember(id))
- dstBeing->setParty(party);
- }
-
- dstBeing->setWalkSpeed(Vector(speed, speed, 0));
- dstBeing->setSubtype(job, 0);
-
- const int hairStyle = msg.readInt16("hair style");
- const uint16_t weapon = msg.readInt16("weapon");
- const uint16_t shield = msg.readInt16("shield");
- const uint16_t headBottom = msg.readInt16("head bottom");
-
- const uint16_t headTop = msg.readInt16("head top");
- const uint16_t headMid = msg.readInt16("head mid");
- const int hairColor = msg.readInt16("hair color");
-
- msg.readUInt8("unused?");
- msg.readUInt8("unused?");
- msg.readUInt8("unused?");
- msg.readUInt8("unused?");
-
- const int guild = msg.readInt32("guild");
-
- if (!guildManager || !GuildManager::getEnableGuildBot())
- {
- if (guild == 0)
- dstBeing->clearGuilds();
- else
- dstBeing->setGuild(Guild::getGuild(static_cast<int16_t>(guild)));
- }
-
- msg.readInt16("emblem");
- dstBeing->setManner(msg.readInt16("manner"));
- dstBeing->setStatusEffectBlock(32, msg.readInt16("opt3"));
- dstBeing->setKarma(msg.readUInt8("karma"));
- dstBeing->setGender(Being::intToGender(msg.readUInt8("gender")));
-
- if (!disguiseId)
- {
- // Set these after the gender, as the sprites may be gender-specific
- dstBeing->updateSprite(SPRITE_BODY, weapon, "", 1, true);
- if (!mHideShield)
- dstBeing->updateSprite(SPRITE_FLOOR, shield);
- dstBeing->updateSprite(SPRITE_WEAPON, headBottom);
- dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid);
- dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop);
- dstBeing->updateSprite(SPRITE_HAIR_COLOR, hairStyle * -1,
- ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
- }
- localPlayer->imitateOutfit(dstBeing);
-
- uint16_t x, y;
- msg.readCoordinates(x, y, dir, "position");
- dstBeing->setTileCoords(x, y);
- dstBeing->setDirection(dir);
-
- localPlayer->imitateDirection(dstBeing, dir);
-
- const uint16_t gmstatus = msg.readInt16("gm status");
-
- if (gmstatus & 0x80)
- dstBeing->setGM(true);
-
- applyPlayerAction(dstBeing, msg.readUInt8("action type"));
- const int level = static_cast<int>(msg.readUInt8("level"));
-
- if (level)
- dstBeing->setLevel(level);
-
- msg.readUInt8("unknown");
-
- dstBeing->setActionTime(tick_time);
- dstBeing->setStunMode(stunMode);
- dstBeing->setStatusEffectBlock(0, static_cast<uint16_t>(
- (statusEffects >> 16) & 0xffffU));
- dstBeing->setStatusEffectBlock(16, static_cast<uint16_t>(
- statusEffects & 0xffffU));
-}
-
void BeingHandler::processBeingVisible(Net::MessageIn &msg)
{
if (!actorManager)
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index c9a86d0bd..378c67fa1 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -61,8 +61,6 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
static void processBeingSpawn(Net::MessageIn &msg);
- static void processPlayerUpdate2(Net::MessageIn &msg);
-
static void processMapTypeProperty(Net::MessageIn &msg);
static void processMapType(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 286372ce1..8d495690a 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -56,7 +56,6 @@
#define SMSG_MAP_LOGIN_SUCCESS 0x0a18 /**< Contains starting location */
#define SMSG_MAP_QUIT_RESPONSE 0x018b
-#define SMSG_PLAYER_UPDATE_2 0x01d9
#define SMSG_PLAYER_MOVE 0x01da /**< A nearby player moves */
#define SMSG_PLAYER_STOP 0x0088 /**< Stop walking, set position */
#define SMSG_PLAYER_MOVE_TO_ATTACK 0x0139 /**< Move to within attack range */