summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-19 17:43:40 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-19 17:43:40 +0300
commit53bbb5541d4770d39f98bf0a789cc24918061e5b (patch)
tree62b5ee3e82db68974deb972ca4f2ca219f280bef /src
parent8f36f816373904eeb1c0b800114e3c44bad168e8 (diff)
downloadmanaplus-53bbb5541d4770d39f98bf0a789cc24918061e5b.tar.gz
manaplus-53bbb5541d4770d39f98bf0a789cc24918061e5b.tar.bz2
manaplus-53bbb5541d4770d39f98bf0a789cc24918061e5b.tar.xz
manaplus-53bbb5541d4770d39f98bf0a789cc24918061e5b.zip
Add static in playerhandler.
Diffstat (limited to 'src')
-rw-r--r--src/net/ea/playerhandler.cpp20
-rw-r--r--src/net/ea/playerhandler.h20
-rw-r--r--src/net/eathena/playerhandler.h17
-rw-r--r--src/net/playerhandler.h5
-rw-r--r--src/net/tmwa/playerhandler.h8
5 files changed, 39 insertions, 31 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 55054c928..3d25c83d0 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -173,7 +173,7 @@ void PlayerHandler::processPlayerWarp(Net::MessageIn &msg)
BLOCK_END("PlayerHandler::processPlayerWarp")
}
-void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate1")
const int type = msg.readInt16("type");
@@ -184,7 +184,7 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) const
return;
}
- setStat(type, value, -1, true);
+ playerHandler->setStat(type, value, -1, true);
if (PlayerInfo::getAttribute(Attributes::HP) == 0 && !deathNotice)
{
@@ -205,27 +205,27 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) const
BLOCK_END("PlayerHandler::processPlayerStatUpdate1")
}
-void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate2")
const int type = msg.readInt16("type");
const int value = msg.readInt32("value");
- setStat(type, value, -1, true);
+ playerHandler->setStat(type, value, -1, true);
BLOCK_END("PlayerHandler::processPlayerStatUpdate2")
}
-void PlayerHandler::processPlayerStatUpdate3(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerStatUpdate3(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate3")
const int type = msg.readInt32("type");
const int base = msg.readInt32("base");
const int bonus = msg.readInt32("bonus");
- setStat(type, base, bonus, false);
+ playerHandler->setStat(type, base, bonus, false);
BLOCK_END("PlayerHandler::processPlayerStatUpdate3")
}
-void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate4")
const int type = msg.readInt16();
@@ -241,17 +241,17 @@ void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg) const
NotifyManager::notify(NotifyTypes::SKILL_RAISE_ERROR);
}
- setStat(type, value, -1, true);
+ playerHandler->setStat(type, value, -1, true);
BLOCK_END("PlayerHandler::processPlayerStatUpdate4")
}
-void PlayerHandler::processPlayerStatUpdate6(Net::MessageIn &msg) const
+void PlayerHandler::processPlayerStatUpdate6(Net::MessageIn &msg)
{
BLOCK_START("PlayerHandler::processPlayerStatUpdate6")
const int type = msg.readInt16("type");
const int value = msg.readUInt8("value");
if (statusWindow)
- setStat(type, value, -1, true);
+ playerHandler->setStat(type, value, -1, true);
BLOCK_END("PlayerHandler::processPlayerStatUpdate6")
}
diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h
index 8c530b29d..786c63625 100644
--- a/src/net/ea/playerhandler.h
+++ b/src/net/ea/playerhandler.h
@@ -53,23 +53,23 @@ class PlayerHandler notfinal : public Net::PlayerHandler
Vector getDefaultWalkSpeed() const override final A_WARN_UNUSED;
- protected:
- virtual void setStat(const int type,
- const int base,
- const int mod,
- const bool notify) const = 0;
+ void setStat(const int type,
+ const int base,
+ const int mod,
+ const bool notify) const override;
+ protected:
static void processPlayerWarp(Net::MessageIn &msg);
- void processPlayerStatUpdate1(Net::MessageIn &msg) const;
+ static void processPlayerStatUpdate1(Net::MessageIn &msg);
- void processPlayerStatUpdate2(Net::MessageIn &msg) const;
+ static void processPlayerStatUpdate2(Net::MessageIn &msg);
- void processPlayerStatUpdate3(Net::MessageIn &msg) const;
+ static void processPlayerStatUpdate3(Net::MessageIn &msg);
- void processPlayerStatUpdate4(Net::MessageIn &msg) const;
+ static void processPlayerStatUpdate4(Net::MessageIn &msg);
- void processPlayerStatUpdate6(Net::MessageIn &msg) const;
+ static void processPlayerStatUpdate6(Net::MessageIn &msg);
static void processPlayerArrowMessage(Net::MessageIn &msg);
};
diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h
index 335ac8b11..2a125703b 100644
--- a/src/net/eathena/playerhandler.h
+++ b/src/net/eathena/playerhandler.h
@@ -54,9 +54,6 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
const override final;
void updateStatus(const uint8_t status) const override final;
- static void processPlayerShortcuts(Net::MessageIn &msg);
- static void processPlayerShowEquip(Net::MessageIn &msg);
-
void requestOnlineList() const override final;
void respawn() const override final;
void setShortcut(const int idx,
@@ -78,15 +75,19 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
const int mod,
const bool notify) const override final;
- void processPlayerStatUpdate5(Net::MessageIn &msg);
+ static void processPlayerShortcuts(Net::MessageIn &msg);
+
+ static void processPlayerShowEquip(Net::MessageIn &msg);
+
+ static void processPlayerStatUpdate5(Net::MessageIn &msg);
- void processPlayerGetExp(Net::MessageIn &msg);
+ static void processPlayerGetExp(Net::MessageIn &msg);
- void processPvpInfo(Net::MessageIn &msg);
+ static void processPvpInfo(Net::MessageIn &msg);
- void processPlayerHeal(Net::MessageIn &msg);
+ static void processPlayerHeal(Net::MessageIn &msg);
- void processPlayerSkillMessage(Net::MessageIn &msg);
+ static void processPlayerSkillMessage(Net::MessageIn &msg);
static void processWalkResponse(Net::MessageIn &msg);
};
diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h
index c5b87e2ae..16d29a229 100644
--- a/src/net/playerhandler.h
+++ b/src/net/playerhandler.h
@@ -95,6 +95,11 @@ class PlayerHandler notfinal
virtual void revive() const = 0;
virtual void setViewEquipment(const bool allow) const = 0;
+
+ virtual void setStat(const int type,
+ const int base,
+ const int mod,
+ const bool notify) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h
index 05b7b1d27..6f643c46f 100644
--- a/src/net/tmwa/playerhandler.h
+++ b/src/net/tmwa/playerhandler.h
@@ -55,8 +55,6 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
static void processOnlineList(Net::MessageIn &msg);
void requestOnlineList() const override final;
void updateStatus(const uint8_t status) const override final;
- static void processMapMask(Net::MessageIn &msg);
- static void processMapMusic(Net::MessageIn &msg);
void respawn() const override final;
@@ -87,7 +85,11 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
const int mod,
const bool notify) const override final;
- void processPlayerStatUpdate5(Net::MessageIn &msg);
+ static void processMapMask(Net::MessageIn &msg);
+
+ static void processMapMusic(Net::MessageIn &msg);
+
+ static void processPlayerStatUpdate5(Net::MessageIn &msg);
static void processWalkResponse(Net::MessageIn &msg);
};