From 4f3a8268f69650e431cb0496d9903e7a02b609f0 Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Tue, 23 Jun 2009 20:30:29 -0400 Subject: Made so monster particle effects show up on eA I also removed Being::handleAttack() and Monster::handleAttack() for TMWserv since they are not used --- src/being.cpp | 8 ++------ src/being.h | 4 ---- src/monster.cpp | 18 ------------------ src/monster.h | 4 ---- 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 -- cgit v1.2.3-70-g09d2