diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-20 17:55:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-20 17:55:42 +0300 |
commit | 5f7a8dd28733fd460578e43c6b2ea4990afa0670 (patch) | |
tree | 0263f50e8a566af4b8d081889316a05e1f048dab /src/net | |
parent | c958cb619f667851b188b8c169d0fcb14500f6de (diff) | |
download | plus-5f7a8dd28733fd460578e43c6b2ea4990afa0670.tar.gz plus-5f7a8dd28733fd460578e43c6b2ea4990afa0670.tar.bz2 plus-5f7a8dd28733fd460578e43c6b2ea4990afa0670.tar.xz plus-5f7a8dd28733fd460578e43c6b2ea4990afa0670.zip |
Use skill owner field in most functions.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/skillhandler.cpp | 3 | ||||
-rw-r--r-- | src/net/eathena/skillhandler.cpp | 14 | ||||
-rw-r--r-- | src/net/tmwa/skillhandler.cpp | 5 |
3 files changed, 16 insertions, 6 deletions
diff --git a/src/net/ea/skillhandler.cpp b/src/net/ea/skillhandler.cpp index 19f7d4d63..99fffac86 100644 --- a/src/net/ea/skillhandler.cpp +++ b/src/net/ea/skillhandler.cpp @@ -91,7 +91,8 @@ void SkillHandler::processPlayerSkillUp(Net::MessageIn &msg) if (!skillDialog->updateSkill(skillId, range, up, SkillType::Unknown, sp)) { - skillDialog->addSkill(skillId, "", level, + skillDialog->addSkill(SkillOwner::Player, + skillId, "", level, range, up, SkillType::Unknown, sp); } } diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp index 77e87d64a..bcd90b6e0 100644 --- a/src/net/eathena/skillhandler.cpp +++ b/src/net/eathena/skillhandler.cpp @@ -127,7 +127,7 @@ void SkillHandler::processPlayerSkills(Net::MessageIn &msg) int updateSkill = 0; if (skillDialog) - skillDialog->hideSkills(); + skillDialog->hideSkills(SkillOwner::Player); for (int k = 0; k < skillCount; k++) { const int skillId = msg.readInt16("skill id"); @@ -145,7 +145,10 @@ void SkillHandler::processPlayerSkills(Net::MessageIn &msg) if (skillDialog) { if (!skillDialog->updateSkill(skillId, range, up, inf, sp)) - skillDialog->addSkill(skillId, name, level, range, up, inf, sp); + { + skillDialog->addSkill(SkillOwner::Player, + skillId, name, level, range, up, inf, sp); + } } } if (updateSkill && skillDialog) @@ -157,7 +160,7 @@ void SkillHandler::processSkillCoolDown(Net::MessageIn &msg) const int skillId = msg.readInt16("skill id"); const int duration = msg.readInt32("duration"); if (skillDialog) - skillDialog->setSkillDuration(skillId, duration); + skillDialog->setSkillDuration(SkillOwner::Player, skillId, duration); } void SkillHandler::processSkillCoolDownList(Net::MessageIn &msg) @@ -169,7 +172,10 @@ void SkillHandler::processSkillCoolDownList(Net::MessageIn &msg) msg.readInt32("total"); const int duration = msg.readInt32("duration"); if (skillDialog) - skillDialog->setSkillDuration(skillId, duration); + { + skillDialog->setSkillDuration(SkillOwner::Player, + skillId, duration); + } } } diff --git a/src/net/tmwa/skillhandler.cpp b/src/net/tmwa/skillhandler.cpp index 05f7b0d90..bfedcf927 100644 --- a/src/net/tmwa/skillhandler.cpp +++ b/src/net/tmwa/skillhandler.cpp @@ -136,7 +136,10 @@ void SkillHandler::processPlayerSkills(Net::MessageIn &msg) if (skillDialog) { if (!skillDialog->updateSkill(skillId, range, up, inf, sp)) - skillDialog->addSkill(skillId, "", level, range, up, inf, sp); + { + skillDialog->addSkill(SkillOwner::Player, + skillId, "", level, range, up, inf, sp); + } } } if (updateSkill && skillDialog) |