*Do not allow persistant auras from the same caster stack on target.
--HG-- branch : trunk
This commit is contained in:
@@ -164,8 +164,8 @@ Creature::~Creature()
|
||||
i_AI = NULL;
|
||||
}
|
||||
|
||||
if(m_uint32Values)
|
||||
sLog.outDetail("Deconstruct Creature Entry = %u", GetEntry());
|
||||
//if(m_uint32Values)
|
||||
// sLog.outDetail("Deconstruct Creature Entry = %u", GetEntry());
|
||||
}
|
||||
|
||||
void Creature::AddToWorld()
|
||||
@@ -2105,7 +2105,7 @@ bool Creature::LoadCreaturesAddon(bool reload)
|
||||
continue;
|
||||
}
|
||||
|
||||
AddAuraEffect(AdditionalSpellInfo->Id, cAura->effect_idx, this);
|
||||
AddAuraEffect(AdditionalSpellInfo, cAura->effect_idx, this);
|
||||
sLog.outDebug("Spell: %u with Aura %u added to creature (GUIDLow: %u Entry: %u )", cAura->spell_id, AdditionalSpellInfo->EffectApplyAuraName[cAura->effect_idx],GetGUIDLow(),GetEntry());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,8 +178,11 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target)
|
||||
if (i_dynobject.IsAffecting(target))
|
||||
return;
|
||||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId());
|
||||
uint32 eff_index = i_dynobject.GetEffIndex();
|
||||
if(target->HasAuraEffect(i_dynobject.GetSpellId(), eff_index, i_check->GetGUID()))
|
||||
return;
|
||||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId());
|
||||
if(spellInfo->EffectImplicitTargetB[eff_index] == TARGET_DEST_DYNOBJ_ALLY
|
||||
|| spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_DST)
|
||||
{
|
||||
@@ -205,7 +208,7 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target)
|
||||
if (target->IsImmunedToSpell(spellInfo) || target->IsImmunedToSpellEffect(spellInfo, eff_index))
|
||||
return;
|
||||
// Apply PersistentAreaAura on target
|
||||
target->AddAuraEffect(spellInfo->Id, eff_index, i_dynobject.GetCaster());
|
||||
target->AddAuraEffect(spellInfo, eff_index, i_dynobject.GetCaster());
|
||||
i_dynobject.AddAffected(target);
|
||||
}
|
||||
|
||||
|
||||
@@ -750,7 +750,7 @@ void AreaAuraEffect::Update(uint32 diff)
|
||||
// recalculate basepoints for lower rank (all AreaAura spell not use custom basepoints?)
|
||||
//if(actualSpellInfo != GetSpellProto())
|
||||
// actualBasePoints = actualSpellInfo->EffectBasePoints[m_effIndex];
|
||||
Aura * aur = (*tIter)->AddAuraEffect(actualSpellInfo->Id, GetEffIndex(), caster, &m_currentBasePoints);
|
||||
(*tIter)->AddAuraEffect(actualSpellInfo, GetEffIndex(), caster, &m_currentBasePoints);
|
||||
|
||||
if(m_areaAuraType == AREA_AURA_ENEMY)
|
||||
caster->CombatStart(*tIter);
|
||||
@@ -5698,6 +5698,7 @@ void AuraEffect::PeriodicTick()
|
||||
if(!pCaster)
|
||||
return;
|
||||
|
||||
// Consecrate ticks can miss and will not show up in the combat log
|
||||
if( GetSpellProto()->Effect[GetEffIndex()]==SPELL_EFFECT_PERSISTENT_AREA_AURA &&
|
||||
pCaster->SpellHitResult(m_target,GetSpellProto(),false)!=SPELL_MISS_NONE)
|
||||
return;
|
||||
@@ -5746,7 +5747,8 @@ void AuraEffect::PeriodicTick()
|
||||
}
|
||||
}
|
||||
m_amount = 100 * m_tickNumber;
|
||||
}break;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
+5
-9
@@ -13610,16 +13610,12 @@ void Unit::AddAura(uint32 spellId, Unit* target)
|
||||
target->AddAura(Aur);
|
||||
}
|
||||
|
||||
Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster, int32 * basePoints)
|
||||
Aura * Unit::AddAuraEffect(const SpellEntry * spellInfo, uint8 effIndex, Unit* caster, int32 * basePoints)
|
||||
{
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
|
||||
if(!spellInfo || !caster)
|
||||
return NULL;
|
||||
|
||||
// can't do that for passive auras - they stack from same caster so there is no way to get exact aura which should get effect
|
||||
//assert (!IsPassiveSpell(spellInfo));
|
||||
|
||||
Aura * aur = GetAura(spellId, caster->GetGUID());
|
||||
Aura *aur = GetAura(spellInfo->Id, caster->GetGUID());
|
||||
|
||||
if (aur)
|
||||
{
|
||||
@@ -13636,10 +13632,10 @@ Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster, int32 *
|
||||
aur = new Aura(spellInfo, 1<<effIndex, amount, this ,caster);
|
||||
}
|
||||
else
|
||||
{
|
||||
aur = new Aura(spellInfo, 1<<effIndex, NULL, this ,caster);
|
||||
}
|
||||
AddAura(aur);
|
||||
|
||||
if(!AddAura(aur))
|
||||
return NULL;
|
||||
}
|
||||
return aur;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1188,7 +1188,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
void CastSpell(GameObject *go, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void AddAura(uint32 spellId, Unit *target);
|
||||
void HandleAuraEffect(AuraEffect * aureff, bool apply);
|
||||
Aura *AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster, int32 * basePoints=NULL);
|
||||
Aura *AddAuraEffect(const SpellEntry * spellInfo, uint8 effIndex, Unit* caster, int32 * basePoints=NULL);
|
||||
|
||||
bool IsDamageToThreatSpell(SpellEntry const * spellInfo) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user