Core/ObjectMgr: Refactor sCreatureStorage

This commit is contained in:
leak
2011-04-28 22:57:08 +02:00
parent e2e9431ca3
commit c51c817a45
45 changed files with 474 additions and 396 deletions
@@ -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);
}