summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-16 17:16:48 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-16 17:16:48 +0300
commit382e4efcd1a7151a168657b0c731e9e758e7008d (patch)
treea163892525d7b39a6a299a60809cae266575131a /src
parent1f4844a5c4c958fe9ca8767e8f820c923549e0b7 (diff)
downloadmanaplus-382e4efcd1a7151a168657b0c731e9e758e7008d.tar.gz
manaplus-382e4efcd1a7151a168657b0c731e9e758e7008d.tar.bz2
manaplus-382e4efcd1a7151a168657b0c731e9e758e7008d.tar.xz
manaplus-382e4efcd1a7151a168657b0c731e9e758e7008d.zip
Move processPartyUpdateHp from ea namespace into tmwa.
Diffstat (limited to 'src')
-rw-r--r--src/net/ea/partyhandler.cpp23
-rw-r--r--src/net/ea/partyhandler.h2
-rw-r--r--src/net/tmwa/partyhandler.cpp23
-rw-r--r--src/net/tmwa/partyhandler.h2
4 files changed, 25 insertions, 25 deletions
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index d16578840..76d02aca7 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -221,29 +221,6 @@ void PartyHandler::processPartyLeave(Net::MessageIn &msg)
}
}
-void PartyHandler::processPartyUpdateHp(Net::MessageIn &msg)
-{
- const int id = msg.readInt32("id");
- const int hp = msg.readInt16("hp");
- const int maxhp = msg.readInt16("max hp");
- PartyMember *m = nullptr;
- if (Ea::taParty)
- m = Ea::taParty->getMember(id);
- if (m)
- {
- m->setHp(hp);
- m->setMaxHp(maxhp);
- }
-
- // The server only sends this when the member is in range, so
- // lets make sure they get the party hilight.
- if (actorManager && Ea::taParty)
- {
- if (Being *const b = actorManager->findBeing(id))
- b->setParty(Ea::taParty);
- }
-}
-
void PartyHandler::processPartyUpdateCoords(Net::MessageIn &msg)
{
const int id = msg.readInt32("id");
diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h
index ffc57adf2..fb77e8a91 100644
--- a/src/net/ea/partyhandler.h
+++ b/src/net/ea/partyhandler.h
@@ -65,8 +65,6 @@ class PartyHandler notfinal : public Net::PartyHandler
static void processPartyLeave(Net::MessageIn &msg);
- static void processPartyUpdateHp(Net::MessageIn &msg);
-
static void processPartyUpdateCoords(Net::MessageIn &msg);
static void processPartySettingsContinue(const int16_t exp,
diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp
index 3e16fc08a..9cfd8986c 100644
--- a/src/net/tmwa/partyhandler.cpp
+++ b/src/net/tmwa/partyhandler.cpp
@@ -435,4 +435,27 @@ void PartyHandler::processPartyMove(Net::MessageIn &msg)
}
}
+void PartyHandler::processPartyUpdateHp(Net::MessageIn &msg)
+{
+ const int id = msg.readInt32("id");
+ const int hp = msg.readInt16("hp");
+ const int maxhp = msg.readInt16("max hp");
+ PartyMember *m = nullptr;
+ if (Ea::taParty)
+ m = Ea::taParty->getMember(id);
+ if (m)
+ {
+ m->setHp(hp);
+ m->setMaxHp(maxhp);
+ }
+
+ // The server only sends this when the member is in range, so
+ // lets make sure they get the party hilight.
+ if (actorManager && Ea::taParty)
+ {
+ if (Being *const b = actorManager->findBeing(id))
+ b->setParty(Ea::taParty);
+ }
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/partyhandler.h b/src/net/tmwa/partyhandler.h
index 34d64aeb5..8493681b1 100644
--- a/src/net/tmwa/partyhandler.h
+++ b/src/net/tmwa/partyhandler.h
@@ -78,6 +78,8 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler
static void processPartyInvited(Net::MessageIn &msg);
static void processPartyMove(Net::MessageIn &msg);
+
+ static void processPartyUpdateHp(Net::MessageIn &msg);
};
} // namespace TmwAthena