* Some singleton renames for consistency:
accmgr -> AccountMgr objmgr -> ObjectMgr auctionmgr -> sAuctionMgr spellmgr -> sSpellMgr CreatureEAI_Mgr -> sEventAIMgr achievementmgr -> sAchievementMgr gameeventmgr -> sGameEventMgr sInstanceSaveManager -> sInstanceSaveMgr poolhandler -> sPoolMgr --HG-- branch : trunk
This commit is contained in:
@@ -616,7 +616,7 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
|
||||
amount+=caster->ApplyEffectModifiers(m_spellProto,m_effIndex,int32(((mwb_min+mwb_max)/2+ap*mws/14000)*0.2f));
|
||||
// "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 (spellmgr.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))
|
||||
amount += int32(amount * SpellMgr::CalculateSpellEffectAmount(m_spellProto, 2, caster) / 100.0f);
|
||||
@@ -968,7 +968,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->GetCasterGUID() == guid && spellmgr.IsAffectedByMod(aura->GetSpellProto(), m_spellmod))
|
||||
if (aura->IsPassive() && aura->GetCasterGUID() == guid && sSpellMgr.IsAffectedByMod(aura->GetSpellProto(), m_spellmod))
|
||||
{
|
||||
if (GetMiscValue() == SPELLMOD_ALL_EFFECTS)
|
||||
{
|
||||
@@ -3092,7 +3092,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const * aurApp, uint8 mode,
|
||||
}
|
||||
else
|
||||
{
|
||||
CreatureInfo const * ci = objmgr.GetCreatureTemplate(GetMiscValue());
|
||||
CreatureInfo const * ci = sObjectMgr.GetCreatureTemplate(GetMiscValue());
|
||||
if (!ci)
|
||||
{
|
||||
target->SetDisplayId(16358); // pig pink ^_^
|
||||
@@ -3166,14 +3166,14 @@ 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 = objmgr.GetCreatureTemplate(cr_id))
|
||||
if (CreatureInfo const* ci = sObjectMgr.GetCreatureTemplate(cr_id))
|
||||
{
|
||||
uint32 team = 0;
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
team = target->ToPlayer()->GetTeam();
|
||||
|
||||
uint32 display_id = objmgr.ChooseDisplayId(team,ci);
|
||||
CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(display_id);
|
||||
uint32 display_id = sObjectMgr.ChooseDisplayId(team,ci);
|
||||
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
|
||||
if (minfo)
|
||||
display_id = minfo->modelid;
|
||||
|
||||
@@ -3599,7 +3599,7 @@ void AuraEffect::HandleAuraMounted(AuraApplication const * aurApp, uint8 mode, b
|
||||
|
||||
if (apply)
|
||||
{
|
||||
CreatureInfo const* ci = objmgr.GetCreatureTemplate(GetMiscValue());
|
||||
CreatureInfo const* ci = sObjectMgr.GetCreatureTemplate(GetMiscValue());
|
||||
if (!ci)
|
||||
{
|
||||
sLog.outErrorDb("AuraMounted: `creature_template`='%u' not found in database (only need it modelid)",GetMiscValue());
|
||||
@@ -3610,8 +3610,8 @@ void AuraEffect::HandleAuraMounted(AuraApplication const * aurApp, uint8 mode, b
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
team = target->ToPlayer()->GetTeam();
|
||||
|
||||
uint32 display_id = objmgr.ChooseDisplayId(team,ci);
|
||||
CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(display_id);
|
||||
uint32 display_id = sObjectMgr.ChooseDisplayId(team,ci);
|
||||
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
|
||||
if (minfo)
|
||||
display_id = minfo->modelid;
|
||||
|
||||
@@ -6039,7 +6039,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const * aurApp, uint8 mode, boo
|
||||
if (mode & AURA_EFFECT_HANDLE_REAL)
|
||||
{
|
||||
// pet auras
|
||||
if (PetAura const* petSpell = spellmgr.GetPetAura(GetId(), m_effIndex))
|
||||
if (PetAura const* petSpell = sSpellMgr.GetPetAura(GetId(), m_effIndex))
|
||||
{
|
||||
if (apply)
|
||||
target->AddPetAura(petSpell);
|
||||
@@ -6171,7 +6171,7 @@ void AuraEffect::HandleAuraEmpathy(AuraApplication const * aurApp, uint8 mode, b
|
||||
return;
|
||||
}
|
||||
|
||||
CreatureInfo const * ci = objmgr.GetCreatureTemplate(target->GetEntry());
|
||||
CreatureInfo 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