mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
*Some improvements in procflags:
-handle proc_flag_death -allow trap selection in spell proc event entry for proc_flag_on_trap *Add spell_proc_event entry for Lock and Load - by Bengan *Add spell_proc_event entry for Improved Spell Reflection. --HG-- branch : trunk
This commit is contained in:
@@ -2960,7 +2960,7 @@ SpellMissInfo Unit::SpellHitResult(Unit *pVictim, SpellEntry const *spell, bool
|
||||
if (reflectchance > 0 && roll_chance_i(reflectchance))
|
||||
{
|
||||
// Start triggers for remove charges if need (trigger only for victim, and mark as active spell)
|
||||
ProcDamageAndSpell(pVictim, PROC_FLAG_NONE, PROC_FLAG_SUCCESSFUL_NEGATIVE_MAGIC_SPELL, PROC_EX_REFLECT, 1, BASE_ATTACK, spell);
|
||||
ProcDamageAndSpell(pVictim, PROC_FLAG_NONE, PROC_FLAG_TAKEN_NEGATIVE_MAGIC_SPELL, PROC_EX_REFLECT , 1, BASE_ATTACK, spell);
|
||||
return SPELL_MISS_REFLECT;
|
||||
}
|
||||
}
|
||||
@@ -7818,7 +7818,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
||||
case 56453:
|
||||
{
|
||||
// Proc only from trap activation (from periodic proc another aura of this spell)
|
||||
if (!(procFlags & PROC_FLAG_ON_TRAP_ACTIVATION))
|
||||
if (!(procFlags & PROC_FLAG_ON_TRAP_ACTIVATION) || !roll_chance_i(triggerAmount))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
@@ -13443,8 +13443,8 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co
|
||||
if (!EventProcFlag)
|
||||
return false;
|
||||
|
||||
// Additional checks for triggered spells
|
||||
if (procExtra & PROC_EX_INTERNAL_TRIGGERED)
|
||||
// Additional checks for triggered spells (ignore trap casts)
|
||||
if (procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_ON_TRAP_ACTIVATION))
|
||||
{
|
||||
if (!(spellProto->AttributesEx3 & SPELL_ATTR_EX3_CAN_PROC_TRIGGERED))
|
||||
return false;
|
||||
@@ -13463,7 +13463,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co
|
||||
if (!allow)
|
||||
return false;
|
||||
}
|
||||
// Aura added by spell can`t trogger from self (prevent drop charges/do triggers)
|
||||
// Aura added by spell can`t trigger from self (prevent drop charges/do triggers)
|
||||
// But except periodic and kill triggers (can triggered from self)
|
||||
if(procSpell && procSpell->Id == spellProto->Id
|
||||
&& !(spellProto->procFlags&(PROC_FLAG_ON_TAKE_PERIODIC | PROC_FLAG_KILL)))
|
||||
@@ -13662,6 +13662,9 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
|
||||
player->ProcDamageAndSpell(pVictim, PROC_FLAG_NONE, PROC_FLAG_KILLED,PROC_EX_NONE, 0);
|
||||
}
|
||||
|
||||
// Proc auras on death - must be before aura/combat remove
|
||||
pVictim->ProcDamageAndSpell(NULL, PROC_FLAG_DEATH, PROC_FLAG_NONE, PROC_EX_NONE, 0, BASE_ATTACK, 0);
|
||||
|
||||
// if talent known but not triggered (check priest class for speedup check)
|
||||
bool SpiritOfRedemption = false;
|
||||
if(pVictim->GetTypeId()==TYPEID_PLAYER && pVictim->getClass()==CLASS_PRIEST )
|
||||
|
||||
Reference in New Issue
Block a user