mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-14 16:03:45 +00:00
feat(Core/Logging): rework logging (#4692)
* feat(Core/Logging): rework logging * correct level for sql.sql * del unused config options * Correct build * correct after merge * whitespace 20:29:37 1. 'Player.cpp'. Replace (1) 20:29:37 2. 'ObjectMgr.cpp'. Replace (3) * 1 * correct logging * correct affter merge * 1 * 2 * LOG_LEVEL_WARN * #include "AppenderDB.h" * 3 * 4 * 5 * 1. 'WorldSocket.cpp'. Replace (1) * 6 * 1
This commit is contained in:
@@ -104,7 +104,7 @@ public:
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName);
|
||||
if (handler->GetSession())
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_WARDEN, "Account: %d (IP: %s) Character:[%s] (GUID: %u) Change Password.",
|
||||
LOG_DEBUG("warden", "Account: %d (IP: %s) Character:[%s] (GUID: %u) Change Password.",
|
||||
handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(),
|
||||
handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow());
|
||||
}
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage("[IP2NATION] Table empty");
|
||||
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "[IP2NATION] Table empty");
|
||||
;//LOG_DEBUG("network", "[IP2NATION] Table empty");
|
||||
}
|
||||
}
|
||||
else if (param == "off")
|
||||
|
||||
@@ -417,7 +417,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outError("Sending opcode that has unknown type '%s'", type.c_str());
|
||||
LOG_ERROR("server", "Sending opcode that has unknown type '%s'", type.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1372,7 +1372,7 @@ public:
|
||||
{
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
|
||||
sLog->outSQLDev("(@PATH, XX, %.3f, %.3f, %.5f, 0,0, 0,100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
|
||||
LOG_INFO("sql.dev", "(@PATH, XX, %.3f, %.3f, %.5f, 0,0, 0,100, 0),", player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
|
||||
|
||||
handler->PSendSysMessage("Waypoint SQL written to SQL Developer log");
|
||||
return true;
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
if (objectInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(objectInfo->displayId))
|
||||
{
|
||||
// report to DB errors log as in loading case
|
||||
sLog->outErrorDb("Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.", objectId, objectInfo->type, objectInfo->displayId);
|
||||
LOG_ERROR("sql.sql", "Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.", objectId, objectInfo->type, objectInfo->displayId);
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_HAVE_INVALID_DATA, objectId);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
|
||||
@@ -1462,7 +1462,7 @@ public:
|
||||
playerTarget = player;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail(handler->GetAcoreString(LANG_ADDITEM), itemId, count);
|
||||
LOG_DEBUG("server", handler->GetAcoreString(LANG_ADDITEM), itemId, count);
|
||||
#endif
|
||||
|
||||
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(itemId);
|
||||
@@ -1566,7 +1566,7 @@ public:
|
||||
playerTarget = player;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail(handler->GetAcoreString(LANG_ADDITEMSET), itemSetId);
|
||||
LOG_DEBUG("server", handler->GetAcoreString(LANG_ADDITEMSET), itemSetId);
|
||||
#endif
|
||||
|
||||
bool found = false;
|
||||
@@ -2873,7 +2873,7 @@ public:
|
||||
|
||||
if (!pet->InitStatsForLevel(creatureTarget->getLevel()))
|
||||
{
|
||||
sLog->outError("InitStatsForLevel() in EffectTameCreature failed! Pet deleted.");
|
||||
LOG_ERROR("server", "InitStatsForLevel() in EffectTameCreature failed! Pet deleted.");
|
||||
handler->PSendSysMessage("Error 2");
|
||||
delete pet;
|
||||
return false;
|
||||
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
target->SetPower(POWER_ENERGY, energy);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail(handler->GetAcoreString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY));
|
||||
LOG_DEBUG("server", handler->GetAcoreString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY));
|
||||
#endif
|
||||
|
||||
return true;
|
||||
@@ -1015,7 +1015,7 @@ public:
|
||||
int32 newmoney = int32(targetMoney) + moneyToAdd;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, handler->GetAcoreString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
|
||||
LOG_DEBUG("chat.system", handler->GetAcoreString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
|
||||
#endif
|
||||
if (newmoney <= 0)
|
||||
{
|
||||
@@ -1052,7 +1052,7 @@ public:
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_CHATSYS, handler->GetAcoreString(LANG_NEW_MONEY), targetMoney, moneyToAdd, target->GetMoney());
|
||||
LOG_DEBUG("chat.system", handler->GetAcoreString(LANG_NEW_MONEY), targetMoney, moneyToAdd, target->GetMoney());
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
||||
@@ -976,7 +976,7 @@ public:
|
||||
|
||||
if (dontdel_str)
|
||||
{
|
||||
//sLog->outError("DEBUG: All 3 params are set");
|
||||
//LOG_ERROR("server", "DEBUG: All 3 params are set");
|
||||
|
||||
// All 3 params are set
|
||||
// GUID
|
||||
@@ -984,7 +984,7 @@ public:
|
||||
// doNotDEL
|
||||
if (stricmp(dontdel_str, "NODEL") == 0)
|
||||
{
|
||||
//sLog->outError("DEBUG: doNotDelete = true;");
|
||||
//LOG_ERROR("server", "DEBUG: doNotDelete = true;");
|
||||
doNotDelete = true;
|
||||
}
|
||||
}
|
||||
@@ -993,10 +993,10 @@ public:
|
||||
// Only 2 params - but maybe NODEL is set
|
||||
if (type_str)
|
||||
{
|
||||
sLog->outError("DEBUG: Only 2 params ");
|
||||
LOG_ERROR("server", "DEBUG: Only 2 params ");
|
||||
if (stricmp(type_str, "NODEL") == 0)
|
||||
{
|
||||
//sLog->outError("DEBUG: type_str, NODEL ");
|
||||
//LOG_ERROR("server", "DEBUG: type_str, NODEL ");
|
||||
doNotDelete = true;
|
||||
type_str = nullptr;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
static bool HandleReloadBattlegroundTemplate(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Battleground Templates...");
|
||||
LOG_INFO("server", "Re-Loading Battleground Templates...");
|
||||
sBattlegroundMgr->CreateInitialBattlegrounds();
|
||||
handler->SendGlobalGMSysMessage("DB table `battleground_template` reloaded.");
|
||||
return true;
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
|
||||
static bool HandleReloadAllLootCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables...");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables...");
|
||||
LoadLootTables();
|
||||
handler->SendGlobalGMSysMessage("DB tables `*_loot_template` reloaded.");
|
||||
sConditionMgr->LoadConditions(true);
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
HandleReloadQuestPOICommand(handler, "a");
|
||||
HandleReloadQuestTemplateCommand(handler, "a");
|
||||
|
||||
sLog->outString("Re-Loading Quests Relations...");
|
||||
LOG_INFO("server", "Re-Loading Quests Relations...");
|
||||
sObjectMgr->LoadQuestStartersAndEnders();
|
||||
handler->SendGlobalGMSysMessage("DB tables `*_queststarter` and `*_questender` reloaded.");
|
||||
return true;
|
||||
@@ -256,7 +256,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
sLog->outString("Re-Loading Scripts...");
|
||||
LOG_INFO("server", "Re-Loading Scripts...");
|
||||
HandleReloadEventScriptsCommand(handler, "a");
|
||||
HandleReloadSpellScriptsCommand(handler, "a");
|
||||
handler->SendGlobalGMSysMessage("DB tables `*_scripts` reloaded.");
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
|
||||
static bool HandleReloadConfigCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading config settings...");
|
||||
LOG_INFO("server", "Re-Loading config settings...");
|
||||
sWorld->LoadConfigSettings(true);
|
||||
sMapMgr->InitializeVisibilityDistanceInfo();
|
||||
handler->SendGlobalGMSysMessage("World config settings reloaded.");
|
||||
@@ -327,7 +327,7 @@ public:
|
||||
|
||||
static bool HandleReloadDungeonAccessCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Dungeon Access Requirement definitions...");
|
||||
LOG_INFO("server", "Re-Loading Dungeon Access Requirement definitions...");
|
||||
sObjectMgr->LoadAccessRequirements();
|
||||
handler->SendGlobalGMSysMessage("DB tables `dungeon_access_template` AND `dungeon_access_requirements` reloaded.");
|
||||
return true;
|
||||
@@ -335,7 +335,7 @@ public:
|
||||
|
||||
static bool HandleReloadAchievementCriteriaDataCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Additional Achievement Criteria Data...");
|
||||
LOG_INFO("server", "Re-Loading Additional Achievement Criteria Data...");
|
||||
sAchievementMgr->LoadAchievementCriteriaData();
|
||||
handler->SendGlobalGMSysMessage("DB table `achievement_criteria_data` reloaded.");
|
||||
return true;
|
||||
@@ -343,7 +343,7 @@ public:
|
||||
|
||||
static bool HandleReloadAchievementRewardCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Achievement Reward Data...");
|
||||
LOG_INFO("server", "Re-Loading Achievement Reward Data...");
|
||||
sAchievementMgr->LoadRewards();
|
||||
handler->SendGlobalGMSysMessage("DB table `achievement_reward` reloaded.");
|
||||
return true;
|
||||
@@ -351,7 +351,7 @@ public:
|
||||
|
||||
static bool HandleReloadAreaTriggerTavernCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Tavern Area Triggers...");
|
||||
LOG_INFO("server", "Re-Loading Tavern Area Triggers...");
|
||||
sObjectMgr->LoadTavernAreaTriggers();
|
||||
handler->SendGlobalGMSysMessage("DB table `areatrigger_tavern` reloaded.");
|
||||
return true;
|
||||
@@ -359,7 +359,7 @@ public:
|
||||
|
||||
static bool HandleReloadAreaTriggerCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Area Trigger definitions...");
|
||||
LOG_INFO("server", "Re-Loading Area Trigger definitions...");
|
||||
sObjectMgr->LoadAreaTriggers();
|
||||
handler->SendGlobalGMSysMessage("DB table `areatrigger` reloaded.");
|
||||
return true;
|
||||
@@ -367,7 +367,7 @@ public:
|
||||
|
||||
static bool HandleReloadAreaTriggerTeleportCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Area Trigger teleport definitions...");
|
||||
LOG_INFO("server", "Re-Loading Area Trigger teleport definitions...");
|
||||
sObjectMgr->LoadAreaTriggerTeleports();
|
||||
handler->SendGlobalGMSysMessage("DB table `areatrigger_teleport` reloaded.");
|
||||
return true;
|
||||
@@ -375,7 +375,7 @@ public:
|
||||
|
||||
static bool HandleReloadAutobroadcastCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Autobroadcasts...");
|
||||
LOG_INFO("server", "Re-Loading Autobroadcasts...");
|
||||
sWorld->LoadAutobroadcasts();
|
||||
handler->SendGlobalGMSysMessage("DB table `autobroadcast` reloaded.");
|
||||
return true;
|
||||
@@ -383,7 +383,7 @@ public:
|
||||
|
||||
static bool HandleReloadBroadcastTextCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Broadcast texts...");
|
||||
LOG_INFO("server", "Re-Loading Broadcast texts...");
|
||||
sObjectMgr->LoadBroadcastTexts();
|
||||
sObjectMgr->LoadBroadcastTextLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `broadcast_text` reloaded.");
|
||||
@@ -399,7 +399,7 @@ public:
|
||||
|
||||
static bool HandleReloadOnKillReputationCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading creature award reputation definitions...");
|
||||
LOG_INFO("server", "Re-Loading creature award reputation definitions...");
|
||||
sObjectMgr->LoadReputationOnKill();
|
||||
handler->SendGlobalGMSysMessage("DB table `creature_onkill_reputation` reloaded.");
|
||||
return true;
|
||||
@@ -433,7 +433,7 @@ public:
|
||||
continue;
|
||||
}
|
||||
|
||||
sLog->outString("Reloading creature template entry %u", entry);
|
||||
LOG_INFO("server", "Reloading creature template entry %u", entry);
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
@@ -447,7 +447,7 @@ public:
|
||||
|
||||
static bool HandleReloadCreatureQuestStarterCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Loading Quests Relations... (`creature_queststarter`)");
|
||||
LOG_INFO("server", "Loading Quests Relations... (`creature_queststarter`)");
|
||||
sObjectMgr->LoadCreatureQuestStarters();
|
||||
handler->SendGlobalGMSysMessage("DB table `creature_queststarter` reloaded.");
|
||||
return true;
|
||||
@@ -455,7 +455,7 @@ public:
|
||||
|
||||
static bool HandleReloadLinkedRespawnCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Loading Linked Respawns... (`creature_linked_respawn`)");
|
||||
LOG_INFO("server", "Loading Linked Respawns... (`creature_linked_respawn`)");
|
||||
sObjectMgr->LoadLinkedRespawn();
|
||||
handler->SendGlobalGMSysMessage("DB table `creature_linked_respawn` (creature linked respawns) reloaded.");
|
||||
return true;
|
||||
@@ -463,7 +463,7 @@ public:
|
||||
|
||||
static bool HandleReloadCreatureQuestEnderCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Loading Quests Relations... (`creature_questender`)");
|
||||
LOG_INFO("server", "Loading Quests Relations... (`creature_questender`)");
|
||||
sObjectMgr->LoadCreatureQuestEnders();
|
||||
handler->SendGlobalGMSysMessage("DB table `creature_questender` reloaded.");
|
||||
return true;
|
||||
@@ -471,7 +471,7 @@ public:
|
||||
|
||||
static bool HandleReloadGossipMenuCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading `gossip_menu` Table!");
|
||||
LOG_INFO("server", "Re-Loading `gossip_menu` Table!");
|
||||
sObjectMgr->LoadGossipMenu();
|
||||
handler->SendGlobalGMSysMessage("DB table `gossip_menu` reloaded.");
|
||||
sConditionMgr->LoadConditions(true);
|
||||
@@ -480,7 +480,7 @@ public:
|
||||
|
||||
static bool HandleReloadGossipMenuOptionCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading `gossip_menu_option` Table!");
|
||||
LOG_INFO("server", "Re-Loading `gossip_menu_option` Table!");
|
||||
sObjectMgr->LoadGossipMenuItems();
|
||||
handler->SendGlobalGMSysMessage("DB table `gossip_menu_option` reloaded.");
|
||||
sConditionMgr->LoadConditions(true);
|
||||
@@ -489,7 +489,7 @@ public:
|
||||
|
||||
static bool HandleReloadGOQuestStarterCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Loading Quests Relations... (`gameobject_queststarter`)");
|
||||
LOG_INFO("server", "Loading Quests Relations... (`gameobject_queststarter`)");
|
||||
sObjectMgr->LoadGameobjectQuestStarters();
|
||||
handler->SendGlobalGMSysMessage("DB table `gameobject_queststarter` reloaded.");
|
||||
return true;
|
||||
@@ -497,7 +497,7 @@ public:
|
||||
|
||||
static bool HandleReloadGOQuestEnderCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Loading Quests Relations... (`gameobject_questender`)");
|
||||
LOG_INFO("server", "Loading Quests Relations... (`gameobject_questender`)");
|
||||
sObjectMgr->LoadGameobjectQuestEnders();
|
||||
handler->SendGlobalGMSysMessage("DB table `gameobject_questender` reloaded.");
|
||||
return true;
|
||||
@@ -505,7 +505,7 @@ public:
|
||||
|
||||
static bool HandleReloadQuestAreaTriggersCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Quest Area Triggers...");
|
||||
LOG_INFO("server", "Re-Loading Quest Area Triggers...");
|
||||
sObjectMgr->LoadQuestAreaTriggers();
|
||||
handler->SendGlobalGMSysMessage("DB table `areatrigger_involvedrelation` (quest area triggers) reloaded.");
|
||||
return true;
|
||||
@@ -513,12 +513,12 @@ public:
|
||||
|
||||
static bool HandleReloadQuestTemplateCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Quest Templates...");
|
||||
LOG_INFO("server", "Re-Loading Quest Templates...");
|
||||
sObjectMgr->LoadQuests();
|
||||
handler->SendGlobalGMSysMessage("DB table `quest_template` (quest definitions) reloaded.");
|
||||
|
||||
/// dependent also from `gameobject` but this table not reloaded anyway
|
||||
sLog->outString("Re-Loading GameObjects for quests...");
|
||||
LOG_INFO("server", "Re-Loading GameObjects for quests...");
|
||||
sObjectMgr->LoadGameObjectForQuests();
|
||||
handler->SendGlobalGMSysMessage("Data GameObjects for quests reloaded.");
|
||||
return true;
|
||||
@@ -526,7 +526,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesCreatureCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`creature_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`creature_loot_template`)");
|
||||
LoadLootTemplates_Creature();
|
||||
LootTemplates_Creature.CheckLootRefs();
|
||||
handler->SendGlobalGMSysMessage("DB table `creature_loot_template` reloaded.");
|
||||
@@ -536,7 +536,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesDisenchantCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`disenchant_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`disenchant_loot_template`)");
|
||||
LoadLootTemplates_Disenchant();
|
||||
LootTemplates_Disenchant.CheckLootRefs();
|
||||
handler->SendGlobalGMSysMessage("DB table `disenchant_loot_template` reloaded.");
|
||||
@@ -546,7 +546,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesFishingCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`fishing_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`fishing_loot_template`)");
|
||||
LoadLootTemplates_Fishing();
|
||||
LootTemplates_Fishing.CheckLootRefs();
|
||||
handler->SendGlobalGMSysMessage("DB table `fishing_loot_template` reloaded.");
|
||||
@@ -556,7 +556,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesGameobjectCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`gameobject_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`gameobject_loot_template`)");
|
||||
LoadLootTemplates_Gameobject();
|
||||
LootTemplates_Gameobject.CheckLootRefs();
|
||||
handler->SendGlobalGMSysMessage("DB table `gameobject_loot_template` reloaded.");
|
||||
@@ -566,7 +566,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesItemCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`item_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`item_loot_template`)");
|
||||
LoadLootTemplates_Item();
|
||||
LootTemplates_Item.CheckLootRefs();
|
||||
handler->SendGlobalGMSysMessage("DB table `item_loot_template` reloaded.");
|
||||
@@ -576,7 +576,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesMillingCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`milling_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`milling_loot_template`)");
|
||||
LoadLootTemplates_Milling();
|
||||
LootTemplates_Milling.CheckLootRefs();
|
||||
handler->SendGlobalGMSysMessage("DB table `milling_loot_template` reloaded.");
|
||||
@@ -586,7 +586,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesPickpocketingCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`pickpocketing_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`pickpocketing_loot_template`)");
|
||||
LoadLootTemplates_Pickpocketing();
|
||||
LootTemplates_Pickpocketing.CheckLootRefs();
|
||||
handler->SendGlobalGMSysMessage("DB table `pickpocketing_loot_template` reloaded.");
|
||||
@@ -596,7 +596,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesProspectingCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`prospecting_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`prospecting_loot_template`)");
|
||||
LoadLootTemplates_Prospecting();
|
||||
LootTemplates_Prospecting.CheckLootRefs();
|
||||
handler->SendGlobalGMSysMessage("DB table `prospecting_loot_template` reloaded.");
|
||||
@@ -606,7 +606,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesMailCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`mail_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`mail_loot_template`)");
|
||||
LoadLootTemplates_Mail();
|
||||
LootTemplates_Mail.CheckLootRefs();
|
||||
handler->SendGlobalGMSysMessage("DB table `mail_loot_template` reloaded.");
|
||||
@@ -616,7 +616,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesReferenceCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`reference_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`reference_loot_template`)");
|
||||
LoadLootTemplates_Reference();
|
||||
handler->SendGlobalGMSysMessage("DB table `reference_loot_template` reloaded.");
|
||||
sConditionMgr->LoadConditions(true);
|
||||
@@ -625,7 +625,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesSkinningCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`skinning_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`skinning_loot_template`)");
|
||||
LoadLootTemplates_Skinning();
|
||||
LootTemplates_Skinning.CheckLootRefs();
|
||||
handler->SendGlobalGMSysMessage("DB table `skinning_loot_template` reloaded.");
|
||||
@@ -635,7 +635,7 @@ public:
|
||||
|
||||
static bool HandleReloadLootTemplatesSpellCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Loot Tables... (`spell_loot_template`)");
|
||||
LOG_INFO("server", "Re-Loading Loot Tables... (`spell_loot_template`)");
|
||||
LoadLootTemplates_Spell();
|
||||
LootTemplates_Spell.CheckLootRefs();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_loot_template` reloaded.");
|
||||
@@ -645,7 +645,7 @@ public:
|
||||
|
||||
static bool HandleReloadAcoreStringCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading acore_string Table!");
|
||||
LOG_INFO("server", "Re-Loading acore_string Table!");
|
||||
sObjectMgr->LoadAcoreStrings();
|
||||
handler->SendGlobalGMSysMessage("DB table `acore_string` reloaded.");
|
||||
return true;
|
||||
@@ -660,7 +660,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
sLog->outString("Re-Loading warden_action Table!");
|
||||
LOG_INFO("server", "Re-Loading warden_action Table!");
|
||||
sWardenCheckMgr->LoadWardenOverrides();
|
||||
handler->SendGlobalGMSysMessage("DB table `warden_action` reloaded.");
|
||||
return true;
|
||||
@@ -668,7 +668,7 @@ public:
|
||||
|
||||
static bool HandleReloadNpcTrainerCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading `npc_trainer` Table!");
|
||||
LOG_INFO("server", "Re-Loading `npc_trainer` Table!");
|
||||
sObjectMgr->LoadTrainerSpell();
|
||||
handler->SendGlobalGMSysMessage("DB table `npc_trainer` reloaded.");
|
||||
return true;
|
||||
@@ -676,7 +676,7 @@ public:
|
||||
|
||||
static bool HandleReloadNpcVendorCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading `npc_vendor` Table!");
|
||||
LOG_INFO("server", "Re-Loading `npc_vendor` Table!");
|
||||
sObjectMgr->LoadVendors();
|
||||
handler->SendGlobalGMSysMessage("DB table `npc_vendor` reloaded.");
|
||||
return true;
|
||||
@@ -684,7 +684,7 @@ public:
|
||||
|
||||
static bool HandleReloadPointsOfInterestCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading `points_of_interest` Table!");
|
||||
LOG_INFO("server", "Re-Loading `points_of_interest` Table!");
|
||||
sObjectMgr->LoadPointsOfInterest();
|
||||
handler->SendGlobalGMSysMessage("DB table `points_of_interest` reloaded.");
|
||||
return true;
|
||||
@@ -692,7 +692,7 @@ public:
|
||||
|
||||
static bool HandleReloadQuestPOICommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString( "Re-Loading Quest POI ..." );
|
||||
LOG_INFO("server", "Re-Loading Quest POI ..." );
|
||||
sObjectMgr->LoadQuestPOI();
|
||||
handler->SendGlobalGMSysMessage("DB Table `quest_poi` and `quest_poi_points` reloaded.");
|
||||
return true;
|
||||
@@ -700,7 +700,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellClickSpellsCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading `npc_spellclick_spells` Table!");
|
||||
LOG_INFO("server", "Re-Loading `npc_spellclick_spells` Table!");
|
||||
sObjectMgr->LoadNPCSpellClickSpells();
|
||||
handler->SendGlobalGMSysMessage("DB table `npc_spellclick_spells` reloaded.");
|
||||
return true;
|
||||
@@ -708,7 +708,7 @@ public:
|
||||
|
||||
static bool HandleReloadReservedNameCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Loading ReservedNames... (`reserved_name`)");
|
||||
LOG_INFO("server", "Loading ReservedNames... (`reserved_name`)");
|
||||
sObjectMgr->LoadReservedPlayersNames();
|
||||
handler->SendGlobalGMSysMessage("DB table `reserved_name` (player reserved names) reloaded.");
|
||||
return true;
|
||||
@@ -716,7 +716,7 @@ public:
|
||||
|
||||
static bool HandleReloadReputationRewardRateCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString( "Re-Loading `reputation_reward_rate` Table!" );
|
||||
LOG_INFO("server", "Re-Loading `reputation_reward_rate` Table!" );
|
||||
sObjectMgr->LoadReputationRewardRate();
|
||||
handler->SendGlobalSysMessage("DB table `reputation_reward_rate` reloaded.");
|
||||
return true;
|
||||
@@ -724,7 +724,7 @@ public:
|
||||
|
||||
static bool HandleReloadReputationSpilloverTemplateCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString( "Re-Loading `reputation_spillover_template` Table!" );
|
||||
LOG_INFO("server", "Re-Loading `reputation_spillover_template` Table!" );
|
||||
sObjectMgr->LoadReputationSpilloverTemplate();
|
||||
handler->SendGlobalSysMessage("DB table `reputation_spillover_template` reloaded.");
|
||||
return true;
|
||||
@@ -732,7 +732,7 @@ public:
|
||||
|
||||
static bool HandleReloadSkillDiscoveryTemplateCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Skill Discovery Table...");
|
||||
LOG_INFO("server", "Re-Loading Skill Discovery Table...");
|
||||
LoadSkillDiscoveryTable();
|
||||
handler->SendGlobalGMSysMessage("DB table `skill_discovery_template` (recipes discovered at crafting) reloaded.");
|
||||
return true;
|
||||
@@ -741,7 +741,7 @@ public:
|
||||
static bool HandleReloadSkillPerfectItemTemplateCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
// latched onto HandleReloadSkillExtraItemTemplateCommand as it's part of that table group (and i don't want to chance all the command IDs)
|
||||
sLog->outString("Re-Loading Skill Perfection Data Table...");
|
||||
LOG_INFO("server", "Re-Loading Skill Perfection Data Table...");
|
||||
LoadSkillPerfectItemTable();
|
||||
handler->SendGlobalGMSysMessage("DB table `skill_perfect_item_template` (perfect item procs when crafting) reloaded.");
|
||||
return true;
|
||||
@@ -749,7 +749,7 @@ public:
|
||||
|
||||
static bool HandleReloadSkillExtraItemTemplateCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
sLog->outString("Re-Loading Skill Extra Item Table...");
|
||||
LOG_INFO("server", "Re-Loading Skill Extra Item Table...");
|
||||
LoadSkillExtraItemTable();
|
||||
handler->SendGlobalGMSysMessage("DB table `skill_extra_item_template` (extra item creation when crafting) reloaded.");
|
||||
return HandleReloadSkillPerfectItemTemplateCommand(handler, args);
|
||||
@@ -757,7 +757,7 @@ public:
|
||||
|
||||
static bool HandleReloadSkillFishingBaseLevelCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Skill Fishing base level requirements...");
|
||||
LOG_INFO("server", "Re-Loading Skill Fishing base level requirements...");
|
||||
sObjectMgr->LoadFishingBaseSkillLevel();
|
||||
handler->SendGlobalGMSysMessage("DB table `skill_fishing_base_level` (fishing base level for zone/subzone) reloaded.");
|
||||
return true;
|
||||
@@ -765,7 +765,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellAreaCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading SpellArea Data...");
|
||||
LOG_INFO("server", "Re-Loading SpellArea Data...");
|
||||
sSpellMgr->LoadSpellAreas();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_area` (spell dependences from area/quest/auras state) reloaded.");
|
||||
return true;
|
||||
@@ -773,7 +773,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellRequiredCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Spell Required Data... ");
|
||||
LOG_INFO("server", "Re-Loading Spell Required Data... ");
|
||||
sSpellMgr->LoadSpellRequired();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_required` reloaded.");
|
||||
return true;
|
||||
@@ -781,7 +781,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellGroupsCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Spell Groups...");
|
||||
LOG_INFO("server", "Re-Loading Spell Groups...");
|
||||
sSpellMgr->LoadSpellGroups();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_group` (spell groups) reloaded.");
|
||||
return true;
|
||||
@@ -789,7 +789,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellLinkedSpellCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Spell Linked Spells...");
|
||||
LOG_INFO("server", "Re-Loading Spell Linked Spells...");
|
||||
sSpellMgr->LoadSpellLinked();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_linked_spell` reloaded.");
|
||||
return true;
|
||||
@@ -797,7 +797,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellProcEventCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Spell Proc Event conditions...");
|
||||
LOG_INFO("server", "Re-Loading Spell Proc Event conditions...");
|
||||
sSpellMgr->LoadSpellProcEvents();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_proc_event` (spell proc trigger requirements) reloaded.");
|
||||
return true;
|
||||
@@ -805,7 +805,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellProcsCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Spell Proc conditions and data...");
|
||||
LOG_INFO("server", "Re-Loading Spell Proc conditions and data...");
|
||||
sSpellMgr->LoadSpellProcs();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_proc` (spell proc conditions and data) reloaded.");
|
||||
return true;
|
||||
@@ -813,7 +813,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellBonusesCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Spell Bonus Data...");
|
||||
LOG_INFO("server", "Re-Loading Spell Bonus Data...");
|
||||
sSpellMgr->LoadSpellBonusess();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_bonus_data` (spell damage/healing coefficients) reloaded.");
|
||||
return true;
|
||||
@@ -821,7 +821,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellTargetPositionCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Spell target coordinates...");
|
||||
LOG_INFO("server", "Re-Loading Spell target coordinates...");
|
||||
sSpellMgr->LoadSpellTargetPositions();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_target_position` (destination coordinates for spell targets) reloaded.");
|
||||
return true;
|
||||
@@ -829,7 +829,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellThreatsCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Aggro Spells Definitions...");
|
||||
LOG_INFO("server", "Re-Loading Aggro Spells Definitions...");
|
||||
sSpellMgr->LoadSpellThreats();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_threat` (spell aggro definitions) reloaded.");
|
||||
return true;
|
||||
@@ -837,7 +837,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellGroupStackRulesCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Spell Group Stack Rules...");
|
||||
LOG_INFO("server", "Re-Loading Spell Group Stack Rules...");
|
||||
sSpellMgr->LoadSpellGroupStackRules();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_group_stack_rules` (spell stacking definitions) reloaded.");
|
||||
return true;
|
||||
@@ -845,7 +845,7 @@ public:
|
||||
|
||||
static bool HandleReloadSpellPetAurasCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Spell pet auras...");
|
||||
LOG_INFO("server", "Re-Loading Spell pet auras...");
|
||||
sSpellMgr->LoadSpellPetAuras();
|
||||
handler->SendGlobalGMSysMessage("DB table `spell_pet_auras` reloaded.");
|
||||
return true;
|
||||
@@ -853,7 +853,7 @@ public:
|
||||
|
||||
static bool HandleReloadPageTextsCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Page Texts...");
|
||||
LOG_INFO("server", "Re-Loading Page Texts...");
|
||||
sObjectMgr->LoadPageTexts();
|
||||
handler->SendGlobalGMSysMessage("DB table `page_texts` reloaded.");
|
||||
handler->GetSession()->SendNotification("You need to delete your client cache or change the cache number in config in order for your players see the changes.");
|
||||
@@ -862,7 +862,7 @@ public:
|
||||
|
||||
static bool HandleReloadItemEnchantementsCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Item Random Enchantments Table...");
|
||||
LOG_INFO("server", "Re-Loading Item Random Enchantments Table...");
|
||||
LoadRandomEnchantmentsTable();
|
||||
handler->SendGlobalGMSysMessage("DB table `item_enchantment_template` reloaded.");
|
||||
return true;
|
||||
@@ -870,7 +870,7 @@ public:
|
||||
|
||||
static bool HandleReloadItemSetNamesCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Item set names...");
|
||||
LOG_INFO("server", "Re-Loading Item set names...");
|
||||
sObjectMgr->LoadItemSetNames();
|
||||
handler->SendGlobalGMSysMessage("DB table `item_set_names` reloaded.");
|
||||
return true;
|
||||
@@ -886,7 +886,7 @@ public:
|
||||
}
|
||||
|
||||
if (*args != 'a')
|
||||
sLog->outString("Re-Loading Scripts from `event_scripts`...");
|
||||
LOG_INFO("server", "Re-Loading Scripts from `event_scripts`...");
|
||||
|
||||
sObjectMgr->LoadEventScripts();
|
||||
|
||||
@@ -906,7 +906,7 @@ public:
|
||||
}
|
||||
|
||||
if (*args != 'a')
|
||||
sLog->outString("Re-Loading Scripts from `waypoint_scripts`...");
|
||||
LOG_INFO("server", "Re-Loading Scripts from `waypoint_scripts`...");
|
||||
|
||||
sObjectMgr->LoadWaypointScripts();
|
||||
|
||||
@@ -919,7 +919,7 @@ public:
|
||||
static bool HandleReloadWpCommand(ChatHandler* handler, const char* args)
|
||||
{
|
||||
if (*args != 'a')
|
||||
sLog->outString("Re-Loading Waypoints data from 'waypoints_data'");
|
||||
LOG_INFO("server", "Re-Loading Waypoints data from 'waypoints_data'");
|
||||
|
||||
sWaypointMgr->Load();
|
||||
|
||||
@@ -939,7 +939,7 @@ public:
|
||||
}
|
||||
|
||||
if (*args != 'a')
|
||||
sLog->outString("Re-Loading Scripts from `spell_scripts`...");
|
||||
LOG_INFO("server", "Re-Loading Scripts from `spell_scripts`...");
|
||||
|
||||
sObjectMgr->LoadSpellScripts();
|
||||
|
||||
@@ -951,7 +951,7 @@ public:
|
||||
|
||||
static bool HandleReloadGameGraveyardZoneCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Graveyard-zone links...");
|
||||
LOG_INFO("server", "Re-Loading Graveyard-zone links...");
|
||||
|
||||
sGraveyard->LoadGraveyardZones();
|
||||
|
||||
@@ -962,7 +962,7 @@ public:
|
||||
|
||||
static bool HandleReloadGameTeleCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Game Tele coordinates...");
|
||||
LOG_INFO("server", "Re-Loading Game Tele coordinates...");
|
||||
|
||||
sObjectMgr->LoadGameTele();
|
||||
|
||||
@@ -973,9 +973,9 @@ public:
|
||||
|
||||
static bool HandleReloadDisablesCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading disables table...");
|
||||
LOG_INFO("server", "Re-Loading disables table...");
|
||||
DisableMgr::LoadDisables();
|
||||
sLog->outString("Checking quest disables...");
|
||||
LOG_INFO("server", "Checking quest disables...");
|
||||
DisableMgr::CheckQuestDisables();
|
||||
handler->SendGlobalGMSysMessage("DB table `disables` reloaded.");
|
||||
return true;
|
||||
@@ -983,7 +983,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesAchievementRewardCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Achievement Reward Data Locale...");
|
||||
LOG_INFO("server", "Re-Loading Achievement Reward Data Locale...");
|
||||
sAchievementMgr->LoadRewardLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `achievement_reward_locale` reloaded.");
|
||||
return true;
|
||||
@@ -991,7 +991,7 @@ public:
|
||||
|
||||
static bool HandleReloadLfgRewardsCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading lfg dungeon rewards...");
|
||||
LOG_INFO("server", "Re-Loading lfg dungeon rewards...");
|
||||
sLFGMgr->LoadRewards();
|
||||
handler->SendGlobalGMSysMessage("DB table `lfg_dungeon_rewards` reloaded.");
|
||||
return true;
|
||||
@@ -999,7 +999,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesCreatureCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Creature Template Locale...");
|
||||
LOG_INFO("server", "Re-Loading Creature Template Locale...");
|
||||
sObjectMgr->LoadCreatureLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `creature_template_locale` reloaded.");
|
||||
return true;
|
||||
@@ -1007,7 +1007,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesCreatureTextCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Creature Texts Locale...");
|
||||
LOG_INFO("server", "Re-Loading Creature Texts Locale...");
|
||||
sCreatureTextMgr->LoadCreatureTextLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `creature_text_locale` reloaded.");
|
||||
return true;
|
||||
@@ -1015,7 +1015,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesGameobjectCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Gameobject Template Locale ... ");
|
||||
LOG_INFO("server", "Re-Loading Gameobject Template Locale ... ");
|
||||
sObjectMgr->LoadGameObjectLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `gameobject_template_locale` reloaded.");
|
||||
return true;
|
||||
@@ -1023,7 +1023,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesGossipMenuOptionCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString( "Re-Loading Gossip Menu Option Locale ... ");
|
||||
LOG_INFO("server", "Re-Loading Gossip Menu Option Locale ... ");
|
||||
sObjectMgr->LoadGossipMenuItemsLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `gossip_menu_option_locale` reloaded.");
|
||||
return true;
|
||||
@@ -1031,7 +1031,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesItemCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Item Template Locale ... ");
|
||||
LOG_INFO("server", "Re-Loading Item Template Locale ... ");
|
||||
sObjectMgr->LoadItemLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `item_template_locale` reloaded.");
|
||||
return true;
|
||||
@@ -1039,7 +1039,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesItemSetNameCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Item set name Locale... ");
|
||||
LOG_INFO("server", "Re-Loading Item set name Locale... ");
|
||||
sObjectMgr->LoadItemSetNameLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `item_set_name_locale` reloaded.");
|
||||
return true;
|
||||
@@ -1047,7 +1047,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesNpcTextCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading NPC Text Locale ... ");
|
||||
LOG_INFO("server", "Re-Loading NPC Text Locale ... ");
|
||||
sObjectMgr->LoadNpcTextLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `npc_text_locale` reloaded.");
|
||||
return true;
|
||||
@@ -1055,7 +1055,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesPageTextCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Page Text Locale ... ");
|
||||
LOG_INFO("server", "Re-Loading Page Text Locale ... ");
|
||||
sObjectMgr->LoadPageTextLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `page_text_locale` reloaded.");
|
||||
handler->GetSession()->SendNotification("You need to delete your client cache or change the cache number in config in order for your players see the changes.");
|
||||
@@ -1064,7 +1064,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesPointsOfInterestCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Points Of Interest Locale ... ");
|
||||
LOG_INFO("server", "Re-Loading Points Of Interest Locale ... ");
|
||||
sObjectMgr->LoadPointOfInterestLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `points_of_interest_locale` reloaded.");
|
||||
return true;
|
||||
@@ -1072,7 +1072,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesQuestCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Locales Quest ... ");
|
||||
LOG_INFO("server", "Re-Loading Locales Quest ... ");
|
||||
sObjectMgr->LoadQuestLocales();
|
||||
handler->SendGlobalGMSysMessage("DB table `quest_template_locale` reloaded.");
|
||||
return true;
|
||||
@@ -1080,7 +1080,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesQuestOfferRewardCommand(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Quest Offer Reward Locale... ");
|
||||
LOG_INFO("server", "Re-Loading Quest Offer Reward Locale... ");
|
||||
sObjectMgr->LoadQuestOfferRewardLocale();
|
||||
handler->SendGlobalGMSysMessage("DB table `quest_offer_reward_locale` reloaded.");
|
||||
return true;
|
||||
@@ -1088,7 +1088,7 @@ public:
|
||||
|
||||
static bool HandleReloadLocalesQuestRequestItemsCommand(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Quest Request Item Locale... ");
|
||||
LOG_INFO("server", "Re-Loading Quest Request Item Locale... ");
|
||||
sObjectMgr->LoadQuestRequestItemsLocale();
|
||||
handler->SendGlobalGMSysMessage("DB table `quest_request_item_locale` reloaded.");
|
||||
return true;
|
||||
@@ -1096,7 +1096,7 @@ public:
|
||||
|
||||
static bool HandleReloadMailLevelRewardCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Player level dependent mail rewards...");
|
||||
LOG_INFO("server", "Re-Loading Player level dependent mail rewards...");
|
||||
sObjectMgr->LoadMailLevelRewards();
|
||||
handler->SendGlobalGMSysMessage("DB table `mail_level_reward` reloaded.");
|
||||
return true;
|
||||
@@ -1105,7 +1105,7 @@ public:
|
||||
static bool HandleReloadAuctionsCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
///- Reload dynamic data tables from the database
|
||||
sLog->outString("Re-Loading Auctions...");
|
||||
LOG_INFO("server", "Re-Loading Auctions...");
|
||||
sAuctionMgr->LoadAuctionItems();
|
||||
sAuctionMgr->LoadAuctions();
|
||||
handler->SendGlobalGMSysMessage("Auctions reloaded.");
|
||||
@@ -1114,7 +1114,7 @@ public:
|
||||
|
||||
static bool HandleReloadConditions(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Conditions...");
|
||||
LOG_INFO("server", "Re-Loading Conditions...");
|
||||
sConditionMgr->LoadConditions(true);
|
||||
handler->SendGlobalGMSysMessage("Conditions reloaded.");
|
||||
return true;
|
||||
@@ -1122,7 +1122,7 @@ public:
|
||||
|
||||
static bool HandleReloadCreatureText(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Creature Texts...");
|
||||
LOG_INFO("server", "Re-Loading Creature Texts...");
|
||||
sCreatureTextMgr->LoadCreatureTexts();
|
||||
handler->SendGlobalGMSysMessage("Creature Texts reloaded.");
|
||||
return true;
|
||||
@@ -1130,7 +1130,7 @@ public:
|
||||
|
||||
static bool HandleReloadSmartScripts(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Re-Loading Smart Scripts...");
|
||||
LOG_INFO("server", "Re-Loading Smart Scripts...");
|
||||
sSmartScriptMgr->LoadSmartAIFromDB();
|
||||
handler->SendGlobalGMSysMessage("Smart Scripts reloaded.");
|
||||
return true;
|
||||
@@ -1138,7 +1138,7 @@ public:
|
||||
|
||||
static bool HandleReloadVehicleAccessoryCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Reloading vehicle_accessory table...");
|
||||
LOG_INFO("server", "Reloading vehicle_accessory table...");
|
||||
sObjectMgr->LoadVehicleAccessories();
|
||||
handler->SendGlobalGMSysMessage("Vehicle accessories reloaded.");
|
||||
return true;
|
||||
@@ -1146,7 +1146,7 @@ public:
|
||||
|
||||
static bool HandleReloadVehicleTemplateAccessoryCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Reloading vehicle_template_accessory table...");
|
||||
LOG_INFO("server", "Reloading vehicle_template_accessory table...");
|
||||
sObjectMgr->LoadVehicleTemplateAccessories();
|
||||
handler->SendGlobalGMSysMessage("Vehicle template accessories reloaded.");
|
||||
return true;
|
||||
@@ -1154,7 +1154,7 @@ public:
|
||||
|
||||
static bool HandleReloadGameGraveyardCommand(ChatHandler* handler, const char* /*args*/)
|
||||
{
|
||||
sLog->outString("Reloading game_graveyard table...");
|
||||
LOG_INFO("server", "Reloading game_graveyard table...");
|
||||
sGraveyard->LoadGraveyardFromDB();
|
||||
handler->SendGlobalGMSysMessage("DB table `game_graveyard` reloaded.");
|
||||
return true;
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(player->getClass());
|
||||
if (!classEntry)
|
||||
{
|
||||
sLog->outError("Class %u not found in DBC (Wrong DBC files?)", player->getClass());
|
||||
LOG_ERROR("server", "Class %u not found in DBC (Wrong DBC files?)", player->getClass());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ EndScriptData */
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ServerMotd.h"
|
||||
#include "StringConvert.h"
|
||||
|
||||
class server_commandscript : public CommandScript
|
||||
{
|
||||
@@ -56,7 +57,6 @@ public:
|
||||
{
|
||||
{ "difftime", SEC_CONSOLE, true, &HandleServerSetDiffTimeCommand, "" },
|
||||
{ "loglevel", SEC_CONSOLE, true, &HandleServerSetLogLevelCommand, "" },
|
||||
{ "logfilelevel", SEC_CONSOLE, true, &HandleServerSetLogFileLevelCommand, "" },
|
||||
{ "motd", SEC_ADMINISTRATOR, true, &HandleServerSetMotdCommand, "" },
|
||||
{ "closed", SEC_CONSOLE, true, &HandleServerSetClosedCommand, "" }
|
||||
};
|
||||
@@ -71,14 +71,14 @@ public:
|
||||
{ "motd", SEC_PLAYER, true, &HandleServerMotdCommand, "" },
|
||||
{ "restart", SEC_ADMINISTRATOR, true, nullptr, "", serverRestartCommandTable },
|
||||
{ "shutdown", SEC_ADMINISTRATOR, true, nullptr, "", serverShutdownCommandTable },
|
||||
{ "set", SEC_ADMINISTRATOR, true, nullptr, "", serverSetCommandTable },
|
||||
{ "togglequerylog", SEC_CONSOLE, true, &HandleServerToggleQueryLogging, "" }
|
||||
{ "set", SEC_ADMINISTRATOR, true, nullptr, "", serverSetCommandTable }
|
||||
};
|
||||
|
||||
static std::vector<ChatCommand> commandTable =
|
||||
{
|
||||
{ "server", SEC_PLAYER, true, nullptr, "", serverCommandTable }
|
||||
};
|
||||
|
||||
return commandTable;
|
||||
}
|
||||
|
||||
@@ -313,31 +313,20 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set the level of logging
|
||||
static bool HandleServerSetLogFileLevelCommand(ChatHandler* /*handler*/, char const* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* newLevel = strtok((char*)args, " ");
|
||||
if (!newLevel)
|
||||
return false;
|
||||
|
||||
sLog->SetLogFileLevel(newLevel);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Set the level of logging
|
||||
static bool HandleServerSetLogLevelCommand(ChatHandler* /*handler*/, char const* args)
|
||||
{
|
||||
if (!*args)
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* newLevel = strtok((char*)args, " ");
|
||||
if (!newLevel)
|
||||
char* type = strtok((char*)args, " ");
|
||||
char* name = strtok(nullptr, " ");
|
||||
char* level = strtok(nullptr, " ");
|
||||
|
||||
if (!type || !name || !level || *name == '\0' || *level == '\0' || (*type != 'a' && *type != 'l'))
|
||||
return false;
|
||||
|
||||
sLog->SetLogLevel(newLevel);
|
||||
sLog->SetLogLevel(name, *acore::StringTo<uint32>(level), *type == 'l');
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -360,18 +349,6 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// toggle sql driver query logging
|
||||
static bool HandleServerToggleQueryLogging(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
sLog->SetSQLDriverQueryLogging(!sLog->GetSQLDriverQueryLogging());
|
||||
|
||||
if (sLog->GetSQLDriverQueryLogging())
|
||||
handler->PSendSysMessage(LANG_SQLDRIVER_QUERY_LOGGING_ENABLED);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_SQLDRIVER_QUERY_LOGGING_DISABLED);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_server_commandscript()
|
||||
|
||||
@@ -267,7 +267,7 @@ public:
|
||||
void SetData64(uint32 type, uint64 data) override
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data);
|
||||
LOG_DEBUG("scripts.ai", "TSCR: Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data);
|
||||
#endif
|
||||
|
||||
switch (type)
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
|
||||
LOG_DEBUG("scripts.ai", "TSCR: Instance Blackrock Depths: SetData update (Type: %u Data %u)", type, data);
|
||||
#endif
|
||||
|
||||
switch (type)
|
||||
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
void PrepareEncounter()
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId);
|
||||
LOG_DEBUG("scripts.ai", "TSCR: Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId);
|
||||
#endif
|
||||
uint8 index = 0;
|
||||
uint8 count = 0;
|
||||
|
||||
@@ -803,7 +803,7 @@ public:
|
||||
else
|
||||
{
|
||||
me->GetMotionMaster()->MovePoint(1, anchorX, anchorY, me->GetPositionZ());
|
||||
//sLog->outDebug(LOG_FILTER_TSCR, "npc_unworthy_initiateAI: move to %f %f %f", anchorX, anchorY, me->GetPositionZ());
|
||||
//LOG_DEBUG("scripts.ai", "npc_unworthy_initiateAI: move to %f %f %f", anchorX, anchorY, me->GetPositionZ());
|
||||
phase = PHASE_EQUIPING;
|
||||
wait_timer = 0;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
AddEscortState(STATE_ESCORT_RETURNING);
|
||||
ReturnToLastPoint();
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI has left combat and is now returning to last point");
|
||||
LOG_DEBUG("scripts.ai", "TSCR: EscortAI has left combat and is now returning to last point");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
||||
@@ -229,18 +229,18 @@ public:
|
||||
return;
|
||||
|
||||
std::istringstream ss(load);
|
||||
//sLog->outError("Zul'aman loaded, %s.", ss.str().c_str());
|
||||
//LOG_ERROR("server", "Zul'aman loaded, %s.", ss.str().c_str());
|
||||
char dataHead; // S
|
||||
uint16 data1, data2, data3;
|
||||
ss >> dataHead >> data1 >> data2 >> data3;
|
||||
//sLog->outError("Zul'aman loaded, %d %d %d.", data1, data2, data3);
|
||||
//LOG_ERROR("server", "Zul'aman loaded, %d %d %d.", data1, data2, data3);
|
||||
if (dataHead == 'S')
|
||||
{
|
||||
BossKilled = data1;
|
||||
ChestLooted = data2;
|
||||
QuestMinute = data3;
|
||||
}
|
||||
else sLog->outError("Zul'aman: corrupted save data.");
|
||||
else LOG_ERROR("server", "Zul'aman: corrupted save data.");
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
|
||||
@@ -1446,7 +1446,7 @@ public:
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_commander_dawnforge event already in progress, need to wait.");
|
||||
LOG_DEBUG("scripts.ai", "TSCR: npc_commander_dawnforge event already in progress, need to wait.");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ public:
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(enchant->spellid[s]);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError("Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUIDLow(), enchant->spellid[s]);
|
||||
LOG_ERROR("server", "Player::CastItemCombatSpell Enchant %i, player (Name: %s, GUID: %u) cast unknown spell %i", enchant->ID, player->GetName().c_str(), player->GetGUIDLow(), enchant->spellid[s]);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -708,7 +708,7 @@ public:
|
||||
rank = 2;
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Unknown rank of Improved Healthstone id: %d", aurEff->GetId());
|
||||
LOG_ERROR("server", "Unknown rank of Improved Healthstone id: %d", aurEff->GetId());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
#include "Guild.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
#define LOG_CHAT(TYPE, ...) \
|
||||
if (lang != LANG_ADDON) \
|
||||
LOG_DEBUG("chat.log." TYPE, __VA_ARGS__); \
|
||||
else \
|
||||
LOG_DEBUG("chat.log.addon." TYPE, __VA_ARGS__);
|
||||
|
||||
class ChatLogScript : public PlayerScript
|
||||
{
|
||||
public:
|
||||
@@ -18,40 +24,27 @@ public:
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case CHAT_MSG_ADDON:
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
|
||||
sLog->outChat("[ADDON] Player %s sends: %s",
|
||||
player->GetName().c_str(), msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_SAY:
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
|
||||
sLog->outChat("[SAY] Player %s says (language %u): %s",
|
||||
player->GetName().c_str(), lang, msg.c_str());
|
||||
LOG_CHAT("say", "Player %s says (language %u): %s",
|
||||
player->GetName().c_str(), lang, msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_EMOTE:
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
|
||||
sLog->outChat("[TEXTEMOTE] Player %s emotes: %s",
|
||||
player->GetName().c_str(), msg.c_str());
|
||||
LOG_CHAT("emote", "Player %s emotes: %s",
|
||||
player->GetName().c_str(), msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_YELL:
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
|
||||
sLog->outChat("[YELL] Player %s yells (language %u): %s",
|
||||
player->GetName().c_str(), lang, msg.c_str());
|
||||
LOG_CHAT("yell", "Player %s yells (language %u): %s",
|
||||
player->GetName().c_str(), lang, msg.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver) override
|
||||
{
|
||||
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_WHISPER))
|
||||
sLog->outChat("[WHISPER] Player %s tells %s: %s",
|
||||
player->GetName().c_str(), receiver ? receiver->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
|
||||
sLog->outChat("[ADDON] Player %s tells %s: %s",
|
||||
player->GetName().c_str(), receiver ? receiver->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
LOG_CHAT("whisper", "Player %s tells %s: %s",
|
||||
player->GetName().c_str(), receiver ? receiver->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
}
|
||||
|
||||
void OnChat(Player* player, uint32 type, uint32 lang, std::string& msg, Group* group) override
|
||||
@@ -61,54 +54,38 @@ public:
|
||||
switch (type)
|
||||
{
|
||||
case CHAT_MSG_PARTY:
|
||||
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_PARTY))
|
||||
sLog->outChat("[PARTY] Player %s tells group with leader %s: %s",
|
||||
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
|
||||
sLog->outChat("[ADDON] Player %s tells group with leader %s: %s",
|
||||
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
LOG_CHAT("party", "Player %s tells group with leader %s: %s",
|
||||
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_PARTY_LEADER:
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PARTY))
|
||||
sLog->outChat("[PARTY] Leader %s tells group: %s",
|
||||
player->GetName().c_str(), msg.c_str());
|
||||
LOG_CHAT("party", "Leader %s tells group: %s",
|
||||
player->GetName().c_str(), msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_RAID:
|
||||
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
|
||||
sLog->outChat("[RAID] Player %s tells raid with leader %s: %s",
|
||||
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
|
||||
sLog->outChat("[ADDON] Player %s tells raid with leader %s: %s",
|
||||
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
LOG_CHAT("raid", "Player %s tells raid with leader %s: %s",
|
||||
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_RAID_LEADER:
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
|
||||
sLog->outChat("[RAID] Leader player %s tells raid: %s",
|
||||
player->GetName().c_str(), msg.c_str());
|
||||
LOG_CHAT("raid", "Leader player %s tells raid: %s",
|
||||
player->GetName().c_str(), msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_RAID_WARNING:
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
|
||||
sLog->outChat("[RAID] Leader player %s warns raid with: %s",
|
||||
player->GetName().c_str(), msg.c_str());
|
||||
LOG_CHAT("raid", "Leader player %s warns raid with: %s",
|
||||
player->GetName().c_str(), msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_BATTLEGROUND:
|
||||
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_BGROUND))
|
||||
sLog->outChat("[BATTLEGROUND] Player %s tells battleground with leader %s: %s",
|
||||
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
|
||||
sLog->outChat("[ADDON] Player %s tells battleground with leader %s: %s",
|
||||
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
LOG_CHAT("bg", "Player %s tells battleground with leader %s: %s",
|
||||
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_BATTLEGROUND_LEADER:
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_BGROUND))
|
||||
sLog->outChat("[BATTLEGROUND] Leader player %s tells battleground: %s",
|
||||
player->GetName().c_str(), msg.c_str());
|
||||
LOG_CHAT("bg", "Leader player %s tells battleground: %s",
|
||||
player->GetName().c_str(), msg.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -118,23 +95,18 @@ public:
|
||||
switch (type)
|
||||
{
|
||||
case CHAT_MSG_GUILD:
|
||||
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_GUILD))
|
||||
sLog->outChat("[GUILD] Player %s tells guild %s: %s",
|
||||
player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
|
||||
sLog->outChat("[ADDON] Player %s sends to guild %s: %s",
|
||||
player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
LOG_CHAT("guild", "Player %s tells guild %s: %s",
|
||||
player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_OFFICER:
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_GUILD))
|
||||
sLog->outChat("[OFFICER] Player %s tells guild %s officers: %s",
|
||||
player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
LOG_CHAT("guild.officer", "Player %s tells guild %s officers: %s",
|
||||
player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnChat(Player* player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Channel* channel) override
|
||||
void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Channel* channel) override
|
||||
{
|
||||
bool isSystem = channel &&
|
||||
(channel->HasFlag(CHANNEL_FLAG_TRADE) ||
|
||||
@@ -142,12 +114,17 @@ public:
|
||||
channel->HasFlag(CHANNEL_FLAG_CITY) ||
|
||||
channel->HasFlag(CHANNEL_FLAG_LFG));
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_SYSCHAN) && isSystem)
|
||||
sLog->outChat("[SYSCHAN] Player %s tells channel %s: %s",
|
||||
player->GetName().c_str(), channel->GetName().c_str(), msg.c_str());
|
||||
else if (sWorld->getBoolConfig(CONFIG_CHATLOG_CHANNEL))
|
||||
sLog->outChat("[CHANNEL] Player %s tells channel %s: %s",
|
||||
player->GetName().c_str(), channel ? channel->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
if (isSystem)
|
||||
{
|
||||
LOG_CHAT("system", "Player %s tells channel %s: %s",
|
||||
player->GetName().c_str(), channel->GetName().c_str(), msg.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string channelName = channel ? channel->GetName() : "<unknown>";
|
||||
LOG_CHAT("channel." + channelName, "Player %s tells channel %s: %s",
|
||||
player->GetName().c_str(), channelName.c_str(), msg.c_str());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ bool EquippedOk(Player* player, uint32 spellId)
|
||||
{
|
||||
//player has item equipped that require specialty. Not allow to unlearn, player has to unequip first
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, item->GetEntry());
|
||||
LOG_DEBUG("scripts.ai", "TSCR: player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, item->GetEntry());
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -503,14 +503,14 @@ public:
|
||||
}
|
||||
|
||||
if (!SpawnAssoc)
|
||||
sLog->outErrorDb("TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", creature->GetEntry());
|
||||
LOG_ERROR("sql.sql", "TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", creature->GetEntry());
|
||||
else
|
||||
{
|
||||
CreatureTemplate const* spawnedTemplate = sObjectMgr->GetCreatureTemplate(SpawnAssoc->spawnedCreatureEntry);
|
||||
|
||||
if (!spawnedTemplate)
|
||||
{
|
||||
sLog->outErrorDb("TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", SpawnAssoc->spawnedCreatureEntry);
|
||||
LOG_ERROR("sql.sql", "TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", SpawnAssoc->spawnedCreatureEntry);
|
||||
SpawnAssoc = nullptr;
|
||||
return;
|
||||
}
|
||||
@@ -530,7 +530,7 @@ public:
|
||||
SpawnedGUID = summoned->GetGUID();
|
||||
else
|
||||
{
|
||||
sLog->outErrorDb("TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", SpawnAssoc->spawnedCreatureEntry);
|
||||
LOG_ERROR("sql.sql", "TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", SpawnAssoc->spawnedCreatureEntry);
|
||||
SpawnAssoc = nullptr;
|
||||
}
|
||||
|
||||
@@ -1169,7 +1169,7 @@ void npc_doctor::npc_doctorAI::UpdateAI(uint32 diff)
|
||||
patientEntry = HordeSoldierId[rand() % 3];
|
||||
break;
|
||||
default:
|
||||
sLog->outError("TSCR: Invalid entry for Triage doctor. Please check your database");
|
||||
LOG_ERROR("server", "TSCR: Invalid entry for Triage doctor. Please check your database");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user