mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 20:22:23 -04:00
Core/Misc: Do not use singleton when calling to static function ChooseDisplayId (and remove unused parameter)
This commit is contained in:
@@ -83,7 +83,6 @@ SmartScript::SmartScript()
|
||||
mEventPhase = 0;
|
||||
mPathId = 0;
|
||||
mTargetStorage = new ObjectListMap();
|
||||
mStoredEvents.clear();
|
||||
mTextTimer = 0;
|
||||
mLastTextID = 0;
|
||||
mTextGUID = 0;
|
||||
@@ -313,10 +312,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
{
|
||||
if (CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(e.action.morphOrMount.creature))
|
||||
{
|
||||
uint32 display_id = sObjectMgr->ChooseDisplayId(0, ci);
|
||||
(*itr)->ToCreature()->SetDisplayId(display_id);
|
||||
uint32 displayId = ObjectMgr::ChooseDisplayId(ci);
|
||||
(*itr)->ToCreature()->SetDisplayId(displayId);
|
||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL: Creature entry %u, GuidLow %u set displayid to %u",
|
||||
(*itr)->GetEntry(), (*itr)->GetGUIDLow(), display_id);
|
||||
(*itr)->GetEntry(), (*itr)->GetGUIDLow(), displayId);
|
||||
}
|
||||
}
|
||||
//if no param1, then use value from param2 (modelId)
|
||||
@@ -1050,10 +1049,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (e.action.morphOrMount.creature > 0)
|
||||
{
|
||||
if (CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(e.action.morphOrMount.creature))
|
||||
{
|
||||
uint32 display_id = sObjectMgr->ChooseDisplayId(0, cInfo);
|
||||
(*itr)->ToUnit()->Mount(display_id);
|
||||
}
|
||||
(*itr)->ToUnit()->Mount(ObjectMgr::ChooseDisplayId(cInfo));
|
||||
}
|
||||
else
|
||||
(*itr)->ToUnit()->Mount(e.action.morphOrMount.model);
|
||||
|
||||
Reference in New Issue
Block a user