Core/ObjectMgr: Refactor sCreatureStorage
This commit is contained in:
@@ -3351,7 +3351,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const * aurApp, uint8 mode,
|
||||
}
|
||||
else
|
||||
{
|
||||
CreatureInfo const * ci = ObjectMgr::GetCreatureTemplate(GetMiscValue());
|
||||
CreatureTemplate const * ci = sObjectMgr->GetCreatureTemplate(GetMiscValue());
|
||||
if (!ci)
|
||||
{
|
||||
target->SetDisplayId(16358); // pig pink ^_^
|
||||
@@ -3410,7 +3410,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const * aurApp, uint8 mode,
|
||||
if (!target->GetAuraEffectsByType(SPELL_AURA_MOUNTED).empty())
|
||||
{
|
||||
uint32 cr_id = target->GetAuraEffectsByType(SPELL_AURA_MOUNTED).front()->GetMiscValue();
|
||||
if (CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(cr_id))
|
||||
if (CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(cr_id))
|
||||
{
|
||||
uint32 team = 0;
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -3866,7 +3866,7 @@ void AuraEffect::HandleAuraMounted(AuraApplication const * aurApp, uint8 mode, b
|
||||
creatureEntry = 15665;
|
||||
}
|
||||
|
||||
CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(creatureEntry);
|
||||
CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(creatureEntry);
|
||||
if (!ci)
|
||||
{
|
||||
sLog->outErrorDb("AuraMounted: `creature_template`='%u' not found in database (only need its modelid)",GetMiscValue());
|
||||
@@ -6147,7 +6147,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
else
|
||||
creatureEntry = target->GetAuraEffectsByType(SPELL_AURA_MOUNTED).front()->GetMiscValue();
|
||||
|
||||
if (CreatureInfo const* creatureInfo = ObjectMgr::GetCreatureTemplate(creatureEntry))
|
||||
if (CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(creatureEntry))
|
||||
{
|
||||
uint32 team = 0;
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -6389,7 +6389,7 @@ void AuraEffect::HandleAuraEmpathy(AuraApplication const * aurApp, uint8 mode, b
|
||||
return;
|
||||
}
|
||||
|
||||
CreatureInfo const * ci = ObjectMgr::GetCreatureTemplate(target->GetEntry());
|
||||
CreatureTemplate const * ci = sObjectMgr->GetCreatureTemplate(target->GetEntry());
|
||||
if (ci && ci->type == CREATURE_TYPE_BEAST)
|
||||
target->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user