Instructions Jenkins Doxygen

[Added] getForcePower, getForcePowerMax and setForcePower methods to 74/874/1
authorLoshult <loshult@swgemu.com>
Wed, 2 Oct 2013 19:45:23 +0000 (19:45 +0000)
committerLoshult <loshult@swgemu.com>
Wed, 2 Oct 2013 19:46:00 +0000 (19:46 +0000)
LuaPlayerObject.
[Added] checkCooldownRecovery and addCooldown methods to
LuaCreatureObject.

Change-Id: Ied46967ec7401ba4e1dec68899f344310d0a9ef2

MMOCoreORB/src/server/zone/objects/creature/LuaCreatureObject.cpp
MMOCoreORB/src/server/zone/objects/creature/LuaCreatureObject.h
MMOCoreORB/src/server/zone/objects/player/LuaPlayerObject.cpp
MMOCoreORB/src/server/zone/objects/player/LuaPlayerObject.h

index aad61c6..66372b1 100644 (file)
@@ -84,6 +84,8 @@ Luna<LuaCreatureObject>::RegType LuaCreatureObject::Register[] = {
                { "setPvpStatusBitmask", &LuaCreatureObject::setPvpStatusBitmask},
                { "addDotState", &LuaCreatureObject::addDotState},
                { "getSlottedObject", &LuaSceneObject::getSlottedObject},
+               { "checkCooldownRecovery", &LuaCreatureObject::checkCooldownRecovery},
+               { "addCooldown", &LuaCreatureObject::addCooldown},
                { 0, 0 }
 };
 
@@ -572,3 +574,20 @@ int LuaCreatureObject::getGroupMember(lua_State* L) {
 
        return 1;
 }
+
+int LuaCreatureObject::checkCooldownRecovery(lua_State* L) {
+       String cooldownName = lua_tostring(L, -1);
+
+       lua_pushboolean(L, realObject->checkCooldownRecovery(cooldownName));
+
+       return 1;
+}
+
+int LuaCreatureObject::addCooldown(lua_State* L) {
+       String cooldownName = lua_tostring(L, -2);
+       int milliseconds = lua_tointeger(L, -1);
+
+       realObject->addCooldown(cooldownName, milliseconds);
+
+       return 0;
+}
index d7ad401..b62818b 100644 (file)
@@ -80,6 +80,8 @@ namespace creature {
                int getGroupMember(lua_State* L);
                int setOptionsBitmask(lua_State* L);
                int addDotState(lua_State* L);
+               int checkCooldownRecovery(lua_State* L);
+               int addCooldown(lua_State* L);
 
        private:
                // The pointer to the 'real object' defined in object.cc
index 59a9e50..69405e4 100644 (file)
@@ -32,6 +32,10 @@ Luna<LuaPlayerObject>::RegType LuaPlayerObject::Register[] = {
                { "hasBadge", &LuaPlayerObject::hasBadge },
                { "addHologrindProfession", &LuaPlayerObject::addHologrindProfession },
                { "getHologrindProfessions", &LuaPlayerObject::getHologrindProfessions },
+               { "getForcePower", &LuaPlayerObject::getForcePower },
+               { "getForcePowerMax", &LuaPlayerObject::getForcePowerMax },
+               { "setForcePower", &LuaPlayerObject::setForcePower },
+               { "isJedi", &LuaPlayerObject::isJedi },
                { 0, 0 }
 };
 
@@ -225,3 +229,29 @@ int LuaPlayerObject::getHologrindProfessions(lua_State* L) {
 
        return 1;
 }
+
+int LuaPlayerObject::getForcePower(lua_State* L) {
+       lua_pushinteger(L, realObject->getForcePower());
+
+       return 1;
+}
+
+int LuaPlayerObject::getForcePowerMax(lua_State* L) {
+       lua_pushinteger(L, realObject->getForcePowerMax());
+
+       return 1;
+}
+
+int LuaPlayerObject::setForcePower(lua_State* L) {
+       int forcePower = lua_tointeger(L, -1);
+
+       realObject->setForcePower(forcePower, true);
+
+       return 0;
+}
+
+int LuaPlayerObject::isJedi(lua_State* L) {
+       lua_pushboolean(L, realObject->isJedi());
+
+       return 1;
+}
index 66b0b96..e53bf8d 100644 (file)
@@ -42,6 +42,10 @@ public:
        int hasBadge(lua_State* L);
        int addHologrindProfession(lua_State* L);
        int getHologrindProfessions(lua_State* L);
+       int getForcePower(lua_State* L);
+       int getForcePowerMax(lua_State* L);
+       int setForcePower(lua_State* L);
+       int isJedi(lua_State* L);
 
 private:
        // The pointer to the 'real object' defined in object.cc