summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-23 03:12:38 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-23 03:12:38 +0300
commit871f05609ec03cad93773112c3324ba7b0488388 (patch)
tree3ec1d858a3d6a6a3a96b2ab954b41b01751b563e /src/being/being.cpp
parentde2637f1e6211bb4a8b122b3aca53723a3440522 (diff)
downloadmanaplus-871f05609ec03cad93773112c3324ba7b0488388.tar.gz
manaplus-871f05609ec03cad93773112c3324ba7b0488388.tar.bz2
manaplus-871f05609ec03cad93773112c3324ba7b0488388.tar.xz
manaplus-871f05609ec03cad93773112c3324ba7b0488388.zip
Allow skill source and destination particle effects depend on skill level.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 73b386467..53db29cff 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1028,14 +1028,20 @@ void Being::handleSkillCasting(Being *restrict const victim,
setAction(BeingAction::CAST, skillId);
- skillDialog->playCastingSrcEffect(skillId, this);
- skillDialog->playCastingDstEffect(skillId, victim);
-
const SkillData *restrict const data = skillDialog->getSkillDataByLevel(
skillId,
skillLevel);
+
if (data)
+ {
+ effectManager->triggerDefault(data->castingSrcEffectId,
+ this,
+ paths.getIntValue("skillCastingSrcEffectId"));
+ effectManager->triggerDefault(data->castingDstEffectId,
+ victim,
+ paths.getIntValue("skillCastingDstEffectId"));
fireMissile(victim, data->castingParticle);
+ }
}
void Being::handleSkill(Being *restrict const victim,
@@ -1050,10 +1056,15 @@ void Being::handleSkill(Being *restrict const victim,
const SkillData *restrict const data = skill
? skill->getData1(skillLevel) : nullptr;
if (data)
+ {
+ effectManager->triggerDefault(data->srcEffectId,
+ this,
+ paths.getIntValue("skillSrcEffectId"));
+ effectManager->triggerDefault(data->dstEffectId,
+ victim,
+ paths.getIntValue("skillDstEffectId"));
fireMissile(victim, data->particle);
-
- skillDialog->playSrcEffect(skillId, this);
- skillDialog->playDstEffect(skillId, victim);
+ }
if (this != localPlayer && skill)
{