diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-07-23 00:18:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-07-23 00:51:45 +0300 |
commit | 1a5f8957c707625efbcf36722b057d5eda5a21bb (patch) | |
tree | 9dd38bb08f081c232b318d4466552c0f570c2e74 /src/being | |
parent | a13d85161a7148295e4ba50b0cdae124e8d6c75a (diff) | |
download | manaverse-1a5f8957c707625efbcf36722b057d5eda5a21bb.tar.gz manaverse-1a5f8957c707625efbcf36722b057d5eda5a21bb.tar.bz2 manaverse-1a5f8957c707625efbcf36722b057d5eda5a21bb.tar.xz manaverse-1a5f8957c707625efbcf36722b057d5eda5a21bb.zip |
Add skill casting particle arrow effect.
New skill data attribute: castingParticle.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 19 | ||||
-rw-r--r-- | src/being/being.h | 4 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 6bb166dc2..b5732b15f 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1019,6 +1019,25 @@ void Being::handleAttack(Being *restrict const victim, BLOCK_END("Being::handleAttack") } +void Being::handleSkillCasting(Being *restrict const victim, + const int skillId, + const int skillLevel) restrict2 +{ + if (!victim || !mInfo || !skillDialog) + return; + + setAction(BeingAction::CAST, skillId); + + skillDialog->playCastingSrcEffect(skillId, this); + skillDialog->playCastingDstEffect(skillId, victim); + + const SkillData *restrict const data = skillDialog->getSkillDataByLevel( + skillId, + skillLevel); + if (data) + fireMissile(victim, data->castingParticle); +} + void Being::handleSkill(Being *restrict const victim, const int damage, const int skillId, diff --git a/src/being/being.h b/src/being/being.h index 3ee2c5ed1..72e6d2065 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -209,6 +209,10 @@ class Being notfinal : public ActorSprite, const int damage, const int attackId = 1) restrict2; + void handleSkillCasting(Being *restrict const victim, + const int skillId, + const int skillLevel) restrict2; + void handleSkill(Being *restrict const victim, const int damage, const int skillId, |