From dfdc19f3bc57757965d1d3b760a27622e411eb05 Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 13 Jul 2014 16:52:38 -0500 Subject: Merge branch `master` into `boost` Conflicts: BattlegroundMgr.h --- src/server/scripts/Commands/cs_account.cpp | 4 ++-- src/server/scripts/Commands/cs_learn.cpp | 18 +++++++++--------- src/server/scripts/Commands/cs_reload.cpp | 11 +++++++++++ src/server/scripts/Commands/cs_reset.cpp | 4 ++-- 4 files changed, 24 insertions(+), 13 deletions(-) (limited to 'src/server/scripts/Commands') diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 1121e4d0a2f..4b7aa8ecad3 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -51,8 +51,8 @@ public: }; static ChatCommand accountLockCommandTable[] = { - { "country", rbac::RBAC_PERM_COMMAND_ACCOUNT_LOCK_COUNTRY, true, &HandleAccountLockCountryCommand, "", NULL }, - { "ip", rbac::RBAC_PERM_COMMAND_ACCOUNT_LOCK_IP, true, &HandleAccountLockIpCommand, "", NULL }, + { "country", rbac::RBAC_PERM_COMMAND_ACCOUNT_LOCK_COUNTRY, false, &HandleAccountLockCountryCommand, "", NULL }, + { "ip", rbac::RBAC_PERM_COMMAND_ACCOUNT_LOCK_IP, false, &HandleAccountLockIpCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; static ChatCommand accountCommandTable[] = diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 03d10149ae5..88acd491427 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -112,9 +112,9 @@ public: } if (allRanks) - targetPlayer->learnSpellHighRank(spell); + targetPlayer->LearnSpellHighestRank(spell); else - targetPlayer->learnSpell(spell, false); + targetPlayer->LearnSpell(spell, false); if (GetTalentSpellCost(spellInfo->GetFirstRankSpell()->Id)) targetPlayer->SendTalentsInfoData(false); @@ -133,7 +133,7 @@ public: if (!spellInfo->IsAbilityOfSkillType(SKILL_INTERNAL)) continue; - handler->GetSession()->GetPlayer()->learnSpell(i, false); + handler->GetSession()->GetPlayer()->LearnSpell(i, false); } handler->SendSysMessage(LANG_LEARNING_GM_SKILLS); @@ -184,7 +184,7 @@ public: if (!SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false)) continue; - handler->GetSession()->GetPlayer()->learnSpell(spellInfo->Id, false); + handler->GetSession()->GetPlayer()->LearnSpell(spellInfo->Id, false); } handler->SendSysMessage(LANG_COMMAND_LEARN_CLASS_SPELLS); @@ -228,7 +228,7 @@ public: continue; // learn highest rank of talent and learn all non-talent spell ranks (recursive by tree) - player->learnSpellHighRank(spellId); + player->LearnSpellHighestRank(spellId); player->AddTalent(spellId, player->GetActiveSpec(), true); } @@ -320,7 +320,7 @@ public: { // skipping UNIVERSAL language (0) for (uint8 i = 1; i < LANGUAGES_COUNT; ++i) - handler->GetSession()->GetPlayer()->learnSpell(lang_description[i].spell_id, false); + handler->GetSession()->GetPlayer()->LearnSpell(lang_description[i].spell_id, false); handler->SendSysMessage(LANG_COMMAND_LEARN_ALL_LANG); return true; @@ -334,7 +334,7 @@ public: target->LearnDefaultSkills(); target->LearnCustomSpells(); - target->learnQuestRewardedSpells(); + target->LearnQuestRewardedSpells(); handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_DEFAULT_AND_QUEST, handler->GetNameLink(target).c_str()); return true; @@ -470,7 +470,7 @@ public: if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false)) continue; - player->learnSpell(skillLine->spellId, false); + player->LearnSpell(skillLine->spellId, false); } } @@ -499,7 +499,7 @@ public: spellId = sSpellMgr->GetFirstSpellInChain(spellId); if (target->HasSpell(spellId)) - target->removeSpell(spellId, false, !allRanks); + target->RemoveSpell(spellId, false, !allRanks); else handler->SendSysMessage(LANG_FORGET_SPELL); diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 89dc08d5737..f39dd0f0616 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "AccountMgr.h" #include "AchievementMgr.h" #include "AuctionHouseMgr.h" +#include "BattlegroundMgr.h" #include "Chat.h" #include "CreatureTextMgr.h" #include "DisableMgr.h" @@ -74,6 +75,7 @@ public: { "areatrigger_tavern", rbac::RBAC_PERM_COMMAND_RELOAD_AREATRIGGER_TAVERN, true, &HandleReloadAreaTriggerTavernCommand, "", NULL }, { "areatrigger_teleport", rbac::RBAC_PERM_COMMAND_RELOAD_AREATRIGGER_TELEPORT, true, &HandleReloadAreaTriggerTeleportCommand, "", NULL }, { "autobroadcast", rbac::RBAC_PERM_COMMAND_RELOAD_AUTOBROADCAST, true, &HandleReloadAutobroadcastCommand, "", NULL }, + { "battleground_template", rbac::RBAC_PERM_COMMAND_RELOAD_BATTLEGROUND_TEMPLATE, true, &HandleReloadBattlegroundTemplate, "", NULL }, { "broadcast_text", rbac::RBAC_PERM_COMMAND_RELOAD_BROADCAST_TEXT, true, &HandleReloadBroadcastTextCommand, "", NULL }, { "command", rbac::RBAC_PERM_COMMAND_RELOAD_COMMAND, true, &HandleReloadCommandCommand, "", NULL }, { "conditions", rbac::RBAC_PERM_COMMAND_RELOAD_CONDITIONS, true, &HandleReloadConditions, "", NULL }, @@ -200,6 +202,7 @@ public: HandleReloadVehicleTemplateAccessoryCommand(handler, ""); HandleReloadAutobroadcastCommand(handler, ""); + HandleReloadBattlegroundTemplate(handler, ""); return true; } @@ -376,6 +379,14 @@ public: return true; } + static bool HandleReloadBattlegroundTemplate(ChatHandler* handler, char const* /*args*/) + { + TC_LOG_INFO("misc", "Re-Loading Battleground Templates..."); + sBattlegroundMgr->LoadBattlegroundTemplates(); + handler->SendGlobalGMSysMessage("DB table `battleground_template` reloaded."); + return true; + } + static bool HandleReloadBroadcastTextCommand(ChatHandler* handler, const char* /*args*/) { TC_LOG_INFO("misc", "Re-Loading Broadcast texts..."); diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index 279f9c2ef4c..00a669609f9 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -165,7 +165,7 @@ public: if (target) { - target->resetSpells(/* bool myClassOnly */); + target->ResetSpells(/* bool myClassOnly */); ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_SPELLS); if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) @@ -233,7 +233,7 @@ public: if (target) { - target->resetTalents(true); + target->ResetTalents(true); target->SendTalentsInfoData(false); ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_TALENTS); if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target) -- cgit v1.2.3