Added support for reloading creature_onkill_reputation table
Commented ace in externals/CmakeLists.txt and moved zlib before g3dlite, requested by click --HG-- branch : trunk
This commit is contained in:
@@ -460,6 +460,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{ "creature_involvedrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureQuestInvRelationsCommand,"",NULL },
|
||||
{ "creature_linked_respawn", SEC_GAMEMASTER, true, &ChatHandler::HandleReloadCreatureLinkedRespawnCommand, "", NULL },
|
||||
{ "creature_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesCreatureCommand, "", NULL },
|
||||
{ "creature_onkill_reputation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadOnKillReputationCommand, "", NULL },
|
||||
{ "creature_questrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureQuestRelationsCommand, "", NULL },
|
||||
{ "creature_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureTemplateCommand, "", NULL },
|
||||
//{ "db_script_string", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadDbScriptStringCommand, "", NULL },
|
||||
|
||||
@@ -364,6 +364,7 @@ class ChatHandler
|
||||
bool HandleReloadEventAISummonsCommand(const char* args);
|
||||
bool HandleReloadEventAIScriptsCommand(const char* args);
|
||||
bool HandleReloadCommandCommand(const char* args);
|
||||
bool HandleReloadOnKillReputationCommand(const char* args);
|
||||
bool HandleReloadCreatureTemplateCommand(const char* args);
|
||||
bool HandleReloadCreatureQuestRelationsCommand(const char* args);
|
||||
bool HandleReloadCreatureQuestInvRelationsCommand(const char* args);
|
||||
|
||||
@@ -749,6 +749,14 @@ bool ChatHandler::HandleReloadCommandCommand(const char*)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadOnKillReputationCommand(const char*)
|
||||
{
|
||||
sLog.outString("Re-Loading creature award reputation definitions...");
|
||||
objmgr.LoadReputationOnKill();
|
||||
SendGlobalGMSysMessage("DB table `creature_onkill_reputation` reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadCreatureTemplateCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
|
||||
@@ -6488,6 +6488,9 @@ void ObjectMgr::LoadCorpses()
|
||||
|
||||
void ObjectMgr::LoadReputationOnKill()
|
||||
{
|
||||
// For reload case
|
||||
mRepOnKill.clear();
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
// 0 1 2
|
||||
@@ -6529,7 +6532,7 @@ void ObjectMgr::LoadReputationOnKill()
|
||||
|
||||
if (!GetCreatureTemplate(creature_id))
|
||||
{
|
||||
sLog.outErrorDb("Table `creature_onkill_reputation` have data for not existed creature entry (%u), skipped",creature_id);
|
||||
sLog.outErrorDb("Table `creature_onkill_reputation` have data for not existed creature entry (%u), skipped", creature_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -6538,7 +6541,7 @@ void ObjectMgr::LoadReputationOnKill()
|
||||
FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(repOnKill.repfaction1);
|
||||
if (!factionEntry1)
|
||||
{
|
||||
sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`",repOnKill.repfaction1);
|
||||
sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction1);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -6548,7 +6551,7 @@ void ObjectMgr::LoadReputationOnKill()
|
||||
FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(repOnKill.repfaction2);
|
||||
if (!factionEntry2)
|
||||
{
|
||||
sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`",repOnKill.repfaction2);
|
||||
sLog.outErrorDb("Faction (faction.dbc) %u does not exist but is used in `creature_onkill_reputation`", repOnKill.repfaction2);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user