[8336] Prevent apply item 34678 damage effect to cast target if it's friendly.

Current combat target or just selection will be used instead if it not friendly.
This commit is contained in:
VladimirMangos 2009-08-09 09:57:58 +04:00
parent 556c817865
commit 6b25da27dd
2 changed files with 17 additions and 23 deletions

View file

@ -4726,32 +4726,11 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
/*
// TODO: need find item for aura and triggered spells
// Sunwell Exalted Caster Neck (??? neck)
// cast ??? Light's Wrath if Exalted by Aldor
// cast ??? Arcane Bolt if Exalted by Scryers*/
case 46569:
return false; // disable for while
/*
{
if(GetTypeId() != TYPEID_PLAYER)
return false;
// Get Aldor reputation rank
if (((Player *)this)->GetReputationRank(932) == REP_EXALTED)
{
target = this;
triggered_spell_id = ???
break;
}
// Get Scryers reputation rank
if (((Player *)this)->GetReputationRank(934) == REP_EXALTED)
{
triggered_spell_id = ???
break;
}
return false;
}*/
return false; // old unused version
// Sunwell Exalted Caster Neck (Shattered Sun Pendant of Acumen neck)
// cast 45479 Light's Wrath if Exalted by Aldor
// cast 45429 Arcane Bolt if Exalted by Scryers
@ -4770,6 +4749,21 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
// Get Scryers reputation rank
if (((Player *)this)->GetReputationRank(934) == REP_EXALTED)
{
// triggered at positive/self casts also, current attack target used then
if(IsFriendlyTo(target))
{
target = getVictim();
if(!target)
{
uint64 selected_guid = ((Player *)this)->GetSelection();
target = ObjectAccessor::GetUnit(*this,selected_guid);
if(!target)
return false;
}
if(IsFriendlyTo(target))
return false;
}
triggered_spell_id = 45429;
break;
}