*Fix Prayer of Mending spell bonus, thanks lobuz
--HG-- branch : trunk
This commit is contained in:
+17
-11
@@ -13655,12 +13655,6 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( AuraEffect* triggeredByAura )
|
|||||||
int32 heal = triggeredByAura->GetAmount();
|
int32 heal = triggeredByAura->GetAmount();
|
||||||
uint64 caster_guid = triggeredByAura->GetCasterGUID();
|
uint64 caster_guid = triggeredByAura->GetCasterGUID();
|
||||||
|
|
||||||
//Currently only Prayer Of Mending
|
|
||||||
if (!(spellProto->SpellFamilyName==SPELLFAMILY_PRIEST && spellProto->SpellFamilyFlags[1] & 0x20))
|
|
||||||
{
|
|
||||||
sLog.outDebug("Unit::HandleAuraRaidProcFromChargeWithValue, received not handled spell: %u", spellProto->Id);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// jumps
|
// jumps
|
||||||
int32 jumps = triggeredByAura->GetParentAura()->GetAuraCharges()-1;
|
int32 jumps = triggeredByAura->GetParentAura()->GetAuraCharges()-1;
|
||||||
|
|
||||||
@@ -13668,7 +13662,7 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( AuraEffect* triggeredByAura )
|
|||||||
triggeredByAura->GetParentAura()->SetAuraCharges(1); // will removed at next charges decrease
|
triggeredByAura->GetParentAura()->SetAuraCharges(1); // will removed at next charges decrease
|
||||||
|
|
||||||
// next target selection
|
// next target selection
|
||||||
if(jumps > 0 && IS_PLAYER_GUID(caster_guid))
|
if(jumps > 0 && IS_PLAYER_GUID(GetGUID()) && IS_PLAYER_GUID(caster_guid))
|
||||||
{
|
{
|
||||||
float radius;
|
float radius;
|
||||||
if (spellProto->EffectRadiusIndex[effIdx])
|
if (spellProto->EffectRadiusIndex[effIdx])
|
||||||
@@ -13679,13 +13673,24 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( AuraEffect* triggeredByAura )
|
|||||||
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);
|
||||||
|
heal = caster->SpellHealingBonus(this, spellProto, heal, HEAL);
|
||||||
|
|
||||||
if (Unit* target= GetNextRandomRaidMemberOrPet(radius))
|
if(Player *target = ((Player*)this)->GetNextRandomRaidMember(radius))
|
||||||
{
|
{
|
||||||
|
// aura will applied from caster, but spell casted from current aura holder
|
||||||
|
SpellModifier *mod = new SpellModifier;
|
||||||
|
mod->op = SPELLMOD_CHARGES;
|
||||||
|
mod->value = jumps-5; // negative
|
||||||
|
mod->type = SPELLMOD_FLAT;
|
||||||
|
mod->spellId = spellProto->Id;
|
||||||
|
mod->mask = spellProto->SpellFamilyFlags;
|
||||||
|
mod->charges = 0;
|
||||||
|
|
||||||
|
caster->AddSpellMod(mod, true);
|
||||||
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 = target->GetAura(spellProto->Id, caster->GetGUID()))
|
caster->AddSpellMod(mod, false);
|
||||||
aur->SetAuraCharges(jumps);
|
|
||||||
caster->SpellHealingBonus(this, spellProto, heal, HEAL);
|
heal = caster->SpellHealingBonus(this, spellProto, heal, HEAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13693,6 +13698,7 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( AuraEffect* triggeredByAura )
|
|||||||
// heal
|
// heal
|
||||||
CastCustomSpell(this,33110,&heal,NULL,NULL,true,NULL,NULL,caster_guid);
|
CastCustomSpell(this,33110,&heal,NULL,NULL,true,NULL,NULL,caster_guid);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
bool Unit::HandleAuraRaidProcFromCharge( AuraEffect* triggeredByAura )
|
bool Unit::HandleAuraRaidProcFromCharge( AuraEffect* triggeredByAura )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user