diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-05-26 23:41:01 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-05-26 23:42:10 +0200 |
commit | b35aef2d924f03d85eb44a2465be5a745444eafd (patch) | |
tree | 5de5dc327397f9e970ce1bdfacf850a16da02241 /src/being.h | |
parent | b02081c00450d274c23b7198620ee7748756bd72 (diff) | |
download | mana-client-b35aef2d924f03d85eb44a2465be5a745444eafd.tar.gz mana-client-b35aef2d924f03d85eb44a2465be5a745444eafd.tar.bz2 mana-client-b35aef2d924f03d85eb44a2465be5a745444eafd.tar.xz mana-client-b35aef2d924f03d85eb44a2465be5a745444eafd.zip |
Added effects support in monsters attacks.
This is provided through the use of the 'effect-id' property
of the <attack> tag.
Note that the 'particle-effect' support has been removed
as it was redundant, but can be kept for backward compatibility.
Now, on both Manaserv and tA, only the attack id 1 is supported,
i.e:
<monster>
...
<attack id="1" effect-id="11" action="attack" />
</monster>
More to come with re-enabling of the attack type support.
I had to fix a crash in the Being::takeDamage() function
when there were no attacker (in Manaserv), and add rotation
support to the effectManager to achieve this.
Reviwed-by: Jaxad0127.
Diffstat (limited to 'src/being.h')
-rw-r--r-- | src/being.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/being.h b/src/being.h index f380e0b8..9ac014e0 100644 --- a/src/being.h +++ b/src/being.h @@ -172,9 +172,9 @@ class Being : public ActorSprite, public EventListener * * @param victim the victim being * @param damage the amount of damage dealt (0 means miss) - * @param type the attack type + * @param attackId the attack id */ - virtual void handleAttack(Being *victim, int damage, AttackType type); + virtual void handleAttack(Being *victim, int damage, int attackId = 1); const ItemInfo *getEquippedWeapon() const { return mEquippedWeapon; } @@ -471,7 +471,6 @@ class Being : public ActorSprite, public EventListener /** Time until the last speech sentence disappears */ int mSpeechTime; - int mAttackType; int mAttackSpeed; /**< Attack speed */ Action mAction; /**< Action the being is performing */ |