diff options
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, |