* Some singleton renames for consistency:
accmgr -> AccountMgr objmgr -> ObjectMgr auctionmgr -> sAuctionMgr spellmgr -> sSpellMgr CreatureEAI_Mgr -> sEventAIMgr achievementmgr -> sAchievementMgr gameeventmgr -> sGameEventMgr sInstanceSaveManager -> sInstanceSaveMgr poolhandler -> sPoolMgr --HG-- branch : trunk
This commit is contained in:
@@ -60,8 +60,8 @@ int CreatureEventAI::Permissible(const Creature *creature)
|
||||
CreatureEventAI::CreatureEventAI(Creature *c) : CreatureAI(c)
|
||||
{
|
||||
// Need make copy for filter unneeded steps and safe in case table reload
|
||||
CreatureEventAI_Event_Map::const_iterator CreatureEvents = CreatureEAI_Mgr.GetCreatureEventAIMap().find(me->GetEntry());
|
||||
if (CreatureEvents != CreatureEAI_Mgr.GetCreatureEventAIMap().end())
|
||||
CreatureEventAI_Event_Map::const_iterator CreatureEvents = sEventAIMgr.GetCreatureEventAIMap().find(me->GetEntry());
|
||||
if (CreatureEvents != sEventAIMgr.GetCreatureEventAIMap().end())
|
||||
{
|
||||
std::vector<CreatureEventAI_Event>::const_iterator i;
|
||||
for (i = (*CreatureEvents).second.begin(); i != (*CreatureEvents).second.end(); ++i)
|
||||
@@ -412,7 +412,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
{
|
||||
if (CreatureInfo const* ci = GetCreatureTemplateStore(action.morph.creatureId))
|
||||
{
|
||||
uint32 display_id = objmgr.ChooseDisplayId(0,ci);
|
||||
uint32 display_id = sObjectMgr.ChooseDisplayId(0,ci);
|
||||
me->SetDisplayId(display_id);
|
||||
}
|
||||
}
|
||||
@@ -674,8 +674,8 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
{
|
||||
Unit* target = GetTargetByType(action.summon_id.target, pActionInvoker);
|
||||
|
||||
CreatureEventAI_Summon_Map::const_iterator i = CreatureEAI_Mgr.GetCreatureEventAISummonMap().find(action.summon_id.spawnId);
|
||||
if (i == CreatureEAI_Mgr.GetCreatureEventAISummonMap().end())
|
||||
CreatureEventAI_Summon_Map::const_iterator i = sEventAIMgr.GetCreatureEventAISummonMap().find(action.summon_id.spawnId);
|
||||
if (i == sEventAIMgr.GetCreatureEventAISummonMap().end())
|
||||
{
|
||||
sLog.outErrorDb("CreatureEventAI: failed to spawn creature %u. Summon map index %u does not exist. EventID %d. CreatureID %d", action.summon_id.creatureId, action.summon_id.spawnId, EventId, me->GetEntry());
|
||||
return;
|
||||
@@ -1230,9 +1230,9 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* pSource, Unit*
|
||||
return;
|
||||
}
|
||||
|
||||
CreatureEventAI_TextMap::const_iterator i = CreatureEAI_Mgr.GetCreatureEventAITextMap().find(textEntry);
|
||||
CreatureEventAI_TextMap::const_iterator i = sEventAIMgr.GetCreatureEventAITextMap().find(textEntry);
|
||||
|
||||
if (i == CreatureEAI_Mgr.GetCreatureEventAITextMap().end())
|
||||
if (i == sEventAIMgr.GetCreatureEventAITextMap().end())
|
||||
{
|
||||
sLog.outErrorDb("CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.",pSource->GetEntry(),pSource->GetTypeId(),pSource->GetGUIDLow(),textEntry);
|
||||
return;
|
||||
|
||||
@@ -34,7 +34,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
|
||||
m_CreatureEventAI_TextMap.clear();
|
||||
|
||||
// Load EventAI Text
|
||||
objmgr.LoadTrinityStrings(WorldDatabase,"creature_ai_texts",MIN_CREATURE_AI_TEXT_STRING_ID,MAX_CREATURE_AI_TEXT_STRING_ID);
|
||||
sObjectMgr.LoadTrinityStrings(WorldDatabase,"creature_ai_texts",MIN_CREATURE_AI_TEXT_STRING_ID,MAX_CREATURE_AI_TEXT_STRING_ID);
|
||||
|
||||
// Gather Additional data from EventAI Texts
|
||||
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM creature_ai_texts");
|
||||
@@ -65,7 +65,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
|
||||
}
|
||||
|
||||
// range negative (don't must be happen, loaded from same table)
|
||||
if (!objmgr.GetTrinityStringLocale(i))
|
||||
if (!sObjectMgr.GetTrinityStringLocale(i))
|
||||
{
|
||||
sLog.outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` not found",i);
|
||||
continue;
|
||||
@@ -331,7 +331,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
break;
|
||||
case EVENT_T_QUEST_ACCEPT:
|
||||
case EVENT_T_QUEST_COMPLETE:
|
||||
if (!objmgr.GetQuestTemplate(temp.quest.questId))
|
||||
if (!sObjectMgr.GetQuestTemplate(temp.quest.questId))
|
||||
sLog.outErrorDb("CreatureEventAI: Creature %u are using event(%u) with not existed qyest id (%u) in param1, skipped.", temp.creature_id, i, temp.quest.questId);
|
||||
sLog.outErrorDb("CreatureEventAI: Creature %u using not implemented event (%u) in event %u.", temp.creature_id, temp.event_id, i);
|
||||
continue;
|
||||
@@ -543,7 +543,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_all_pct.percent);
|
||||
break;
|
||||
case ACTION_T_QUEST_EVENT:
|
||||
if (Quest const* qid = objmgr.GetQuestTemplate(action.quest_event.questId))
|
||||
if (Quest const* qid = sObjectMgr.GetQuestTemplate(action.quest_event.questId))
|
||||
{
|
||||
if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT))
|
||||
sLog.outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event.questId);
|
||||
@@ -585,7 +585,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
sLog.outErrorDb("CreatureEventAI: Event %u Action %u is change phase by too large for any use %i.", i, j+1, action.set_inc_phase.step);
|
||||
break;
|
||||
case ACTION_T_QUEST_EVENT_ALL:
|
||||
if (Quest const* qid = objmgr.GetQuestTemplate(action.quest_event_all.questId))
|
||||
if (Quest const* qid = sObjectMgr.GetQuestTemplate(action.quest_event_all.questId))
|
||||
{
|
||||
if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT))
|
||||
sLog.outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event_all.questId);
|
||||
|
||||
@@ -43,5 +43,5 @@ class CreatureEventAIMgr
|
||||
CreatureEventAI_TextMap m_CreatureEventAI_TextMap;
|
||||
};
|
||||
|
||||
#define CreatureEAI_Mgr (*ACE_Singleton<CreatureEventAIMgr, ACE_Null_Mutex>::instance())
|
||||
#define sEventAIMgr (*ACE_Singleton<CreatureEventAIMgr, ACE_Null_Mutex>::instance())
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user