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/being.cpp | |
parent | a13d85161a7148295e4ba50b0cdae124e8d6c75a (diff) | |
download | manaplus-1a5f8957c707625efbcf36722b057d5eda5a21bb.tar.gz manaplus-1a5f8957c707625efbcf36722b057d5eda5a21bb.tar.bz2 manaplus-1a5f8957c707625efbcf36722b057d5eda5a21bb.tar.xz manaplus-1a5f8957c707625efbcf36722b057d5eda5a21bb.zip |
Add skill casting particle arrow effect.
New skill data attribute: castingParticle.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 19 |
1 files changed, 19 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, |