diff options
author | Erik Schilling <ablu.erikschilling@gmail.com> | 2013-12-29 19:21:33 +0100 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@gmail.com> | 2013-12-29 19:23:28 +0100 |
commit | b75c2b5e651373c01f3bc2b1fbb2127620f20ecc (patch) | |
tree | d3cee83b20fa2ebb8103caa14f7afe1e91854af7 /src/game-server/abilitycomponent.cpp | |
parent | 71afa592b2df4b6a01236dd2189c9ba28c9a3fa8 (diff) | |
download | manaserv-b75c2b5e651373c01f3bc2b1fbb2127620f20ecc.tar.gz manaserv-b75c2b5e651373c01f3bc2b1fbb2127620f20ecc.tar.bz2 manaserv-b75c2b5e651373c01f3bc2b1fbb2127620f20ecc.tar.xz manaserv-b75c2b5e651373c01f3bc2b1fbb2127620f20ecc.zip |
Small cleanup
- Deleted empty constructor rather than throwing, resulting in compiletime
errors rather than runtime errors.
- Removed some remainings of currentMana
- Fixed some compiler warnings regarding structs getting forward
declared as classes.
Diffstat (limited to 'src/game-server/abilitycomponent.cpp')
-rw-r--r-- | src/game-server/abilitycomponent.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game-server/abilitycomponent.cpp b/src/game-server/abilitycomponent.cpp index 1ac82cdf..c03eb03d 100644 --- a/src/game-server/abilitycomponent.cpp +++ b/src/game-server/abilitycomponent.cpp @@ -194,7 +194,7 @@ bool AbilityComponent::useAbilityOnDirection(Entity &user, int id, /** * Allows a character to perform a ability */ -bool AbilityComponent::giveAbility(int id, int currentPoints) +bool AbilityComponent::giveAbility(int id) { if (mAbilities.find(id) == mAbilities.end()) { @@ -204,13 +204,12 @@ bool AbilityComponent::giveAbility(int id, int currentPoints) LOG_ERROR("Tried to give not existing ability id " << id << "."); return false; } - return giveAbility(abilityInfo, currentPoints); + return giveAbility(abilityInfo); } return false; } -bool AbilityComponent::giveAbility(const AbilityManager::AbilityInfo *info, - int currentPoints) +bool AbilityComponent::giveAbility(const AbilityManager::AbilityInfo *info) { bool added = mAbilities.insert(std::pair<int, AbilityValue>(info->id, AbilityValue(info))).second; |