summaryrefslogtreecommitdiff
path: root/src/scripting
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@gmail.com>2013-12-29 19:21:33 +0100
committerErik Schilling <ablu.erikschilling@gmail.com>2013-12-29 19:23:28 +0100
commitb75c2b5e651373c01f3bc2b1fbb2127620f20ecc (patch)
treed3cee83b20fa2ebb8103caa14f7afe1e91854af7 /src/scripting
parent71afa592b2df4b6a01236dd2189c9ba28c9a3fa8 (diff)
downloadmanaserv-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/scripting')
-rw-r--r--src/scripting/lua.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp
index 2c61f95d..a6a68cf4 100644
--- a/src/scripting/lua.cpp
+++ b/src/scripting/lua.cpp
@@ -2258,17 +2258,14 @@ static int entity_show_text_particle(lua_State *s)
**
* Valid only for character and monster entities.
*
- * Enables a ability for a character.
+ * Enables an ability for a character.
*/
static int entity_give_ability(lua_State *s)
{
- // cost_type is ignored until we have more than one cost type
Entity *b = checkBeing(s, 1);
auto *abilityInfo = checkAbility(s, 2);
- const int currentMana = luaL_optint(s, 3, 0);
- b->getComponent<AbilityComponent>()->giveAbility(abilityInfo->id,
- currentMana);
+ b->getComponent<AbilityComponent>()->giveAbility(abilityInfo->id);
return 0;
}