diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-09 12:05:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-09 12:05:10 +0300 |
commit | e26586ce6efaceb31ec534d488dace4d73702f56 (patch) | |
tree | 547db865ddb0fb3c82f60ebee0bb13879e465c4c /src/net/eathena/beinghandler.cpp | |
parent | d472a3cf2a40169ffb4eca900e9cc53e6bcc4cc7 (diff) | |
download | mv-e26586ce6efaceb31ec534d488dace4d73702f56.tar.gz mv-e26586ce6efaceb31ec534d488dace4d73702f56.tar.bz2 mv-e26586ce6efaceb31ec534d488dace4d73702f56.tar.xz mv-e26586ce6efaceb31ec534d488dace4d73702f56.zip |
Add skill attributes with effect id what will play on caster and target while casting skill.
New skill attributes:
skillCastingSrcEffectId - will play this effect on caster while casting skill
skillCastingDstEffectId - will play this effect on target while casting skill.
This effects for casting skill, not for skill attack.
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 7667edcbb..3f0ecf4ac 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -34,8 +34,8 @@ #include "input/keyboardconfig.h" +#include "gui/windows/skilldialog.h" #include "gui/windows/socialwindow.h" - #include "gui/windows/outfitwindow.h" #include "net/serverfeatures.h" @@ -1137,15 +1137,36 @@ void BeingHandler::processMapType(Net::MessageIn &msg) void BeingHandler::processSkillCasting(Net::MessageIn &msg) { - UNIMPLIMENTEDPACKET; - msg.readInt32("src id"); - msg.readInt32("dst id"); - msg.readInt16("dst x"); - msg.readInt16("dst y"); - msg.readInt16("skill id"); + // +++ need use other parameters + + const int srcId = msg.readInt32("src id"); + const int dstId = msg.readInt32("dst id"); + const int dstX = msg.readInt16("dst x"); + const int dstY = msg.readInt16("dst y"); + const int skillId = msg.readInt16("skill id"); msg.readInt32("property"); // can be used to trigger effect msg.readInt32("cast time"); msg.readInt8("dispossable"); + + if (!effectManager) + return; + + if (srcId == 0) + { + UNIMPLIMENTEDPACKET; + return; + } + else if (dstId != 0) + { // being to being + Being *const srcBeing = actorManager->findBeing(srcId); + Being *const dstBeing = actorManager->findBeing(dstId); + skillDialog->playCastingSrcEffect(skillId, srcBeing); + skillDialog->playCastingDstEffect(skillId, dstBeing); + } + else if (dstX != 0 || dstY != 0) + { // being to position + UNIMPLIMENTEDPACKET; + } } void BeingHandler::processBeingStatusChange(Net::MessageIn &msg) |