From 83e001b2ac6b450efe99810eb57f69817818012f Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Wed, 26 Aug 2015 17:05:34 +0300 Subject: [PATCH] Remove functions not to be used or cant be used and fix TC build --- LuaEngine.h | 1 - LuaFunctions.cpp | 4 ---- PlayerMethods.h | 50 +----------------------------------------------- 3 files changed, 1 insertion(+), 54 deletions(-) diff --git a/LuaEngine.h b/LuaEngine.h index 73144af..cd77e47 100644 --- a/LuaEngine.h +++ b/LuaEngine.h @@ -509,7 +509,6 @@ public: void OnConfigLoad(bool reload); void OnShutdownInitiate(ShutdownExitCode code, ShutdownMask mask); void OnShutdownCancel(); - void OnUpdate(uint32 diff); void OnStartup(); void OnShutdown(); diff --git a/LuaFunctions.cpp b/LuaFunctions.cpp index 2a295f0..9bb063b 100644 --- a/LuaFunctions.cpp +++ b/LuaFunctions.cpp @@ -458,7 +458,6 @@ ElunaRegister PlayerMethods[] = { "GetQuestLevel", &LuaPlayer::GetQuestLevel }, // :GetQuestLevel(quest) - Returns quest's level { "GetChatTag", &LuaPlayer::GetChatTag }, // :GetChatTag() - Returns player chat tag ID { "GetRestBonus", &LuaPlayer::GetRestBonus }, // :GetRestBonus() - Gets player's rest bonus - { "GetRestType", &LuaPlayer::GetRestType }, // :GetRestType() - Returns the player's rest type #ifdef WOTLK { "GetPhaseMaskForSpawn", &LuaPlayer::GetPhaseMaskForSpawn }, // :GetPhaseMaskForSpawn() - Gets the real phasemask for spawning things. Used if the player is in GM mode #endif @@ -490,7 +489,6 @@ ElunaRegister PlayerMethods[] = { "GetBattlegroundId", &LuaPlayer::GetBattlegroundId }, // :GetBattlegroundId() - Returns the player's current battleground ID { "GetBattlegroundTypeId", &LuaPlayer::GetBattlegroundTypeId }, // :GetBattlegroundTypeId() - Returns the player's current battleground type ID { "GetXPRestBonus", &LuaPlayer::GetXPRestBonus }, // :GetXPRestBonus(xp) - Returns the rested bonus XP from given XP - { "GetRestTime", &LuaPlayer::GetRestTime }, // :GetRestTime() - Returns the timed rested { "GetGroupInvite", &LuaPlayer::GetGroupInvite }, // :GetGroupInvite() - Returns the group invited to { "GetSubGroup", &LuaPlayer::GetSubGroup }, // :GetSubGroup() - Gets the player's current subgroup ID { "GetNextRandomRaidMember", &LuaPlayer::GetNextRandomRaidMember }, // :GetNextRandomRaidMember(radius) - Gets a random raid member in given radius @@ -545,7 +543,6 @@ ElunaRegister PlayerMethods[] = { "SetPvPDeath", &LuaPlayer::SetPvPDeath }, // :SetPvPDeath([on]) - Sets PvP death on or off { "SetAcceptWhispers", &LuaPlayer::SetAcceptWhispers }, // :SetAcceptWhispers([on]) - Sets whisper accepting death on or off { "SetRestBonus", &LuaPlayer::SetRestBonus }, // :SetRestBonus(bonusrate) - Sets new restbonus rate - { "SetRestType", &LuaPlayer::SetRestType }, // :SetRestType() - Sets rest type { "SetQuestStatus", &LuaPlayer::SetQuestStatus }, // :SetQuestStatus(entry, status) - Sets the quest's status { "SetReputation", &LuaPlayer::SetReputation }, // :SetReputation(faction, value) - Sets the faction reputation for the player { "SetFreeTalentPoints", &LuaPlayer::SetFreeTalentPoints }, // :SetFreeTalentPoints(points) - Sets the amount of unused talent points @@ -554,7 +551,6 @@ ElunaRegister PlayerMethods[] = { "SetSkill", &LuaPlayer::SetSkill }, // :SetSkill(skill, step, currVal, maxVal) - Sets the skill's boundaries and value { "SetFactionForRace", &LuaPlayer::SetFactionForRace }, // :SetFactionForRace(race) - Sets the faction by raceID { "SetDrunkValue", &LuaPlayer::SetDrunkValue }, // :SetDrunkValue(newDrunkValue) - Sets drunkness value - { "SetRestTime", &LuaPlayer::SetRestTime }, // :SetRestTime(value) - Sets the rested time { "SetAtLoginFlag", &LuaPlayer::SetAtLoginFlag }, // :SetAtLoginFlag(flag) - Adds an at login flag { "SetPlayerLock", &LuaPlayer::SetPlayerLock }, // :SetPlayerLock(on/off) { "SetGender", &LuaPlayer::SetGender }, // :SetGender(value) - 0 = male 1 = female diff --git a/PlayerMethods.h b/PlayerMethods.h index 7557721..9856c0f 100644 --- a/PlayerMethods.h +++ b/PlayerMethods.h @@ -577,7 +577,7 @@ namespace LuaPlayer */ int IsRested(Eluna* /*E*/, lua_State* L, Player* player) { - Eluna::Push(L, player->isRested()); + Eluna::Push(L, player->GetRestBonus() > 0.0f); return 1; } @@ -875,17 +875,6 @@ namespace LuaPlayer return 1; } - /** - * Returns the [Player]s current accumulated rest time - * - * @return uint32 restTime - */ - int GetRestTime(Eluna* /*E*/, lua_State* L, Player* player) - { - Eluna::Push(L, player->GetRestTime()); - return 1; - } - int GetXPRestBonus(Eluna* /*E*/, lua_State* L, Player* player) { uint32 xp = Eluna::CHECKVAL(L, 2); @@ -1178,17 +1167,6 @@ namespace LuaPlayer return 1; } - /** - * Returns the [Player]s resting type - * - * @return [RestType] restType - */ - int GetRestType(Eluna* /*E*/, lua_State* L, Player* player) - { - Eluna::Push(L, player->GetRestType()); - return 1; - } - /** * Returns the [Player]s current resting bonus * @@ -1557,19 +1535,6 @@ namespace LuaPlayer return 0; } - /** - * Sets the [Player]s rested time to the time specified - * - * @param uint32 restTime - */ - int SetRestTime(Eluna* /*E*/, lua_State* L, Player* player) - { - uint32 value = Eluna::CHECKVAL(L, 2); - - player->SetRestTime(value); - return 0; - } - /** * Sets the [Player]s intoxication level to the level specified * @@ -1666,19 +1631,6 @@ namespace LuaPlayer return 0; } - /** - * Sets the [Player]s rest type to the type specified - * - * @param int restType - */ - int SetRestType(Eluna* /*E*/, lua_State* L, Player* player) - { - int type = Eluna::CHECKVAL(L, 2); - - player->SetRestType((RestType)type); - return 0; - } - /** * Sets the [Player]s rest bonus to the amount specified *