From aa04597c5f8bb806996d604699fc8ebff6d53bdd Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Sat, 6 Apr 2013 21:36:50 +0200 Subject: Converted the Character class into a component A CharacterData was created as a proxy class in order to allow using the old serialization method. --- src/game-server/attack.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/game-server/attack.cpp') diff --git a/src/game-server/attack.cpp b/src/game-server/attack.cpp index a1300e4d..6ca85fb8 100644 --- a/src/game-server/attack.cpp +++ b/src/game-server/attack.cpp @@ -72,13 +72,13 @@ AttackInfo *AttackInfo::readAttackNode(xmlNodePtr node) return attack; } -void Attacks::add(AttackInfo *attackInfo) +void Attacks::add(CombatComponent *combatComponent, AttackInfo *attackInfo) { mAttacks.push_back(Attack(attackInfo)); - attack_added.emit(*mAttacks.rbegin()); + attack_added.emit(combatComponent, *mAttacks.rbegin()); } -void Attacks::remove(AttackInfo *attackInfo) +void Attacks::remove(CombatComponent *combatComponent, AttackInfo *attackInfo) { for (std::vector::iterator it = mAttacks.begin(), it_end = mAttacks.end(); it != it_end; ++it) @@ -87,7 +87,7 @@ void Attacks::remove(AttackInfo *attackInfo) { if (mCurrentAttack && mCurrentAttack->getAttackInfo() == attackInfo) mCurrentAttack = 0; - attack_removed.emit(*it); + attack_removed.emit(combatComponent, *it); mAttacks.erase(it); return; } -- cgit v1.2.3-60-g2f50