mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
[svn] * Minor code fixes
* Move account related functions from ObjectMgr to AccountMgr and drop duplicate functions - source mangos * recognize the dummy spells 38637, 38638 and 38639 as negative - source mangos * added new command ".reload all_locales". Now all locales_* tables can be reloaded - source mangos --HG-- branch : trunk
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "WorldSession.h"
|
||||
#include "World.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "PlayerDump.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Player.h"
|
||||
@@ -72,6 +73,7 @@ bool ChatHandler::HandleReloadAllCommand(const char*)
|
||||
HandleReloadAllQuestCommand("");
|
||||
HandleReloadAllSpellCommand("");
|
||||
HandleReloadAllItemCommand("");
|
||||
HandleReloadAllLocalesCommand("");
|
||||
|
||||
HandleReloadCommandCommand("");
|
||||
HandleReloadReservedNameCommand("");
|
||||
@@ -158,6 +160,17 @@ bool ChatHandler::HandleReloadAllItemCommand(const char*)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadAllLocalesCommand(const char* args)
|
||||
{
|
||||
HandleReloadLocalesCreatureCommand("a");
|
||||
HandleReloadLocalesGameobjectCommand("a");
|
||||
HandleReloadLocalesItemCommand("a");
|
||||
HandleReloadLocalesNpcTextCommand("a");
|
||||
HandleReloadLocalesPageTextCommand("a");
|
||||
HandleReloadLocalesQuestCommand("a");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadConfigCommand(const char* arg)
|
||||
{
|
||||
sLog.outString( "Re-Loading config settings..." );
|
||||
@@ -600,6 +613,54 @@ bool ChatHandler::HandleReloadGameTeleCommand(const char* /*arg*/)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadLocalesCreatureCommand(const char* /*arg*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading Locales Creature ...");
|
||||
objmgr.LoadCreatureLocales();
|
||||
SendGlobalSysMessage("DB table `locales_creature` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadLocalesGameobjectCommand(const char* /*arg*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading Locales Gameobject ... ");
|
||||
objmgr.LoadGameObjectLocales();
|
||||
SendGlobalSysMessage("DB table `locales_gameobject` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadLocalesItemCommand(const char* /*arg*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading Locales Item ... ");
|
||||
objmgr.LoadItemLocales();
|
||||
SendGlobalSysMessage("DB table `locales_item` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadLocalesNpcTextCommand(const char* /*arg*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading Locales NPC Text ... ");
|
||||
objmgr.LoadNpcTextLocales();
|
||||
SendGlobalSysMessage("DB table `locales_npc_text` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadLocalesPageTextCommand(const char* /*arg*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading Locales Page Text ... ");
|
||||
objmgr.LoadPageTextLocales();
|
||||
SendGlobalSysMessage("DB table `locales_page_text` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadLocalesQuestCommand(const char* /*arg*/)
|
||||
{
|
||||
sLog.outString( "Re-Loading Locales Quest ... ");
|
||||
objmgr.LoadQuestLocales();
|
||||
SendGlobalSysMessage("DB table `locales_quest` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleLoadScriptsCommand(const char* args)
|
||||
{
|
||||
if(!LoadScriptingModule(args)) return true;
|
||||
@@ -654,7 +715,7 @@ bool ChatHandler::HandleSecurityCommand(const char* args)
|
||||
return false;
|
||||
}
|
||||
targetAccountId = objmgr.GetPlayerAccountIdByGUID(targetGUID);
|
||||
targetSecurity = objmgr.GetSecurityByAccount(targetAccountId);
|
||||
targetSecurity = accmgr.GetSecurity(targetAccountId);
|
||||
}
|
||||
|
||||
arg2 = strtok(NULL, " ");
|
||||
@@ -4954,14 +5015,14 @@ bool ChatHandler::HandleLoadPDumpCommand(const char *args)
|
||||
if(!file || !acc)
|
||||
return false;
|
||||
|
||||
uint32 account_id = objmgr.GetAccountByAccountName(acc);
|
||||
uint32 account_id = accmgr.GetId(acc);
|
||||
if(!account_id)
|
||||
{
|
||||
account_id = atoi(acc);
|
||||
if(account_id)
|
||||
{
|
||||
std::string acc_name;
|
||||
if(!objmgr.GetAccountNameByAccount(account_id,acc_name))
|
||||
if(!accmgr.GetName(account_id,acc_name))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user