Show
Ignore:
Timestamp:
11/19/08 13:32:21 (17 years ago)
Author:
yumileroy
Message:

[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

Original author: KingPin?
Date: 2008-10-20 12:59:45-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Level3.cpp

    r62 r79  
    2525#include "World.h" 
    2626#include "ObjectMgr.h" 
     27#include "AccountMgr.h" 
    2728#include "PlayerDump.h" 
    2829#include "SpellMgr.h" 
     
    7374    HandleReloadAllSpellCommand(""); 
    7475    HandleReloadAllItemCommand(""); 
     76    HandleReloadAllLocalesCommand(""); 
    7577 
    7678    HandleReloadCommandCommand(""); 
     
    159161} 
    160162 
     163bool ChatHandler::HandleReloadAllLocalesCommand(const char* args) 
     164{ 
     165    HandleReloadLocalesCreatureCommand("a"); 
     166    HandleReloadLocalesGameobjectCommand("a"); 
     167    HandleReloadLocalesItemCommand("a"); 
     168    HandleReloadLocalesNpcTextCommand("a"); 
     169    HandleReloadLocalesPageTextCommand("a"); 
     170    HandleReloadLocalesQuestCommand("a"); 
     171    return true; 
     172} 
     173 
    161174bool ChatHandler::HandleReloadConfigCommand(const char* arg) 
    162175{ 
     
    598611    SendGlobalSysMessage("DB table `game_tele` reloaded."); 
    599612 
     613    return true; 
     614} 
     615 
     616bool ChatHandler::HandleReloadLocalesCreatureCommand(const char* /*arg*/) 
     617{ 
     618    sLog.outString( "Re-Loading Locales Creature ..."); 
     619    objmgr.LoadCreatureLocales(); 
     620    SendGlobalSysMessage("DB table `locales_creature` reloaded."); 
     621    return true; 
     622} 
     623 
     624bool ChatHandler::HandleReloadLocalesGameobjectCommand(const char* /*arg*/) 
     625{ 
     626    sLog.outString( "Re-Loading Locales Gameobject ... "); 
     627    objmgr.LoadGameObjectLocales(); 
     628    SendGlobalSysMessage("DB table `locales_gameobject` reloaded."); 
     629    return true; 
     630} 
     631 
     632bool ChatHandler::HandleReloadLocalesItemCommand(const char* /*arg*/) 
     633{ 
     634    sLog.outString( "Re-Loading Locales Item ... "); 
     635    objmgr.LoadItemLocales(); 
     636    SendGlobalSysMessage("DB table `locales_item` reloaded."); 
     637    return true; 
     638} 
     639 
     640bool ChatHandler::HandleReloadLocalesNpcTextCommand(const char* /*arg*/) 
     641{ 
     642    sLog.outString( "Re-Loading Locales NPC Text ... "); 
     643    objmgr.LoadNpcTextLocales(); 
     644    SendGlobalSysMessage("DB table `locales_npc_text` reloaded."); 
     645    return true; 
     646} 
     647 
     648bool ChatHandler::HandleReloadLocalesPageTextCommand(const char* /*arg*/) 
     649{ 
     650    sLog.outString( "Re-Loading Locales Page Text ... "); 
     651    objmgr.LoadPageTextLocales(); 
     652    SendGlobalSysMessage("DB table `locales_page_text` reloaded."); 
     653    return true; 
     654} 
     655 
     656bool ChatHandler::HandleReloadLocalesQuestCommand(const char* /*arg*/) 
     657{ 
     658    sLog.outString( "Re-Loading Locales Quest ... "); 
     659    objmgr.LoadQuestLocales(); 
     660    SendGlobalSysMessage("DB table `locales_quest` reloaded."); 
    600661    return true; 
    601662} 
     
    655716            } 
    656717            targetAccountId = objmgr.GetPlayerAccountIdByGUID(targetGUID); 
    657             targetSecurity = objmgr.GetSecurityByAccount(targetAccountId); 
     718            targetSecurity = accmgr.GetSecurity(targetAccountId); 
    658719        } 
    659720 
     
    49555016        return false; 
    49565017 
    4957     uint32 account_id = objmgr.GetAccountByAccountName(acc); 
     5018    uint32 account_id = accmgr.GetId(acc); 
    49585019    if(!account_id) 
    49595020    { 
     
    49625023        { 
    49635024            std::string acc_name; 
    4964             if(!objmgr.GetAccountNameByAccount(account_id,acc_name)) 
     5025            if(!accmgr.GetName(account_id,acc_name)) 
    49655026                return false; 
    49665027        }