diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-04-19 15:36:18 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-08-26 22:56:46 +0200 |
commit | 1fdbc0af01b9e515a8610b20c4e0cb760a3635eb (patch) | |
tree | e88082ebd9431a3dccafe2d32bafcb72be4841d5 /src/game-server/character.h | |
parent | 3598685c0fcbb9b5fdbcdbbaee258e2b55d5c98a (diff) | |
download | manaserv-1fdbc0af01b9e515a8610b20c4e0cb760a3635eb.tar.gz manaserv-1fdbc0af01b9e515a8610b20c4e0cb760a3635eb.tar.bz2 manaserv-1fdbc0af01b9e515a8610b20c4e0cb760a3635eb.tar.xz manaserv-1fdbc0af01b9e515a8610b20c4e0cb760a3635eb.zip |
[Abilities] Made the rechargespeed depending on attributes
This allows a lot more flexibility and makes stuff like magical items a
lot easier to implement. We will also use this for the attack system in
the future. So a attack (abilitiy) would simply depend on some value
like Agility (or a derived attribute from it). Which sets the recharge
speed.
The recharge speed is the modified value of the attribute per game tick.
Diffstat (limited to 'src/game-server/character.h')
-rw-r--r-- | src/game-server/character.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/game-server/character.h b/src/game-server/character.h index 9b179693..6c2e31e8 100644 --- a/src/game-server/character.h +++ b/src/game-server/character.h @@ -51,12 +51,10 @@ struct AbilityValue AbilityValue(unsigned currentMana, const AbilityManager::AbilityInfo *abilityInfo) : currentPoints(currentMana) - , rechargeSpeed(abilityInfo->defaultRechargeSpeed) , abilityInfo(abilityInfo) {} unsigned currentPoints; - unsigned rechargeSpeed; const AbilityManager::AbilityInfo *abilityInfo; }; @@ -188,12 +186,6 @@ class CharacterComponent : public Component */ AbilityMap::iterator findAbility(int id) { return mAbilities.find(id); } - - /** - * Sets recharge speed of a ability - */ - bool setAbilityRechargeSpeed(int id, int speed); - /** * Removes all abilities from character */ @@ -511,7 +503,7 @@ class CharacterComponent : public Component /** * Informs the client about his characters abilities charge status */ - void sendAbilityUpdate(); + void sendAbilityUpdate(Entity &entity); enum TransactionType { TRANS_NONE, TRANS_TRADE, TRANS_BUYSELL }; |