mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 21:50:50 -04:00
Core/ObjectMgr: Refactor sCreatureStorage
This commit is contained in:
@@ -234,7 +234,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate((*itr)->ToCreature()->GetEntry()))
|
||||
if (CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate((*itr)->ToCreature()->GetEntry()))
|
||||
{
|
||||
if ((*itr)->ToCreature()->getFaction() != ci->faction_A)
|
||||
{
|
||||
@@ -266,7 +266,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
//set model based on entry from creature_template
|
||||
if (e.action.morphOrMount.creature)
|
||||
{
|
||||
if (CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(e.action.morphOrMount.creature))
|
||||
if (CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(e.action.morphOrMount.creature))
|
||||
{
|
||||
uint32 display_id = sObjectMgr->ChooseDisplayId(0, ci);
|
||||
(*itr)->ToCreature()->SetDisplayId(display_id);
|
||||
@@ -940,7 +940,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
{
|
||||
if (e.action.morphOrMount.creature > 0)
|
||||
{
|
||||
if (CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(e.action.morphOrMount.creature))
|
||||
if (CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(e.action.morphOrMount.creature))
|
||||
{
|
||||
uint32 display_id = sObjectMgr->ChooseDisplayId(0, cInfo);
|
||||
(*itr)->ToUnit()->Mount(display_id);
|
||||
|
||||
Reference in New Issue
Block a user