*Implement attribute flag SPELL_ATTR_EX3_DISABLE_PROC - this fixes double proc of seal auras
*Add Judgement Anti-Parry/Dodge Passive spell for paladins. --HG-- branch : trunk
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
DELETE FROM `playercreateinfo_spell` WHERE `spell` = 60091;
|
||||||
|
INSERT INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES
|
||||||
|
(1, 2, 60091, 'Judgement Anti-Parry/Dodge Passive'),
|
||||||
|
(3, 2, 60091, 'Judgement Anti-Parry/Dodge Passive'),
|
||||||
|
(10, 2, 60091, 'Judgement Anti-Parry/Dodge Passive'),
|
||||||
|
(11, 2, 60091, 'Judgement Anti-Parry/Dodge Passive');
|
||||||
@@ -337,7 +337,7 @@ enum SpellCategory
|
|||||||
#define SPELL_ATTR_EX3_UNK16 0x00010000 // 16 no triggers effects that trigger on casting a spell??
|
#define SPELL_ATTR_EX3_UNK16 0x00010000 // 16 no triggers effects that trigger on casting a spell??
|
||||||
#define SPELL_ATTR_EX3_NO_INITIAL_AGGRO 0x00020000 // 17 Soothe Animal, 39758, Mind Soothe
|
#define SPELL_ATTR_EX3_NO_INITIAL_AGGRO 0x00020000 // 17 Soothe Animal, 39758, Mind Soothe
|
||||||
#define SPELL_ATTR_EX3_UNK18 0x00040000 // 18
|
#define SPELL_ATTR_EX3_UNK18 0x00040000 // 18
|
||||||
#define SPELL_ATTR_EX3_UNK19 0x00080000 // 19 spells triggered by spell with this flag can't proc caster auras and can proc from triggered (swings too - 20178)
|
#define SPELL_ATTR_EX3_DISABLE_PROC 0x00080000 // 19 during aura proc no spells can trigger (20178, 20375)
|
||||||
#define SPELL_ATTR_EX3_DEATH_PERSISTENT 0x00100000 // 20 Death persistent spells
|
#define SPELL_ATTR_EX3_DEATH_PERSISTENT 0x00100000 // 20 Death persistent spells
|
||||||
#define SPELL_ATTR_EX3_UNK21 0x00200000 // 21
|
#define SPELL_ATTR_EX3_UNK21 0x00200000 // 21
|
||||||
#define SPELL_ATTR_EX3_REQ_WAND 0x00400000 // 22 Req wand
|
#define SPELL_ATTR_EX3_REQ_WAND 0x00400000 // 22 Req wand
|
||||||
|
|||||||
@@ -824,15 +824,6 @@ void Spell::prepareDataForTriggerSystem(AuraEffect * triggeredByAura)
|
|||||||
{
|
{
|
||||||
m_procEx |= PROC_EX_INTERNAL_REQ_FAMILY;
|
m_procEx |= PROC_EX_INTERNAL_REQ_FAMILY;
|
||||||
}
|
}
|
||||||
// Check done for judgements to make them not trigger seal effects
|
|
||||||
else if (m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_UNK1)
|
|
||||||
{
|
|
||||||
// Rogue poisons
|
|
||||||
if (m_spellInfo->SpellFamilyName && m_spellInfo->SpellFamilyFlags)
|
|
||||||
m_procEx |= PROC_EX_INTERNAL_REQ_FAMILY;
|
|
||||||
else
|
|
||||||
m_canTrigger=false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+53
-34
@@ -211,6 +211,10 @@ void Unit::Update( uint32 p_time )
|
|||||||
m_Events.Update( p_time );
|
m_Events.Update( p_time );
|
||||||
_UpdateSpells( p_time );
|
_UpdateSpells( p_time );
|
||||||
|
|
||||||
|
// If this is set during update SetCantProc(false) call is missing somewhere in the code
|
||||||
|
// Having this would prevent spells from being proced, so let's crash
|
||||||
|
assert(!m_procDeep)
|
||||||
|
|
||||||
if (CanHaveThreatList() && getThreatManager().isNeedUpdateToClient(p_time))
|
if (CanHaveThreatList() && getThreatManager().isNeedUpdateToClient(p_time))
|
||||||
SendThreatListUpdate();
|
SendThreatListUpdate();
|
||||||
|
|
||||||
@@ -2786,10 +2790,8 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
|
|||||||
if (roll < tmp)
|
if (roll < tmp)
|
||||||
return SPELL_MISS_RESIST;
|
return SPELL_MISS_RESIST;
|
||||||
|
|
||||||
// Ranged attack cannot be parry/dodge only deflect
|
// Ranged attacks can only miss, resist and deflect
|
||||||
// Check damage class instead of attack type to correctly handle judgements
|
if (attType == RANGED_ATTACK)
|
||||||
// - they are meele, but can't be dodged/parried/deflected because of ranged dmg class
|
|
||||||
if (spell->DmgClass == SPELL_DAMAGE_CLASS_RANGED)
|
|
||||||
{
|
{
|
||||||
// only if in front
|
// only if in front
|
||||||
if (pVictim->HasInArc(M_PI,this))
|
if (pVictim->HasInArc(M_PI,this))
|
||||||
@@ -12641,6 +12643,9 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
if (GetTypeId() == TYPEID_PLAYER && i->spellProcEvent && i->spellProcEvent->cooldown)
|
if (GetTypeId() == TYPEID_PLAYER && i->spellProcEvent && i->spellProcEvent->cooldown)
|
||||||
cooldown = i->spellProcEvent->cooldown;
|
cooldown = i->spellProcEvent->cooldown;
|
||||||
|
|
||||||
|
if (spellInfo->AttributesEx3 & SPELL_ATTR_EX3_DISABLE_PROC)
|
||||||
|
SetCantProc(true);
|
||||||
|
|
||||||
// This bool is needed till separate aura effect procs are still here
|
// This bool is needed till separate aura effect procs are still here
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
if (HandleAuraProc(pTarget, damage, i->aura, procSpell, procFlag, procExtra, cooldown, &handled))
|
if (HandleAuraProc(pTarget, damage, i->aura, procSpell, procFlag, procExtra, cooldown, &handled))
|
||||||
@@ -12665,8 +12670,8 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
{
|
{
|
||||||
sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
||||||
// Don`t drop charge or add cooldown for not started trigger
|
// Don`t drop charge or add cooldown for not started trigger
|
||||||
if (!HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
if (HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
||||||
continue;
|
takeCharges=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELL_AURA_PROC_TRIGGER_DAMAGE:
|
case SPELL_AURA_PROC_TRIGGER_DAMAGE:
|
||||||
@@ -12684,47 +12689,57 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
case SPELL_AURA_DUMMY:
|
case SPELL_AURA_DUMMY:
|
||||||
{
|
{
|
||||||
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
||||||
if (!HandleDummyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
if (HandleDummyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
||||||
continue;
|
{
|
||||||
|
takeCharges=true;
|
||||||
if (procDebug & 1)
|
if (procDebug & 1)
|
||||||
sLog.outError("Dummy aura of spell %d procs twice from one effect!",spellInfo->Id);
|
sLog.outError("Dummy aura of spell %d procs twice from one effect!",spellInfo->Id);
|
||||||
procDebug |= 1;
|
procDebug |= 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELL_AURA_OBS_MOD_ENERGY:
|
case SPELL_AURA_OBS_MOD_ENERGY:
|
||||||
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
||||||
if (!HandleObsModEnergyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
if (HandleObsModEnergyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
||||||
continue;
|
{
|
||||||
|
takeCharges=true;
|
||||||
if (procDebug & 2)
|
if (procDebug & 2)
|
||||||
sLog.outError("ObsModEnergy aura of spell %d procs twice from one effect!",spellInfo->Id);
|
sLog.outError("ObsModEnergy aura of spell %d procs twice from one effect!",spellInfo->Id);
|
||||||
procDebug |= 2;
|
procDebug |= 2;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN:
|
case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN:
|
||||||
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
||||||
if (!HandleModDamagePctTakenAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
if (HandleModDamagePctTakenAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
||||||
continue;
|
{
|
||||||
|
takeCharges=true;
|
||||||
if (procDebug & 16)
|
if (procDebug & 16)
|
||||||
sLog.outError("ModDamagePctTaken aura of spell %d procs twice from one effect!",spellInfo->Id);
|
sLog.outError("ModDamagePctTaken aura of spell %d procs twice from one effect!",spellInfo->Id);
|
||||||
procDebug |= 16;
|
procDebug |= 16;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SPELL_AURA_MOD_HASTE:
|
case SPELL_AURA_MOD_HASTE:
|
||||||
{
|
{
|
||||||
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s haste aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s haste aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
||||||
if (!HandleHasteAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
if (HandleHasteAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
||||||
continue;
|
{
|
||||||
|
takeCharges=true;
|
||||||
if (procDebug & 4)
|
if (procDebug & 4)
|
||||||
sLog.outError("Haste aura of spell %d procs twice from one effect!",spellInfo->Id);
|
sLog.outError("Haste aura of spell %d procs twice from one effect!",spellInfo->Id);
|
||||||
procDebug |= 4;
|
procDebug |= 4;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS:
|
case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS:
|
||||||
{
|
{
|
||||||
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
||||||
if (!HandleOverrideClassScriptAuraProc(pTarget, damage, triggeredByAura, procSpell, cooldown))
|
if (HandleOverrideClassScriptAuraProc(pTarget, damage, triggeredByAura, procSpell, cooldown))
|
||||||
continue;
|
{
|
||||||
|
takeCharges=true;
|
||||||
if (procDebug & 8)
|
if (procDebug & 8)
|
||||||
sLog.outError("OverrideClassScripts aura of spell %d procs twice from one effect!",spellInfo->Id);
|
sLog.outError("OverrideClassScripts aura of spell %d procs twice from one effect!",spellInfo->Id);
|
||||||
procDebug |= 8;
|
procDebug |= 8;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE:
|
case SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE:
|
||||||
@@ -12747,46 +12762,46 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
{
|
{
|
||||||
sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
||||||
|
|
||||||
if (!HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
if (HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
||||||
continue;
|
takeCharges=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK:
|
case SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK:
|
||||||
// Skip melee hits or instant cast spells
|
// Skip melee hits or instant cast spells
|
||||||
if (procSpell == NULL || GetSpellCastTime(procSpell) == 0)
|
if (procSpell && GetSpellCastTime(procSpell) != 0)
|
||||||
continue;
|
takeCharges=true;
|
||||||
break;
|
break;
|
||||||
case SPELL_AURA_REFLECT_SPELLS_SCHOOL:
|
case SPELL_AURA_REFLECT_SPELLS_SCHOOL:
|
||||||
// Skip Melee hits and spells ws wrong school
|
// Skip Melee hits and spells ws wrong school
|
||||||
if (procSpell == NULL || (triggeredByAura->GetMiscValue() & procSpell->SchoolMask) == 0)
|
if (procSpell && (triggeredByAura->GetMiscValue() & procSpell->SchoolMask)) // School check
|
||||||
continue;
|
takeCharges=true;
|
||||||
break;
|
break;
|
||||||
case SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT:
|
case SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT:
|
||||||
case SPELL_AURA_MOD_POWER_COST_SCHOOL:
|
case SPELL_AURA_MOD_POWER_COST_SCHOOL:
|
||||||
// Skip melee hits and spells ws wrong school or zero cost
|
// Skip melee hits and spells ws wrong school or zero cost
|
||||||
if (procSpell == NULL ||
|
if (procSpell &&
|
||||||
(procSpell->manaCost == 0 && procSpell->ManaCostPercentage == 0) || // Cost check
|
(procSpell->manaCost != 0 || procSpell->ManaCostPercentage != 0) && // Cost check
|
||||||
(triggeredByAura->GetMiscValue() & procSpell->SchoolMask) == 0) // School check
|
(triggeredByAura->GetMiscValue() & procSpell->SchoolMask) == 0) // School check
|
||||||
continue;
|
takeCharges=true;
|
||||||
break;
|
break;
|
||||||
case SPELL_AURA_MECHANIC_IMMUNITY:
|
case SPELL_AURA_MECHANIC_IMMUNITY:
|
||||||
// Compare mechanic
|
// Compare mechanic
|
||||||
if (procSpell==NULL || procSpell->Mechanic != triggeredByAura->GetMiscValue())
|
if (procSpell && procSpell->Mechanic == triggeredByAura->GetMiscValue())
|
||||||
continue;
|
takeCharges=true;
|
||||||
break;
|
break;
|
||||||
case SPELL_AURA_MOD_MECHANIC_RESISTANCE:
|
case SPELL_AURA_MOD_MECHANIC_RESISTANCE:
|
||||||
// Compare mechanic
|
// Compare mechanic
|
||||||
if (procSpell==NULL || procSpell->Mechanic != triggeredByAura->GetMiscValue())
|
if (procSpell && procSpell->Mechanic == triggeredByAura->GetMiscValue())
|
||||||
continue;
|
takeCharges=true;
|
||||||
break;
|
break;
|
||||||
case SPELL_AURA_MOD_DAMAGE_FROM_CASTER:
|
case SPELL_AURA_MOD_DAMAGE_FROM_CASTER:
|
||||||
// Compare casters
|
// Compare casters
|
||||||
if (triggeredByAura->GetCasterGUID() != pTarget->GetGUID())
|
if (triggeredByAura->GetCasterGUID() == pTarget->GetGUID())
|
||||||
continue;
|
takeCharges=true;
|
||||||
break;
|
break;
|
||||||
case SPELL_AURA_MOD_SPELL_CRIT_CHANCE:
|
case SPELL_AURA_MOD_SPELL_CRIT_CHANCE:
|
||||||
if (!procSpell)
|
if (procSpell)
|
||||||
continue;
|
takeCharges=true;
|
||||||
break;
|
break;
|
||||||
// These auras may not have charges - that means they have chance to remove based on dmg
|
// These auras may not have charges - that means they have chance to remove based on dmg
|
||||||
case SPELL_AURA_MOD_FEAR:
|
case SPELL_AURA_MOD_FEAR:
|
||||||
@@ -12800,6 +12815,8 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
if (roll_chance_f(chance))
|
if (roll_chance_f(chance))
|
||||||
RemoveAura(i->aura);
|
RemoveAura(i->aura);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
takeCharges=true;
|
||||||
break;
|
break;
|
||||||
/*case SPELL_AURA_ADD_FLAT_MODIFIER:
|
/*case SPELL_AURA_ADD_FLAT_MODIFIER:
|
||||||
case SPELL_AURA_ADD_PCT_MODIFIER:
|
case SPELL_AURA_ADD_PCT_MODIFIER:
|
||||||
@@ -12807,15 +12824,17 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||||||
break;*/
|
break;*/
|
||||||
default:
|
default:
|
||||||
// nothing do, just charges counter
|
// nothing do, just charges counter
|
||||||
|
takeCharges=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
takeCharges=true;
|
|
||||||
}
|
}
|
||||||
// Remove charge (aura can be removed by triggers)
|
// Remove charge (aura can be removed by triggers)
|
||||||
if(useCharges && takeCharges)
|
if(useCharges && takeCharges)
|
||||||
{
|
{
|
||||||
i->aura->DropAuraCharge();
|
i->aura->DropAuraCharge();
|
||||||
}
|
}
|
||||||
|
if (spellInfo->AttributesEx3 & SPELL_ATTR_EX3_DISABLE_PROC)
|
||||||
|
SetCantProc(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cleanup proc requirements
|
// Cleanup proc requirements
|
||||||
|
|||||||
Reference in New Issue
Block a user