summaryrefslogtreecommitdiff
path: root/src/game-server/attack.cpp
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-04-06 21:36:50 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-04-11 13:43:00 +0200
commitaa04597c5f8bb806996d604699fc8ebff6d53bdd (patch)
tree20e6a79a873605b62c80011fd5c80351f60df6fb /src/game-server/attack.cpp
parentd95fccfca8575d8fb06988e558a338e37776961a (diff)
downloadmanaserv-aa04597c5f8bb806996d604699fc8ebff6d53bdd.tar.gz
manaserv-aa04597c5f8bb806996d604699fc8ebff6d53bdd.tar.bz2
manaserv-aa04597c5f8bb806996d604699fc8ebff6d53bdd.tar.xz
manaserv-aa04597c5f8bb806996d604699fc8ebff6d53bdd.zip
Converted the Character class into a component
A CharacterData was created as a proxy class in order to allow using the old serialization method.
Diffstat (limited to 'src/game-server/attack.cpp')
-rw-r--r--src/game-server/attack.cpp8
1 files changed, 4 insertions, 4 deletions
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<Attack>::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;
}