summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-09 16:33:10 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-09 16:33:10 +0300
commit38d50ac6a85f25d5e80eb9024fda5975d9561094 (patch)
tree5e193ff004b7b9e628fd5aea6004ae5c9b3a9b70 /src
parent84f1e19691aa83f0bd73d63d08de2a0baa5596bd (diff)
downloadmanaplus-38d50ac6a85f25d5e80eb9024fda5975d9561094.tar.gz
manaplus-38d50ac6a85f25d5e80eb9024fda5975d9561094.tar.bz2
manaplus-38d50ac6a85f25d5e80eb9024fda5975d9561094.tar.xz
manaplus-38d50ac6a85f25d5e80eb9024fda5975d9561094.zip
Move processBeingSelfEffect from ea namespace into eathena and tmwa.
Diffstat (limited to 'src')
-rw-r--r--src/net/ea/beinghandler.cpp31
-rw-r--r--src/net/ea/beinghandler.h2
-rw-r--r--src/net/eathena/beinghandler.cpp27
-rw-r--r--src/net/eathena/beinghandler.h2
-rw-r--r--src/net/tmwa/beinghandler.cpp34
-rw-r--r--src/net/tmwa/beinghandler.h2
6 files changed, 65 insertions, 33 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 30dac2ab7..f2aed075d 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -254,37 +254,6 @@ void BeingHandler::processBeingAction(Net::MessageIn &msg) const
BLOCK_END("BeingHandler::processBeingAction")
}
-void BeingHandler::processBeingSelfEffect(Net::MessageIn &msg) const
-{
- BLOCK_START("BeingHandler::processBeingSelfEffect")
- if (!effectManager || !actorManager)
- {
- BLOCK_END("BeingHandler::processBeingSelfEffect")
- return;
- }
-
- const int id = static_cast<uint32_t>(msg.readInt32("being id"));
- Being *const being = actorManager->findBeing(id);
- if (!being)
- {
- BLOCK_END("BeingHandler::processBeingSelfEffect")
- return;
- }
-
- const int effectType = msg.readInt32("effect type");
-
- if (Particle::enabled)
- effectManager->trigger(effectType, being);
-
- // +++ need dehard code effectType == 3
- if (effectType == 3 && being->getType() == ActorType::Player
- && socialWindow)
- { // reset received damage
- socialWindow->resetDamage(being->getName());
- }
- BLOCK_END("BeingHandler::processBeingSelfEffect")
-}
-
void BeingHandler::processBeingEmotion(Net::MessageIn &msg) const
{
BLOCK_START("BeingHandler::processBeingEmotion")
diff --git a/src/net/ea/beinghandler.h b/src/net/ea/beinghandler.h
index ffd2b80d1..957dc23d8 100644
--- a/src/net/ea/beinghandler.h
+++ b/src/net/ea/beinghandler.h
@@ -52,8 +52,6 @@ class BeingHandler notfinal : public Net::BeingHandler
virtual void processBeingAction(Net::MessageIn &msg) const;
- virtual void processBeingSelfEffect(Net::MessageIn &msg) const;
-
virtual void processBeingEmotion(Net::MessageIn &msg) const;
virtual void processNameResponse(Net::MessageIn &msg) const;
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index c96f29433..7b3c3fcaf 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -23,6 +23,7 @@
#include "net/eathena/beinghandler.h"
#include "actormanager.h"
+#include "effectmanager.h"
#include "guild.h"
#include "guildmanager.h"
#include "party.h"
@@ -31,6 +32,8 @@
#include "being/mercenaryinfo.h"
#include "being/playerinfo.h"
+#include "particle/particle.h"
+
#include "input/keyboardconfig.h"
#include "gui/windows/socialwindow.h"
@@ -1977,4 +1980,28 @@ void BeingHandler::processBeingStatUpdate1(Net::MessageIn &msg) const
dstBeing->setManner(value);
}
+void BeingHandler::processBeingSelfEffect(Net::MessageIn &msg) const
+{
+ BLOCK_START("BeingHandler::processBeingSelfEffect")
+ if (!effectManager || !actorManager)
+ {
+ BLOCK_END("BeingHandler::processBeingSelfEffect")
+ return;
+ }
+
+ const int id = static_cast<uint32_t>(msg.readInt32("being id"));
+ Being *const being = actorManager->findBeing(id);
+ if (!being)
+ {
+ BLOCK_END("BeingHandler::processBeingSelfEffect")
+ return;
+ }
+
+ const int effectType = msg.readInt32("effect type");
+ if (Particle::enabled)
+ effectManager->trigger(effectType, being);
+
+ BLOCK_END("BeingHandler::processBeingSelfEffect")
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index f0d2abe49..ed7b3586f 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -127,6 +127,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
void processBeingStatUpdate1(Net::MessageIn &msg) const;
void processPlaterStatusChange2(Net::MessageIn &msg) const;
+
+ void processBeingSelfEffect(Net::MessageIn &msg) const;
};
} // namespace EAthena
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index a996f97da..9ff7b3ad0 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -23,12 +23,15 @@
#include "net/tmwa/beinghandler.h"
#include "actormanager.h"
+#include "effectmanager.h"
#include "guild.h"
#include "guildmanager.h"
#include "party.h"
#include "being/localplayer.h"
+#include "particle/particle.h"
+
#include "input/keyboardconfig.h"
#include "gui/windows/killstats.h"
@@ -1644,4 +1647,35 @@ void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) const
BLOCK_END("BeingHandler::processPlayerGuilPartyInfo")
}
+void BeingHandler::processBeingSelfEffect(Net::MessageIn &msg) const
+{
+ BLOCK_START("BeingHandler::processBeingSelfEffect")
+ if (!effectManager || !actorManager)
+ {
+ BLOCK_END("BeingHandler::processBeingSelfEffect")
+ return;
+ }
+
+ const int id = static_cast<uint32_t>(msg.readInt32("being id"));
+ Being *const being = actorManager->findBeing(id);
+ if (!being)
+ {
+ BLOCK_END("BeingHandler::processBeingSelfEffect")
+ return;
+ }
+
+ const int effectType = msg.readInt32("effect type");
+
+ if (Particle::enabled)
+ effectManager->trigger(effectType, being);
+
+ // +++ need dehard code effectType == 3
+ if (effectType == 3 && being->getType() == ActorType::Player
+ && socialWindow)
+ { // reset received damage
+ socialWindow->resetDamage(being->getName());
+ }
+ BLOCK_END("BeingHandler::processBeingSelfEffect")
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h
index 7c22c3e93..9a5bc993b 100644
--- a/src/net/tmwa/beinghandler.h
+++ b/src/net/tmwa/beinghandler.h
@@ -92,6 +92,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
static void applyPlayerAction(Being *const being,
const uint8_t type);
+
+ void processBeingSelfEffect(Net::MessageIn &msg) const;
};
} // namespace TmwAthena