summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2009-06-23 20:30:29 -0400
committerChuck Miller <shadowmil@gmail.com>2009-06-23 20:30:29 -0400
commit4f3a8268f69650e431cb0496d9903e7a02b609f0 (patch)
tree6104a34c194df218f4e929e0ebbc2e949b1e6487 /src
parent4d4b94192c1883b29eed4f3389422a0b0f930bef (diff)
downloadmana-4f3a8268f69650e431cb0496d9903e7a02b609f0.tar.gz
mana-4f3a8268f69650e431cb0496d9903e7a02b609f0.tar.bz2
mana-4f3a8268f69650e431cb0496d9903e7a02b609f0.tar.xz
mana-4f3a8268f69650e431cb0496d9903e7a02b609f0.zip
Made so monster particle effects show up on eA
I also removed Being::handleAttack() and Monster::handleAttack() for TMWserv since they are not used
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp8
-rw-r--r--src/being.h4
-rw-r--r--src/monster.cpp18
-rw-r--r--src/monster.h4
4 files changed, 2 insertions, 32 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 657e2236..85095804 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -352,15 +352,10 @@ void Being::takeDamage(Being *attacker, int amount, AttackType type)
}
}
-#ifdef TMWSERV_SUPPORT
-void Being::handleAttack()
-#else
void Being::handleAttack(Being *victim, int damage, AttackType type)
-#endif
{
if (this != player_node)
- setAction(Being::ATTACK);
-#ifdef EATHENA_SUPPORT
+ setAction(Being::ATTACK, 1);
if (getType() == PLAYER && victim)
{
if (mEquippedWeapon && mEquippedWeapon->getAttackType() == ACTION_ATTACK_BOW)
@@ -379,6 +374,7 @@ void Being::handleAttack(Being *victim, int damage, AttackType type)
}
}
}
+#ifdef EATHENA_SUPPORT
mFrame = 0;
mWalkTime = tick_time;
#endif
diff --git a/src/being.h b/src/being.h
index e5068952..6eef83c6 100644
--- a/src/being.h
+++ b/src/being.h
@@ -229,11 +229,7 @@ class Being : public Sprite, public ConfigListener
* @param damage the amount of damage dealt (0 means miss)
* @param type the attack type
*/
-#ifdef TMWSERV_SUPPORT
- virtual void handleAttack();
-#else
virtual void handleAttack(Being *victim, int damage, AttackType type);
-#endif
/**
* Returns the name of the being.
diff --git a/src/monster.cpp b/src/monster.cpp
index 92e1f84a..3192abf5 100644
--- a/src/monster.cpp
+++ b/src/monster.cpp
@@ -156,22 +156,6 @@ void Monster::setAction(Action action, int attackType)
}
}
-#ifdef TMWSERV_SUPPORT
-
-void Monster::handleAttack()
-{
- Being::handleAttack();
-
- const MonsterInfo &mi = getInfo();
-
- // TODO: It's not possible to determine hit or miss here, so this stuff
- // probably needs to be moved somewhere else. We may lose synchronization
- // between attack animation and the sound, unless we adapt the protocol...
- sound.playSfx(mi.getSound(MONSTER_EVENT_HIT));
-}
-
-#else
-
void Monster::handleAttack(Being *victim, int damage, AttackType type)
{
Being::handleAttack(victim, damage, type);
@@ -181,8 +165,6 @@ void Monster::handleAttack(Being *victim, int damage, AttackType type)
MONSTER_EVENT_HIT : MONSTER_EVENT_MISS));
}
-#endif
-
void Monster::takeDamage(Being *attacker, int amount, AttackType type)
{
if (amount > 0)
diff --git a/src/monster.h b/src/monster.h
index 7b44b5a8..29b04eab 100644
--- a/src/monster.h
+++ b/src/monster.h
@@ -53,11 +53,7 @@ class Monster : public Being
* @param damage the amount of damage dealt (0 means miss)
* @param type the attack type
*/
-#ifdef TMWSERV_SUPPORT
- virtual void handleAttack();
-#else
virtual void handleAttack(Being *victim, int damage, AttackType type);
-#endif
/**
* Puts a damage bubble above this monster and plays the hurt sound