Core: Get rid of dirty operator workaround for ACE_Singleton class implementation

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-12-22 21:25:23 +01:00
parent 0948fc5bbe
commit 0f3b9019a8
159 changed files with 1943 additions and 1939 deletions
+15 -15
View File
@@ -143,7 +143,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
mTextTimer = e.action.talk.duration;
mTextGUID = IsPlayer(mLastInvoker)? mLastInvoker->GetGUID() : NULL;//invoker, used for $vars in texts
mUseTextTimer = true;
sCreatureTextMgr.SendChat(talker, uint8(e.action.talk.textGroupID), mTextGUID);
sCreatureTextMgr->SendChat(talker, uint8(e.action.talk.textGroupID), mTextGUID);
break;
}
case SMART_ACTION_SIMPLE_TALK:
@@ -155,10 +155,10 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
{
if (IsCreature((*itr)))
{
sCreatureTextMgr.SendChat((*itr)->ToCreature(), uint8(e.action.talk.textGroupID), IsPlayer(mLastInvoker)? mLastInvoker->GetGUID() : NULL);
sCreatureTextMgr->SendChat((*itr)->ToCreature(), uint8(e.action.talk.textGroupID), IsPlayer(mLastInvoker)? mLastInvoker->GetGUID() : NULL);
} else if (IsPlayer((*itr)))
{
sCreatureTextMgr.SendChat(me, uint8(e.action.talk.textGroupID),IsPlayer(mLastInvoker)? mLastInvoker->GetGUID() : NULL,CHAT_TYPE_END,LANG_ADDON,TEXT_RANGE_NORMAL,NULL,TEAM_OTHER,false, (*itr)->ToPlayer());
sCreatureTextMgr->SendChat(me, uint8(e.action.talk.textGroupID),IsPlayer(mLastInvoker)? mLastInvoker->GetGUID() : NULL,CHAT_TYPE_END,LANG_ADDON,TEXT_RANGE_NORMAL,NULL,TEAM_OTHER,false, (*itr)->ToPlayer());
}
}
}
@@ -179,7 +179,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
if (targets)
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
if (IsCreature((*itr)))
sCreatureTextMgr.SendSound((*itr)->ToCreature(), e.action.sound.sound, CHAT_TYPE_SAY, 0, TextRange(e.action.sound.range), Team(NULL), false);
sCreatureTextMgr->SendSound((*itr)->ToCreature(), e.action.sound.sound, CHAT_TYPE_SAY, 0, TextRange(e.action.sound.range), Team(NULL), false);
break;
}
case SMART_ACTION_SET_FACTION:
@@ -222,7 +222,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
{
if (CreatureInfo const* ci = GetCreatureTemplateStore(e.action.morphOrMount.creature))
{
uint32 display_id = sObjectMgr.ChooseDisplayId(0, ci);
uint32 display_id = sObjectMgr->ChooseDisplayId(0, ci);
(*itr)->ToCreature()->SetDisplayId(display_id);
}
}
@@ -253,7 +253,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
{
if (IsPlayer((*itr)))
if (const Quest* q = sObjectMgr.GetQuestTemplate(e.action.quest.quest))
if (const Quest* q = sObjectMgr->GetQuestTemplate(e.action.quest.quest))
(*itr)->ToPlayer()->AddQuest(q, NULL);
}
break;
@@ -640,7 +640,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
{
if (CreatureInfo const* cInfo = GetCreatureTemplateStore(e.action.morphOrMount.creature))
{
uint32 display_id = sObjectMgr.ChooseDisplayId(0, cInfo);
uint32 display_id = sObjectMgr->ChooseDisplayId(0, cInfo);
(*itr)->ToUnit()->Mount(display_id);
}
}
@@ -945,7 +945,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
uint32 slot[3];
if (e.action.equip.entry)
{
EquipmentInfo const *einfo = sObjectMgr.GetEquipmentInfo(e.action.equip.entry);
EquipmentInfo const *einfo = sObjectMgr->GetEquipmentInfo(e.action.equip.entry);
if (!einfo)
{
sLog.outErrorDb("SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info entry %u", e.action.equip.entry);
@@ -1279,7 +1279,7 @@ void SmartScript::InstallTemplate(SmartScriptHolder e)
//phase 1: despawn after time on movepoint reached
AddEvent(SMART_EVENT_MOVEMENTINFORM,0, POINT_MOTION_TYPE,SMART_RANDOM_POINT,0,0,SMART_ACTION_FORCE_DESPAWN,e.action.installTtemplate.param2,0,0,0,0,0,SMART_TARGET_NONE,0,0,0,1);
if (sCreatureTextMgr.TextExist(me->GetEntry(), (uint8)e.action.installTtemplate.param5))
if (sCreatureTextMgr->TextExist(me->GetEntry(), (uint8)e.action.installTtemplate.param5))
AddEvent(SMART_EVENT_MOVEMENTINFORM,0, POINT_MOTION_TYPE,SMART_RANDOM_POINT,0,0,SMART_ACTION_TALK,e.action.installTtemplate.param5,0,0,0,0,0,SMART_TARGET_NONE,0,0,0,1);
break;
}
@@ -2154,21 +2154,21 @@ void SmartScript::GetScript()
SmartAIEventList e;
if (me)
{
e = sSmartScriptMgr.GetScript(-((int32)me->GetDBTableGUIDLow()), mScriptType);
e = sSmartScriptMgr->GetScript(-((int32)me->GetDBTableGUIDLow()), mScriptType);
if (e.empty())
e = sSmartScriptMgr.GetScript((int32)me->GetEntry(), mScriptType);
e = sSmartScriptMgr->GetScript((int32)me->GetEntry(), mScriptType);
FillScript(e, me, NULL);
}
else if (go)
{
e = sSmartScriptMgr.GetScript(-((int32)go->GetDBTableGUIDLow()), mScriptType);
e = sSmartScriptMgr->GetScript(-((int32)go->GetDBTableGUIDLow()), mScriptType);
if (e.empty())
e = sSmartScriptMgr.GetScript((int32)go->GetEntry(), mScriptType);
e = sSmartScriptMgr->GetScript((int32)go->GetEntry(), mScriptType);
FillScript(e, go, NULL);
}
else if (trigger)
{
e = sSmartScriptMgr.GetScript((int32)trigger->id, mScriptType);
e = sSmartScriptMgr->GetScript((int32)trigger->id, mScriptType);
FillScript(e, NULL, trigger);
}
}
@@ -2328,7 +2328,7 @@ void SmartScript::DoFindFriendlyMissingBuff(std::list<Creature*>& _list, float r
void SmartScript::SetScript9(SmartScriptHolder &e, uint32 entry)
{
mTimedActionList.clear();
mTimedActionList = sSmartScriptMgr.GetScript(entry, SMART_SCRIPT_TYPE_TIMED_ACTIONLIST);
mTimedActionList = sSmartScriptMgr->GetScript(entry, SMART_SCRIPT_TYPE_TIMED_ACTIONLIST);
if (mTimedActionList.empty())
return;
for (SmartAIEventList::iterator i = mTimedActionList.begin(); i != mTimedActionList.end(); ++i)