mirror of
https://github.com/mangosfour/server.git
synced 2025-12-30 19:37:04 +00:00
Over 100 camangos Cata commits applied (to c12950)
Over 100 camangos Cata commits applied. up to and inclusing c12950.
This commit is contained in:
parent
b4ec0440aa
commit
eef77eadb9
117 changed files with 4314 additions and 3547 deletions
|
|
@ -56,7 +56,7 @@ pAuraProcHandler AuraProcHandler[TOTAL_AURAS] =
|
|||
&Unit::HandleNULLProc, // 15 SPELL_AURA_DAMAGE_SHIELD
|
||||
&Unit::HandleNULLProc, // 16 SPELL_AURA_MOD_STEALTH
|
||||
&Unit::HandleNULLProc, // 17 SPELL_AURA_MOD_STEALTH_DETECT
|
||||
&Unit::HandleNULLProc, // 18 SPELL_AURA_MOD_INVISIBILITY
|
||||
&Unit::HandleInvisibilityAuraProc, // 18 SPELL_AURA_MOD_INVISIBILITY
|
||||
&Unit::HandleNULLProc, // 19 SPELL_AURA_MOD_INVISIBILITY_DETECTION
|
||||
&Unit::HandleNULLProc, // 20 SPELL_AURA_OBS_MOD_HEALTH
|
||||
&Unit::HandleNULLProc, // 21 SPELL_AURA_OBS_MOD_MANA
|
||||
|
|
@ -632,7 +632,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
int32 triggerAmount = triggeredByAura->GetModifier()->m_amount;
|
||||
|
||||
Item* castItem = triggeredByAura->GetCastItemGuid() && GetTypeId() == TYPEID_PLAYER
|
||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : nullptr;
|
||||
|
||||
// some dummy spells have trigger spell in spell data already (from 3.0.3)
|
||||
uint32 triggered_spell_id = dummySpellEffect->EffectApplyAuraName == SPELL_AURA_DUMMY ? dummySpellEffect->EffectTriggerSpell : 0;
|
||||
|
|
@ -645,7 +645,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
{
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
// Eye for an Eye
|
||||
// Eye for an Eye
|
||||
case 9799:
|
||||
case 25988:
|
||||
{
|
||||
|
|
@ -676,7 +676,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
case 21063:
|
||||
triggered_spell_id = 21064;
|
||||
break;
|
||||
// Unstable Power
|
||||
// Unstable Power
|
||||
case 24658:
|
||||
{
|
||||
if (!procSpell || procSpell->Id == 24659)
|
||||
|
|
@ -982,7 +982,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
// cast ??? Arcane Bolt if Exalted by Scryers*/
|
||||
case 46569:
|
||||
return SPELL_AURA_PROC_FAILED; // old unused version
|
||||
// Living Seed
|
||||
// Living Seed
|
||||
case 48504:
|
||||
{
|
||||
triggered_spell_id = 48503;
|
||||
|
|
@ -1021,31 +1021,56 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
if (triggeredByAura->GetStackAmount() > 1 && !triggeredByAura->GetHolder()->ModStackAmount(-1))
|
||||
return SPELL_AURA_PROC_CANT_TRIGGER;
|
||||
}
|
||||
// Grim Reprisal
|
||||
case 63305:
|
||||
{
|
||||
// also update caster entry if required
|
||||
if (Unit* caster = triggeredByAura->GetCaster())
|
||||
{
|
||||
if (caster->GetEntry() != 33943 && caster->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
((Creature*)caster)->UpdateEntry(33943);
|
||||
caster->CastSpell(caster, 64017, true);
|
||||
}
|
||||
}
|
||||
|
||||
triggered_spell_id = 64039;
|
||||
basepoints[EFFECT_INDEX_0] = damage;
|
||||
break;
|
||||
}
|
||||
// Glyph of Life Tap
|
||||
case 63320:
|
||||
triggered_spell_id = 63321;
|
||||
break;
|
||||
// Meteor Fists
|
||||
// Retaliation
|
||||
case 65932:
|
||||
triggered_spell_id = 65934;
|
||||
break;
|
||||
// Earth Shield
|
||||
case 66063:
|
||||
triggered_spell_id = 66064;
|
||||
break;
|
||||
// Meteor Fists
|
||||
case 66725:
|
||||
case 68161:
|
||||
triggered_spell_id = 66765;
|
||||
break;
|
||||
// Meteor Fists
|
||||
// Meteor Fists
|
||||
case 66808:
|
||||
case 68160:
|
||||
triggered_spell_id = 66809;
|
||||
break;
|
||||
// Shiny Shard of the Scale - Equip Effect
|
||||
// Shiny Shard of the Scale - Equip Effect
|
||||
case 69739:
|
||||
// Cauterizing Heal or Searing Flame
|
||||
triggered_spell_id = (procFlag & PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL) ? 69734 : 69730;
|
||||
break;
|
||||
// Purified Shard of the Scale - Equip Effect
|
||||
// Purified Shard of the Scale - Equip Effect
|
||||
case 69755:
|
||||
// Cauterizing Heal or Searing Flame
|
||||
triggered_spell_id = (procFlag & PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL) ? 69733 : 69729;
|
||||
break;
|
||||
// Item - Shadowmourne Legendary
|
||||
// Item - Shadowmourne Legendary
|
||||
case 71903:
|
||||
{
|
||||
if (!roll_chance_i(triggerAmount))
|
||||
|
|
@ -1070,6 +1095,10 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
}
|
||||
break;
|
||||
}
|
||||
// Blood Link
|
||||
case 72178:
|
||||
triggered_spell_id = 72195;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -1161,7 +1190,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
}
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
// Ignite
|
||||
// Ignite
|
||||
case 11119:
|
||||
case 11120:
|
||||
case 12846:
|
||||
|
|
@ -1292,7 +1321,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
RemoveAurasDueToSpell(triggeredByAura->GetId());
|
||||
|
||||
// Cast finish spell (triggeredByAura already not exist!)
|
||||
CastSpell(this, 27285, true, castItem, NULL, casterGuid);
|
||||
CastSpell(this, 27285, true, castItem, nullptr, casterGuid);
|
||||
return SPELL_AURA_PROC_OK; // no hidden cooldown
|
||||
}
|
||||
|
||||
|
|
@ -1314,7 +1343,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
RemoveAurasDueToSpell(triggeredByAura->GetId());
|
||||
|
||||
// Cast finish spell (triggeredByAura already not exist!)
|
||||
CastSpell(this, 32865, true, castItem, NULL, casterGuid);
|
||||
CastSpell(this, 32865, true, castItem, nullptr, casterGuid);
|
||||
return SPELL_AURA_PROC_OK; // no hidden cooldown
|
||||
}
|
||||
// Damage counting
|
||||
|
|
@ -1333,7 +1362,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
}
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
// Nightfall & Glyph of Corruption
|
||||
// Nightfall & Glyph of Corruption
|
||||
case 18094:
|
||||
case 18095:
|
||||
case 56218:
|
||||
|
|
@ -1410,7 +1439,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
|
||||
switch (dummySpell->SpellIconID)
|
||||
{
|
||||
// Improved Shadowform
|
||||
// Improved Shadowform
|
||||
case 217:
|
||||
{
|
||||
if (!roll_chance_i(triggerAmount))
|
||||
|
|
@ -1463,7 +1492,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
// Vampiric Embrace
|
||||
// Vampiric Embrace
|
||||
case 15286:
|
||||
{
|
||||
// Return if self damage
|
||||
|
|
@ -1473,7 +1502,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
// Heal amount - Self/Team
|
||||
int32 team = triggerAmount * damage / 500;
|
||||
int32 self = triggerAmount * damage / 100 - team;
|
||||
CastCustomSpell(this, 15290, &team, &self, NULL, true, castItem, triggeredByAura);
|
||||
CastCustomSpell(this, 15290, &team, &self, nullptr, true, castItem, triggeredByAura);
|
||||
return SPELL_AURA_PROC_OK; // no hidden cooldown
|
||||
}
|
||||
// Priest Tier 6 Trinket (Ashtongue Talisman of Acumen)
|
||||
|
|
@ -1549,7 +1578,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
{
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
// Leader of the Pack
|
||||
// Leader of the Pack
|
||||
case 24932:
|
||||
{
|
||||
// dummy m_amount store health percent (!=0 if Improved Leader of the Pack applied)
|
||||
|
|
@ -1572,7 +1601,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
if (SpellEntry const* manaCastEntry = sSpellStore.LookupEntry(60889))
|
||||
{
|
||||
int32 mana_percent = manaCastEntry->CalculateSimpleValue(EFFECT_INDEX_0) * heal_percent;
|
||||
CastCustomSpell(this, manaCastEntry, &mana_percent, NULL, NULL, true, castItem, triggeredByAura);
|
||||
CastCustomSpell(this, manaCastEntry, &mana_percent, nullptr, nullptr, true, castItem, triggeredByAura);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -1669,14 +1698,14 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
else
|
||||
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(procSpell->rangeIndex));
|
||||
|
||||
((Player*)this)->ApplySpellMod(procSpell->Id, SPELLMOD_RADIUS, radius, NULL);
|
||||
((Player*)this)->ApplySpellMod(procSpell->Id, SPELLMOD_RADIUS, radius);
|
||||
|
||||
Unit* second = pVictim->SelectRandomFriendlyTarget(pVictim, radius);
|
||||
|
||||
if (!second)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
pVictim->CastSpell(second, procSpell, true, NULL, triggeredByAura, GetObjectGuid());
|
||||
pVictim->CastSpell(second, procSpell, true, nullptr, triggeredByAura, GetObjectGuid());
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
// Item - Druid T10 Balance 4P Bonus
|
||||
|
|
@ -1750,14 +1779,14 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
{
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
// Clean Escape
|
||||
// Clean Escape
|
||||
case 23582:
|
||||
// triggered spell have same masks and etc with main Vanish spell
|
||||
if (!procSpell || procSpell->GetSpellEffectIdByIndex(EFFECT_INDEX_0) == SPELL_EFFECT_NONE)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
triggered_spell_id = 23583;
|
||||
break;
|
||||
// Deadly Throw Interrupt
|
||||
// Deadly Throw Interrupt
|
||||
case 32748:
|
||||
{
|
||||
// Prevent cast Deadly Throw Interrupt on self from last effect (apply dummy) of Deadly Throw
|
||||
|
|
@ -1879,7 +1908,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
// Glyph of Mend Pet
|
||||
if (dummySpell->Id == 57870)
|
||||
{
|
||||
pVictim->CastSpell(pVictim, 57894, true, NULL, NULL, GetObjectGuid());
|
||||
pVictim->CastSpell(pVictim, 57894, true, nullptr, nullptr, GetObjectGuid());
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
// Misdirection
|
||||
|
|
@ -1920,7 +1949,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
}
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
// Judgement of Light
|
||||
// Judgement of Light
|
||||
case 20185:
|
||||
{
|
||||
// only at real damage
|
||||
|
|
@ -1928,7 +1957,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
basepoints[0] = int32(pVictim->GetMaxHealth() * triggeredByAura->GetModifier()->m_amount / 100);
|
||||
pVictim->CastCustomSpell(pVictim, 20267, &basepoints[0], NULL, NULL, true, NULL, triggeredByAura);
|
||||
pVictim->CastCustomSpell(pVictim, 20267, &basepoints[0], nullptr, nullptr, true, nullptr, triggeredByAura);
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
// Judgement of Wisdom
|
||||
|
|
@ -1942,7 +1971,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
{
|
||||
// 2% of maximum base mana
|
||||
basepoints[0] = int32(pVictim->GetCreateMana() * 2 / 100);
|
||||
pVictim->CastCustomSpell(pVictim, 20268, &basepoints[0], NULL, NULL, true, NULL, triggeredByAura);
|
||||
pVictim->CastCustomSpell(pVictim, 20268, &basepoints[0], nullptr, nullptr, true, nullptr, triggeredByAura);
|
||||
}
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
|
|
@ -1950,11 +1979,11 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
case 20335:
|
||||
triggered_spell_id = 21183;
|
||||
break;
|
||||
// Heart of the Crusader (Rank 2)
|
||||
// Heart of the Crusader (Rank 2)
|
||||
case 20336:
|
||||
triggered_spell_id = 54498;
|
||||
break;
|
||||
// Heart of the Crusader (Rank 3)
|
||||
// Heart of the Crusader (Rank 3)
|
||||
case 20337:
|
||||
triggered_spell_id = 54499;
|
||||
break;
|
||||
|
|
@ -1971,6 +2000,8 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
return SPELL_AURA_PROC_FAILED;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// Holy Power (Redemption Armor set)
|
||||
case 28789:
|
||||
|
|
@ -2042,7 +2073,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
}
|
||||
}
|
||||
if (stacks >= 5)
|
||||
CastSpell(target, 42463, true, NULL, triggeredByAura);
|
||||
CastSpell(target, 42463, true, nullptr, triggeredByAura);
|
||||
break;
|
||||
}
|
||||
// Judgements of the Wise
|
||||
|
|
@ -2057,9 +2088,9 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
triggered_spell_id = 31930;
|
||||
|
||||
// Replenishment
|
||||
CastSpell(this, 57669, true, NULL, triggeredByAura);
|
||||
CastSpell(this, 57669, true, nullptr, triggeredByAura);
|
||||
break;
|
||||
// Paladin Tier 6 Trinket (Ashtongue Talisman of Zeal)
|
||||
// Paladin Tier 6 Trinket (Ashtongue Talisman of Zeal)
|
||||
case 40470:
|
||||
{
|
||||
if (!procSpell)
|
||||
|
|
@ -2100,7 +2131,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
// find caster main aura at beacon
|
||||
Aura* dummy = NULL;
|
||||
Aura* dummy = nullptr;
|
||||
Unit::AuraList const& baa = beacon->GetAurasByType(SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
for (Unit::AuraList::const_iterator i = baa.begin(); i != baa.end(); ++i)
|
||||
{
|
||||
|
|
@ -2119,7 +2150,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
basepoints[0] = triggeredByAura->GetModifier()->m_amount * damage / 100;
|
||||
|
||||
// cast with original caster set but beacon to beacon for apply caster mods and avoid LoS check
|
||||
beacon->CastCustomSpell(beacon, triggered_spell_id, &basepoints[0], NULL, NULL, true, castItem, triggeredByAura, pVictim->GetObjectGuid());
|
||||
beacon->CastCustomSpell(beacon, triggered_spell_id, &basepoints[0], nullptr, nullptr, true, castItem, triggeredByAura, pVictim->GetObjectGuid());
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
// Seal of Corruption (damage calc on apply aura)
|
||||
|
|
@ -2144,7 +2175,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
}
|
||||
}
|
||||
if (stacks >= 5)
|
||||
CastSpell(target, 53739, true, NULL, triggeredByAura);
|
||||
CastSpell(target, 53739, true, nullptr, triggeredByAura);
|
||||
break;
|
||||
}
|
||||
// Glyph of Holy Light
|
||||
|
|
@ -2249,7 +2280,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
{
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
// Totemic Power (The Earthshatterer set)
|
||||
// Totemic Power (The Earthshatterer set)
|
||||
case 28823:
|
||||
{
|
||||
if (!pVictim)
|
||||
|
|
@ -2351,11 +2382,11 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
|
||||
// apply cooldown before cast to prevent processing itself
|
||||
if (cooldown)
|
||||
((Player*)this)->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown);
|
||||
((Player*)this)->AddSpellCooldown(dummySpell->Id, 0, time(nullptr) + cooldown);
|
||||
|
||||
// Attack Twice
|
||||
for (uint32 i = 0; i < 2; ++i)
|
||||
CastCustomSpell(pVictim, triggered_spell_id, &basepoints[0], NULL, NULL, true, castItem, triggeredByAura);
|
||||
CastCustomSpell(pVictim, triggered_spell_id, &basepoints[0], nullptr, nullptr, true, castItem, triggeredByAura);
|
||||
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
|
|
@ -2574,7 +2605,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
// Every Lightning Bolt and Chain Lightning spell have duplicate vs half damage and zero cost
|
||||
switch (procSpell->Id)
|
||||
{
|
||||
// Lightning Bolt
|
||||
// Lightning Bolt
|
||||
case 403: spellId = 45284; break; // Rank 1
|
||||
case 529: spellId = 45286; break; // Rank 2
|
||||
case 548: spellId = 45287; break; // Rank 3
|
||||
|
|
@ -2589,7 +2620,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
case 25449: spellId = 45296; break; // Rank 12
|
||||
case 49237: spellId = 49239; break; // Rank 13
|
||||
case 49238: spellId = 49240; break; // Rank 14
|
||||
// Chain Lightning
|
||||
// Chain Lightning
|
||||
case 421: spellId = 45297; break; // Rank 1
|
||||
case 930: spellId = 45298; break; // Rank 2
|
||||
case 2860: spellId = 45299; break; // Rank 3
|
||||
|
|
@ -2610,7 +2641,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
CastSpell(pVictim, spellId, true, castItem, triggeredByAura);
|
||||
|
||||
if (cooldown && GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)this)->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown);
|
||||
((Player*)this)->AddSpellCooldown(dummySpell->Id, 0, time(nullptr) + cooldown);
|
||||
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
|
|
@ -2729,7 +2760,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
|
||||
switch (procSpell->Id)
|
||||
{
|
||||
// Obliterate
|
||||
// Obliterate
|
||||
case 49020: // Rank 1
|
||||
triggered_spell_id = 66198; break;
|
||||
case 51423: // Rank 2
|
||||
|
|
@ -2738,7 +2769,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
triggered_spell_id = 66973; break;
|
||||
case 51425: // Rank 4
|
||||
triggered_spell_id = 66974; break;
|
||||
// Frost Strike
|
||||
// Frost Strike
|
||||
case 49143: // Rank 1
|
||||
triggered_spell_id = 66196; break;
|
||||
case 51416: // Rank 2
|
||||
|
|
@ -2751,7 +2782,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
triggered_spell_id = 66961; break;
|
||||
case 55268: // Rank 6
|
||||
triggered_spell_id = 66962; break;
|
||||
// Plague Strike
|
||||
// Plague Strike
|
||||
case 45462: // Rank 1
|
||||
triggered_spell_id = 66216; break;
|
||||
case 49917: // Rank 2
|
||||
|
|
@ -2764,7 +2795,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
triggered_spell_id = 66991; break;
|
||||
case 49921: // Rank 6
|
||||
triggered_spell_id = 66992; break;
|
||||
// Death Strike
|
||||
// Death Strike
|
||||
case 49998: // Rank 1
|
||||
triggered_spell_id = 66188; break;
|
||||
case 49999: // Rank 2
|
||||
|
|
@ -2775,10 +2806,10 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
triggered_spell_id = 66952; break;
|
||||
case 49924: // Rank 5
|
||||
triggered_spell_id = 66953; break;
|
||||
// Rune Strike
|
||||
// Rune Strike
|
||||
case 56815:
|
||||
triggered_spell_id = 66217; break;
|
||||
// Blood Strike
|
||||
// Blood Strike
|
||||
case 45902: // Rank 1
|
||||
triggered_spell_id = 66215; break;
|
||||
case 49926: // Rank 2
|
||||
|
|
@ -2828,13 +2859,6 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
// triggered_spell_id in spell data
|
||||
break;
|
||||
}
|
||||
// Unholy Blight
|
||||
if (dummySpell->SpellIconID == 1494) // id = 49194 in dbc, spelliconid = 1494
|
||||
{
|
||||
basepoints[0] = int32(damage / 10); // Deal 10% of death coil damage
|
||||
triggered_spell_id = 50536;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
@ -2862,15 +2886,15 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura
|
|||
|
||||
if (basepoints[EFFECT_INDEX_0] || basepoints[EFFECT_INDEX_1] || basepoints[EFFECT_INDEX_2])
|
||||
CastCustomSpell(target, triggered_spell_id,
|
||||
basepoints[EFFECT_INDEX_0] ? &basepoints[EFFECT_INDEX_0] : NULL,
|
||||
basepoints[EFFECT_INDEX_1] ? &basepoints[EFFECT_INDEX_1] : NULL,
|
||||
basepoints[EFFECT_INDEX_2] ? &basepoints[EFFECT_INDEX_2] : NULL,
|
||||
basepoints[EFFECT_INDEX_0] ? &basepoints[EFFECT_INDEX_0] : nullptr,
|
||||
basepoints[EFFECT_INDEX_1] ? &basepoints[EFFECT_INDEX_1] : nullptr,
|
||||
basepoints[EFFECT_INDEX_2] ? &basepoints[EFFECT_INDEX_2] : nullptr,
|
||||
true, castItem, triggeredByAura);
|
||||
else
|
||||
CastSpell(target, triggered_spell_id, true, castItem, triggeredByAura);
|
||||
|
||||
if (cooldown && GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)this)->AddSpellCooldown(triggered_spell_id, 0, time(NULL) + cooldown);
|
||||
((Player*)this)->AddSpellCooldown(triggered_spell_id, 0, time(nullptr) + cooldown);
|
||||
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
|
|
@ -2888,14 +2912,14 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
// Set trigger spell id, target, custom basepoints
|
||||
SpellEffectEntry const* spellEffect = auraSpellInfo->GetSpellEffect(triggeredByAura->GetEffIndex());
|
||||
uint32 trigger_spell_id = spellEffect ? spellEffect->EffectTriggerSpell : 0;
|
||||
Unit* target = NULL;
|
||||
Unit* target = nullptr;
|
||||
int32 basepoints[MAX_EFFECT_INDEX] = {0, 0, 0};
|
||||
|
||||
if (triggeredByAura->GetModifier()->m_auraname == SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE)
|
||||
basepoints[0] = triggerAmount;
|
||||
|
||||
Item* castItem = triggeredByAura->GetCastItemGuid() && GetTypeId() == TYPEID_PLAYER
|
||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : nullptr;
|
||||
|
||||
// Try handle unknown trigger spells
|
||||
// Custom requirements (not listed in procEx) Warning! damage dealing after this
|
||||
|
|
@ -2906,33 +2930,33 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
{
|
||||
switch (auraSpellInfo->Id)
|
||||
{
|
||||
// case 191: // Elemental Response
|
||||
// switch (procSpell->School)
|
||||
// {
|
||||
// case SPELL_SCHOOL_FIRE: trigger_spell_id = 34192; break;
|
||||
// case SPELL_SCHOOL_FROST: trigger_spell_id = 34193; break;
|
||||
// case SPELL_SCHOOL_ARCANE:trigger_spell_id = 34194; break;
|
||||
// case SPELL_SCHOOL_NATURE:trigger_spell_id = 34195; break;
|
||||
// case SPELL_SCHOOL_SHADOW:trigger_spell_id = 34196; break;
|
||||
// case SPELL_SCHOOL_HOLY: trigger_spell_id = 34197; break;
|
||||
// case SPELL_SCHOOL_NORMAL:trigger_spell_id = 34198; break;
|
||||
// }
|
||||
// break;
|
||||
// case 5301: break; // Defensive State (DND)
|
||||
// case 7137: break: // Shadow Charge (Rank 1)
|
||||
// case 7377: break: // Take Immune Periodic Damage <Not Working>
|
||||
// case 13358: break; // Defensive State (DND)
|
||||
// case 16092: break; // Defensive State (DND)
|
||||
// case 18943: break; // Double Attack
|
||||
// case 19194: break; // Double Attack
|
||||
// case 19817: break; // Double Attack
|
||||
// case 19818: break; // Double Attack
|
||||
// case 22835: break; // Drunken Rage
|
||||
// trigger_spell_id = 14822; break;
|
||||
// case 191: // Elemental Response
|
||||
// switch (procSpell->School)
|
||||
// {
|
||||
// case SPELL_SCHOOL_FIRE: trigger_spell_id = 34192; break;
|
||||
// case SPELL_SCHOOL_FROST: trigger_spell_id = 34193; break;
|
||||
// case SPELL_SCHOOL_ARCANE:trigger_spell_id = 34194; break;
|
||||
// case SPELL_SCHOOL_NATURE:trigger_spell_id = 34195; break;
|
||||
// case SPELL_SCHOOL_SHADOW:trigger_spell_id = 34196; break;
|
||||
// case SPELL_SCHOOL_HOLY: trigger_spell_id = 34197; break;
|
||||
// case SPELL_SCHOOL_NORMAL:trigger_spell_id = 34198; break;
|
||||
// }
|
||||
// break;
|
||||
// case 5301: break; // Defensive State (DND)
|
||||
// case 7137: break: // Shadow Charge (Rank 1)
|
||||
// case 7377: break: // Take Immune Periodic Damage <Not Working>
|
||||
// case 13358: break; // Defensive State (DND)
|
||||
// case 16092: break; // Defensive State (DND)
|
||||
// case 18943: break; // Double Attack
|
||||
// case 19194: break; // Double Attack
|
||||
// case 19817: break; // Double Attack
|
||||
// case 19818: break; // Double Attack
|
||||
// case 22835: break; // Drunken Rage
|
||||
// trigger_spell_id = 14822; break;
|
||||
case 23780: // Aegis of Preservation (Aegis of Preservation trinket)
|
||||
trigger_spell_id = 23781;
|
||||
break;
|
||||
// case 24949: break; // Defensive State 2 (DND)
|
||||
// case 24949: break; // Defensive State 2 (DND)
|
||||
case 27522: // Mana Drain Trigger
|
||||
case 40336: // Mana Drain Trigger
|
||||
case 46939: // Black Bow of the Betrayer
|
||||
|
|
@ -2956,56 +2980,56 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
case 33896: // Desperate Defense (Stonescythe Whelp, Stonescythe Alpha, Stonescythe Ambusher)
|
||||
trigger_spell_id = 33898;
|
||||
break;
|
||||
// case 34082: break; // Advantaged State (DND)
|
||||
// case 34783: break: // Spell Reflection
|
||||
// case 35205: break: // Vanish
|
||||
// case 35321: break; // Gushing Wound
|
||||
// case 36096: break: // Spell Reflection
|
||||
// case 36207: break: // Steal Weapon
|
||||
// case 36576: break: // Shaleskin (Shaleskin Flayer, Shaleskin Ripper) 30023 trigger
|
||||
// case 37030: break; // Chaotic Temperament
|
||||
// case 38363: break; // Gushing Wound
|
||||
// case 39215: break; // Gushing Wound
|
||||
// case 40250: break; // Improved Duration
|
||||
// case 40329: break; // Demo Shout Sensor
|
||||
// case 40364: break; // Entangling Roots Sensor
|
||||
// case 41054: break; // Copy Weapon
|
||||
// trigger_spell_id = 41055; break;
|
||||
// case 41248: break; // Consuming Strikes
|
||||
// trigger_spell_id = 41249; break;
|
||||
// case 42730: break: // Woe Strike
|
||||
// case 43453: break: // Rune Ward
|
||||
// case 43504: break; // Alterac Valley OnKill Proc Aura
|
||||
// case 44326: break: // Pure Energy Passive
|
||||
// case 44526: break; // Hate Monster (Spar) (30 sec)
|
||||
// case 44527: break; // Hate Monster (Spar Buddy) (30 sec)
|
||||
// case 44819: break; // Hate Monster (Spar Buddy) (>30% Health)
|
||||
// case 44820: break; // Hate Monster (Spar) (<30%)
|
||||
// case 34082: break; // Advantaged State (DND)
|
||||
// case 34783: break: // Spell Reflection
|
||||
// case 35205: break: // Vanish
|
||||
// case 35321: break; // Gushing Wound
|
||||
// case 36096: break: // Spell Reflection
|
||||
// case 36207: break: // Steal Weapon
|
||||
// case 36576: break: // Shaleskin (Shaleskin Flayer, Shaleskin Ripper) 30023 trigger
|
||||
// case 37030: break; // Chaotic Temperament
|
||||
// case 38363: break; // Gushing Wound
|
||||
// case 39215: break; // Gushing Wound
|
||||
// case 40250: break; // Improved Duration
|
||||
// case 40329: break; // Demo Shout Sensor
|
||||
// case 40364: break; // Entangling Roots Sensor
|
||||
// case 41054: break; // Copy Weapon
|
||||
// trigger_spell_id = 41055; break;
|
||||
// case 41248: break; // Consuming Strikes
|
||||
// trigger_spell_id = 41249; break;
|
||||
// case 42730: break: // Woe Strike
|
||||
// case 43453: break: // Rune Ward
|
||||
// case 43504: break; // Alterac Valley OnKill Proc Aura
|
||||
// case 44326: break: // Pure Energy Passive
|
||||
// case 44526: break; // Hate Monster (Spar) (30 sec)
|
||||
// case 44527: break; // Hate Monster (Spar Buddy) (30 sec)
|
||||
// case 44819: break; // Hate Monster (Spar Buddy) (>30% Health)
|
||||
// case 44820: break; // Hate Monster (Spar) (<30%)
|
||||
case 45057: // Evasive Maneuvers (Commendation of Kael`thas trinket)
|
||||
// reduce you below $s1% health (in fact in this specific case can proc from any attack while health in result less $s1%)
|
||||
if (int32(GetHealth()) - int32(damage) >= int32(GetMaxHealth() * triggerAmount / 100))
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
break;
|
||||
// case 45903: break: // Offensive State
|
||||
// case 46146: break: // [PH] Ahune Spanky Hands
|
||||
// case 45903: break: // Offensive State
|
||||
// case 46146: break: // [PH] Ahune Spanky Hands
|
||||
case 43820: // Charm of the Witch Doctor (Amani Charm of the Witch Doctor trinket)
|
||||
// Pct value stored in dummy
|
||||
basepoints[0] = pVictim->GetCreateHealth() * auraSpellInfo->CalculateSimpleValue(EFFECT_INDEX_1) / 100;
|
||||
target = pVictim;
|
||||
break;
|
||||
// case 45205: break; // Copy Offhand Weapon
|
||||
// case 45343: break; // Dark Flame Aura
|
||||
// case 47300: break; // Dark Flame Aura
|
||||
// case 48876: break; // Beast's Mark
|
||||
// trigger_spell_id = 48877; break;
|
||||
// case 49059: break; // Horde, Hate Monster (Spar Buddy) (>30% Health)
|
||||
// case 50051: break; // Ethereal Pet Aura
|
||||
// case 50689: break; // Blood Presence (Rank 1)
|
||||
// case 50844: break; // Blood Mirror
|
||||
// case 52856: break; // Charge
|
||||
// case 54072: break; // Knockback Ball Passive
|
||||
// case 54476: break; // Blood Presence
|
||||
// case 54775: break; // Abandon Vehicle on Poly
|
||||
// case 45205: break; // Copy Offhand Weapon
|
||||
// case 45343: break; // Dark Flame Aura
|
||||
// case 47300: break; // Dark Flame Aura
|
||||
// case 48876: break; // Beast's Mark
|
||||
// trigger_spell_id = 48877; break;
|
||||
// case 49059: break; // Horde, Hate Monster (Spar Buddy) (>30% Health)
|
||||
// case 50051: break; // Ethereal Pet Aura
|
||||
// case 50689: break; // Blood Presence (Rank 1)
|
||||
// case 50844: break; // Blood Mirror
|
||||
// case 52856: break; // Charge
|
||||
// case 54072: break; // Knockback Ball Passive
|
||||
// case 54476: break; // Blood Presence
|
||||
// case 54775: break; // Abandon Vehicle on Poly
|
||||
case 57345: // Darkmoon Card: Greatness
|
||||
{
|
||||
float stat = 0.0f;
|
||||
|
|
@ -3027,6 +3051,12 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
// case 59288: break; // Infra-Green Shield
|
||||
// case 59532: break; // Abandon Passengers on Poly
|
||||
// case 59735: break: // Woe Strike
|
||||
case 64148: // Diminsh Power
|
||||
{
|
||||
if (Unit* caster = triggeredByAura->GetCaster())
|
||||
caster->InterruptNonMeleeSpells(false);
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
case 64415: // // Val'anyr Hammer of Ancient Kings - Equip Effect
|
||||
{
|
||||
// for DOT procs
|
||||
|
|
@ -3038,7 +3068,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
{
|
||||
trigger_spell_id = 64442;
|
||||
|
||||
// need Scale damage base at stack size
|
||||
// need scale damage base at stack size
|
||||
if (SpellEntry const* trigEntry = sSpellStore.LookupEntry(trigger_spell_id))
|
||||
basepoints[EFFECT_INDEX_0] = trigEntry->CalculateSimpleValue(EFFECT_INDEX_0) * triggeredByAura->GetStackAmount();
|
||||
|
||||
|
|
@ -3053,7 +3083,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
|
||||
trigger_spell_id = 64569;
|
||||
|
||||
// need Scale damage base at stack size
|
||||
// need scale damage base at stack size
|
||||
if (SpellEntry const* trigEntry = sSpellStore.LookupEntry(trigger_spell_id))
|
||||
basepoints[EFFECT_INDEX_0] = trigEntry->CalculateSimpleValue(EFFECT_INDEX_0) * triggeredByAura->GetStackAmount();
|
||||
|
||||
|
|
@ -3082,7 +3112,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
int32 basepoints = (int32)(damage * 0.45f);
|
||||
if (Unit* caster = triggeredByAura->GetCaster())
|
||||
// Actually this spell should be sent with SMSG_SPELL_START
|
||||
CastCustomSpell(caster, 69034, &basepoints, NULL, NULL, true, NULL, triggeredByAura, GetObjectGuid());
|
||||
CastCustomSpell(caster, 69034, &basepoints, nullptr, nullptr, true, nullptr, triggeredByAura, GetObjectGuid());
|
||||
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
|
|
@ -3133,7 +3163,6 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
{
|
||||
float weaponDamage;
|
||||
// DW should benefit of attack power, damage percent mods etc.
|
||||
// TODO: check if using offhand damage is correct and if it should be divided by 2
|
||||
if (haveOffhandWeapon() && getAttackTimer(BASE_ATTACK) > getAttackTimer(OFF_ATTACK))
|
||||
weaponDamage = (GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE) + GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE)) / 2;
|
||||
else
|
||||
|
|
@ -3144,7 +3173,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
case 12834: basepoints[EFFECT_INDEX_0] = int32(weaponDamage * 16 / 100); break;
|
||||
case 12849: basepoints[EFFECT_INDEX_0] = int32(weaponDamage * 32 / 100); break;
|
||||
case 12867: basepoints[EFFECT_INDEX_0] = int32(weaponDamage * 48 / 100); break;
|
||||
// Impossible case
|
||||
// Impossible case
|
||||
default:
|
||||
sLog.outError("Unit::HandleProcTriggerSpellAuraProc: DW unknown spell rank %u", auraSpellInfo->Id);
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
|
@ -3165,7 +3194,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
else if (auraSpellInfo->Id == 50421) // Scent of Blood
|
||||
{
|
||||
RemoveAuraHolderFromStack(50421);
|
||||
trigger_spell_id = 50422;
|
||||
trigger_spell_id = 50422;
|
||||
target = this;
|
||||
break;
|
||||
}
|
||||
|
|
@ -3184,7 +3213,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
{
|
||||
// basepoints of trigger spell stored in dummyeffect of spellProto
|
||||
int32 basepoints = GetMaxPower(POWER_MANA) * (*i)->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2) / 100;
|
||||
CastCustomSpell(this, 18371, &basepoints, NULL, NULL, true, castItem, triggeredByAura);
|
||||
CastCustomSpell(this, 18371, &basepoints, nullptr, nullptr, true, castItem, triggeredByAura);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -3204,6 +3233,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
{
|
||||
if (!procSpell)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
switch (GetFirstSchoolInMask(GetSpellSchoolMask(procSpell)))
|
||||
{
|
||||
case SPELL_SCHOOL_HOLY: trigger_spell_id = 54370; break;
|
||||
|
|
@ -3417,7 +3447,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
if (!pVictim || !pVictim->IsAlive())
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
// stacking
|
||||
CastSpell(this, 37658, true, NULL, triggeredByAura);
|
||||
CastSpell(this, 37658, true, nullptr, triggeredByAura);
|
||||
|
||||
Aura* dummy = GetDummyAura(37658);
|
||||
// release at 3 aura in stack (cont contain in basepoint of trigger aura)
|
||||
|
|
@ -3441,7 +3471,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
if (!pVictim || !pVictim->IsAlive())
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
// stacking
|
||||
CastSpell(this, 54842, true, NULL, triggeredByAura);
|
||||
CastSpell(this, 54842, true, nullptr, triggeredByAura);
|
||||
|
||||
// counting
|
||||
Aura* dummy = GetDummyAura(54842);
|
||||
|
|
@ -3462,7 +3492,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
uint32 castSpell = auraSpellInfo->Id == 67758 ? 67759 : 67713;
|
||||
|
||||
// stacking
|
||||
CastSpell(this, castSpell, true, NULL, triggeredByAura);
|
||||
CastSpell(this, castSpell, true, nullptr, triggeredByAura);
|
||||
|
||||
// counting
|
||||
Aura* dummy = GetDummyAura(castSpell);
|
||||
|
|
@ -3589,7 +3619,6 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
// All ok. Check current trigger spell
|
||||
SpellEntry const* triggerEntry = sSpellStore.LookupEntry(trigger_spell_id);
|
||||
if (!triggerEntry)
|
||||
|
|
@ -3607,7 +3636,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
// dummy basepoints or other customs
|
||||
switch (trigger_spell_id)
|
||||
{
|
||||
// Cast positive spell on enemy target
|
||||
// Cast positive spell on enemy target
|
||||
case 7099: // Curse of Mending
|
||||
case 39647: // Curse of Mending
|
||||
case 29494: // Temptation
|
||||
|
|
@ -3776,7 +3805,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
// try detect target manually if not set
|
||||
if (target == NULL)
|
||||
if (target == nullptr)
|
||||
target = !(procFlags & PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL) && IsPositiveSpell(trigger_spell_id) ? this : pVictim;
|
||||
|
||||
// default case
|
||||
|
|
@ -3785,15 +3814,15 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d
|
|||
|
||||
if (basepoints[EFFECT_INDEX_0] || basepoints[EFFECT_INDEX_1] || basepoints[EFFECT_INDEX_2])
|
||||
CastCustomSpell(target, trigger_spell_id,
|
||||
basepoints[EFFECT_INDEX_0] ? &basepoints[EFFECT_INDEX_0] : NULL,
|
||||
basepoints[EFFECT_INDEX_1] ? &basepoints[EFFECT_INDEX_1] : NULL,
|
||||
basepoints[EFFECT_INDEX_2] ? &basepoints[EFFECT_INDEX_2] : NULL,
|
||||
basepoints[EFFECT_INDEX_0] ? &basepoints[EFFECT_INDEX_0] : nullptr,
|
||||
basepoints[EFFECT_INDEX_1] ? &basepoints[EFFECT_INDEX_1] : nullptr,
|
||||
basepoints[EFFECT_INDEX_2] ? &basepoints[EFFECT_INDEX_2] : nullptr,
|
||||
true, castItem, triggeredByAura);
|
||||
else
|
||||
CastSpell(target, trigger_spell_id, true, castItem, triggeredByAura);
|
||||
|
||||
if (cooldown && GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)this)->AddSpellCooldown(trigger_spell_id, 0, time(NULL) + cooldown);
|
||||
((Player*)this)->AddSpellCooldown(trigger_spell_id, 0, time(nullptr) + cooldown);
|
||||
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
|
|
@ -4231,3 +4260,12 @@ SpellAuraProcResult Unit::HandleRemoveByDamageChanceProc(Unit* /*pVictim*/, uint
|
|||
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
}
|
||||
|
||||
SpellAuraProcResult Unit::HandleInvisibilityAuraProc(Unit* pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
|
||||
{
|
||||
if (triggeredByAura->GetSpellProto()->HasAttribute(SPELL_ATTR_PASSIVE) || triggeredByAura->GetSpellProto()->HasAttribute(SPELL_ATTR_EX_NEGATIVE))
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
RemoveAurasDueToSpell(triggeredByAura->GetId());
|
||||
return SPELL_AURA_PROC_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue