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

Current combat target or just selection will be used instead if it not friendly.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-09 15:54:49 -05:00
parent bc14ebb102
commit 2c4dad27db
+15 -24
View File
@@ -5202,32 +5202,11 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
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
@@ -5246,8 +5225,20 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
// Get Scryers reputation rank
if (((Player *)this)->GetReputationRank(934) == REP_EXALTED)
{
if(this->IsFriendlyTo(target))
return false;
// 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;