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
@@ -650,7 +650,7 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
amount += int32(caster->ApplyEffectModifiers(m_spellProto, m_effIndex, mwb));
// "If used while your target is above 75% health, Rend does 35% more damage."
// as for 3.1.3 only ranks above 9 (wrong tooltip?)
if (sSpellMgr.GetSpellRank(m_spellProto->Id) >= 9)
if (sSpellMgr->GetSpellRank(m_spellProto->Id) >= 9)
{
if (GetBase()->GetUnitOwner()->HasAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, m_spellProto, caster))
AddPctN(amount, SpellMgr::CalculateSpellEffectAmount(m_spellProto, 2, caster));
@@ -1025,7 +1025,7 @@ void AuraEffect::ApplySpellMod(Unit * target, bool apply)
Aura * aura = iter->second->GetBase();
// only passive auras-active auras should have amount set on spellcast and not be affected
// if aura is casted by others, it will not be affected
if ((aura->IsPassive() || aura->GetSpellProto()->AttributesEx2 & SPELL_ATTR2_ALWAYS_APPLY_MODIFIERS) && aura->GetCasterGUID() == guid && sSpellMgr.IsAffectedByMod(aura->GetSpellProto(), m_spellmod))
if ((aura->IsPassive() || aura->GetSpellProto()->AttributesEx2 & SPELL_ATTR2_ALWAYS_APPLY_MODIFIERS) && aura->GetCasterGUID() == guid && sSpellMgr->IsAffectedByMod(aura->GetSpellProto(), m_spellmod))
{
if (GetMiscValue() == SPELLMOD_ALL_EFFECTS)
{
@@ -2418,7 +2418,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
else
{
Creature* c = triggerTarget->ToCreature();
if (!c || (c && !sScriptMgr.OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), triggerTarget->ToCreature())) ||
if (!c || (c && !sScriptMgr->OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), triggerTarget->ToCreature())) ||
(c && !c->AI()->sOnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()))))
sLog.outError("AuraEffect::TriggerSpell: Spell %u has value 0 in EffectTriggered[%d] and is therefor not handled. Define as custom case?",GetId(),GetEffIndex());
}
@@ -2959,7 +2959,7 @@ void AuraEffect::HandlePhase(AuraApplication const * aurApp, uint8 mode, bool ap
{
newPhase = PHASEMASK_NORMAL;
if (Creature* creature = target->ToCreature())
if (CreatureData const* data = sObjectMgr.GetCreatureData(creature->GetDBTableGUIDLow()))
if (CreatureData const* data = sObjectMgr->GetCreatureData(creature->GetDBTableGUIDLow()))
newPhase = data->phaseMask;
}
@@ -3340,8 +3340,8 @@ void AuraEffect::HandleAuraTransform(AuraApplication const * aurApp, uint8 mode,
if (target->GetTypeId() == TYPEID_PLAYER)
team = target->ToPlayer()->GetTeam();
uint32 display_id = sObjectMgr.ChooseDisplayId(team,ci);
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
uint32 display_id = sObjectMgr->ChooseDisplayId(team,ci);
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(display_id);
if (minfo)
display_id = minfo->modelid;
@@ -3789,8 +3789,8 @@ void AuraEffect::HandleAuraMounted(AuraApplication const * aurApp, uint8 mode, b
if (target->GetTypeId() == TYPEID_PLAYER)
team = target->ToPlayer()->GetTeam();
uint32 display_id = sObjectMgr.ChooseDisplayId(team,ci);
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
uint32 display_id = sObjectMgr->ChooseDisplayId(team,ci);
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(display_id);
if (minfo)
display_id = minfo->modelid;
@@ -4420,7 +4420,7 @@ void AuraEffect::HandleAuraModEffectImmunity(AuraApplication const * aurApp, uin
bg->EventPlayerDroppedFlag(target->ToPlayer());
}
else
sOutdoorPvPMgr.HandleDropFlag((Player*)target,GetSpellProto()->Id);
sOutdoorPvPMgr->HandleDropFlag((Player*)target,GetSpellProto()->Id);
}
}
@@ -6098,8 +6098,8 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
if (target->GetTypeId() == TYPEID_PLAYER)
team = target->ToPlayer()->GetTeam();
uint32 display_id = sObjectMgr.ChooseDisplayId(team, creatureInfo);
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
uint32 display_id = sObjectMgr->ChooseDisplayId(team, creatureInfo);
CreatureModelInfo const *minfo = sObjectMgr->GetCreatureModelRandomGender(display_id);
if (minfo)
display_id = minfo->modelid;
@@ -6200,7 +6200,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
if (mode & AURA_EFFECT_HANDLE_REAL)
{
// pet auras
if (PetAura const* petSpell = sSpellMgr.GetPetAura(GetId(), m_effIndex))
if (PetAura const* petSpell = sSpellMgr->GetPetAura(GetId(), m_effIndex))
{
if (apply)
target->AddPetAura(petSpell);