*Make shattered barrier and prayer of mending work again, Refresh aura when recasted on target with full stackamount.
--HG-- branch : trunk
This commit is contained in:
@@ -1192,8 +1192,8 @@ void Aura::SetStackAmount(uint8 stackAmount)
|
|||||||
{
|
{
|
||||||
Unit *target = GetTarget();
|
Unit *target = GetTarget();
|
||||||
Unit *caster = GetCaster();
|
Unit *caster = GetCaster();
|
||||||
if (!target || !caster)
|
if (target && caster)
|
||||||
return;
|
{
|
||||||
m_stackAmount = stackAmount;
|
m_stackAmount = stackAmount;
|
||||||
for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
|
for (uint8 i=0;i<MAX_SPELL_EFFECTS;++i)
|
||||||
{
|
{
|
||||||
@@ -1212,6 +1212,7 @@ void Aura::SetStackAmount(uint8 stackAmount)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
RefreshAura();
|
RefreshAura();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-12
@@ -2081,7 +2081,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
|
|||||||
if (auraeff->GetAmount()<=0)
|
if (auraeff->GetAmount()<=0)
|
||||||
{
|
{
|
||||||
uint32 removedAuras = pVictim->m_removedAuras.size();
|
uint32 removedAuras = pVictim->m_removedAuras.size();
|
||||||
pVictim->RemoveAura(aura);
|
pVictim->RemoveAura(aura, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||||
if (removedAuras+1<pVictim->m_removedAuras.size())
|
if (removedAuras+1<pVictim->m_removedAuras.size())
|
||||||
i=vSchoolAbsorb.begin();
|
i=vSchoolAbsorb.begin();
|
||||||
}
|
}
|
||||||
@@ -2118,7 +2118,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
|
|||||||
(*i)->SetAmount((*i)->GetAmount()-currentAbsorb);
|
(*i)->SetAmount((*i)->GetAmount()-currentAbsorb);
|
||||||
if((*i)->GetAmount() <= 0)
|
if((*i)->GetAmount() <= 0)
|
||||||
{
|
{
|
||||||
pVictim->RemoveAurasDueToSpell((*i)->GetId());
|
pVictim->RemoveAura((*i)->GetParentAura(), AURA_REMOVE_BY_ENEMY_SPELL);
|
||||||
next = vManaShield.begin();
|
next = vManaShield.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3756,6 +3756,8 @@ bool Unit::AddAura(Aura *Aur)
|
|||||||
{
|
{
|
||||||
if(foundAura->GetStackAmount() < aurSpellInfo->StackAmount)
|
if(foundAura->GetStackAmount() < aurSpellInfo->StackAmount)
|
||||||
foundAura->SetStackAmount(foundAura->GetStackAmount()+1);
|
foundAura->SetStackAmount(foundAura->GetStackAmount()+1);
|
||||||
|
else
|
||||||
|
foundAura->RefreshAura();
|
||||||
delete Aur;
|
delete Aur;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -12363,8 +12365,6 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( AuraEffect* triggeredByAura )
|
|||||||
else
|
else
|
||||||
radius = GetSpellMaxRangeForTarget(triggeredByAura->GetCaster() ,sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
|
radius = GetSpellMaxRangeForTarget(triggeredByAura->GetCaster() ,sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
|
||||||
|
|
||||||
//Get max possible jumps for aura to get proper charges amount for target
|
|
||||||
|
|
||||||
if(Player* caster = ((Player*)triggeredByAura->GetCaster()))
|
if(Player* caster = ((Player*)triggeredByAura->GetCaster()))
|
||||||
{
|
{
|
||||||
caster->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius,NULL);
|
caster->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius,NULL);
|
||||||
@@ -12372,7 +12372,7 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( AuraEffect* triggeredByAura )
|
|||||||
if (Unit* target= GetNextRandomRaidMemberOrPet(radius))
|
if (Unit* target= GetNextRandomRaidMemberOrPet(radius))
|
||||||
{
|
{
|
||||||
CastCustomSpell(target,spellProto->Id,&heal,NULL,NULL,true,NULL,triggeredByAura,caster->GetGUID());
|
CastCustomSpell(target,spellProto->Id,&heal,NULL,NULL,true,NULL,triggeredByAura,caster->GetGUID());
|
||||||
if (Aura * aur = GetAura(spellProto->Id, caster->GetGUID()))
|
if (Aura * aur = target->GetAura(spellProto->Id, caster->GetGUID()))
|
||||||
aur->SetAuraCharges(jumps);
|
aur->SetAuraCharges(jumps);
|
||||||
|
|
||||||
//bonus must be applied after aura cast on target
|
//bonus must be applied after aura cast on target
|
||||||
@@ -12426,19 +12426,14 @@ bool Unit::HandleAuraRaidProcFromCharge( AuraEffect* triggeredByAura )
|
|||||||
else
|
else
|
||||||
radius = GetSpellMaxRangeForTarget(triggeredByAura->GetCaster() ,sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
|
radius = GetSpellMaxRangeForTarget(triggeredByAura->GetCaster() ,sSpellRangeStore.LookupEntry(spellProto->rangeIndex));
|
||||||
|
|
||||||
//Get max possible jumps for aura to get proper charges amount for target
|
|
||||||
int32 maxJumps = spellProto->procCharges;
|
|
||||||
|
|
||||||
if(Player* caster = ((Player*)triggeredByAura->GetCaster()))
|
if(Player* caster = ((Player*)triggeredByAura->GetCaster()))
|
||||||
{
|
{
|
||||||
caster->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius,NULL);
|
caster->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius,NULL);
|
||||||
|
|
||||||
caster->ApplySpellMod(spellProto->Id, SPELLMOD_CHARGES, maxJumps, NULL);
|
|
||||||
|
|
||||||
if (Unit* target= GetNextRandomRaidMemberOrPet(radius))
|
if (Unit* target= GetNextRandomRaidMemberOrPet(radius))
|
||||||
{
|
{
|
||||||
CastSpell(this, spellProto, true,NULL,triggeredByAura,caster_guid);
|
CastSpell(target, spellProto, true,NULL,triggeredByAura,caster_guid);
|
||||||
if (Aura * aur = GetAura(spellProto->Id, caster->GetGUID()))
|
if (Aura * aur = target->GetAura(spellProto->Id, caster->GetGUID()))
|
||||||
aur->SetAuraCharges(jumps);
|
aur->SetAuraCharges(jumps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user