mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[c12556] Refactor custom maxTargets and Radius into own function
This commit is contained in:
parent
6043d2d50d
commit
788803fe5f
3 changed files with 329 additions and 313 deletions
|
|
@ -1658,314 +1658,14 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
{
|
||||
SpellEffectEntry const* spellEffect = m_spellInfo->GetSpellEffect(effIndex);
|
||||
SpellClassOptionsEntry const* classOpt = m_spellInfo->GetSpellClassOptions();
|
||||
|
||||
if (!spellEffect)
|
||||
return;
|
||||
|
||||
float radius;
|
||||
if (uint32 radiusIndex = spellEffect->GetRadiusIndex())
|
||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->GetRadiusIndex()));
|
||||
else
|
||||
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
||||
|
||||
uint32 EffectChainTarget = spellEffect ? spellEffect->EffectChainTarget : 0;
|
||||
|
||||
if (Unit* realCaster = GetAffectiveCaster())
|
||||
{
|
||||
if (Player* modOwner = realCaster->GetSpellModOwner())
|
||||
{
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius, this);
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_JUMP_TARGETS, EffectChainTarget, this);
|
||||
}
|
||||
}
|
||||
|
||||
// Get spell max affected targets
|
||||
uint32 unMaxTargets = m_spellInfo->GetMaxAffectedTargets();
|
||||
|
||||
// custom target amount cases
|
||||
switch(m_spellInfo->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case 802: // Mutate Bug (AQ40, Emperor Vek'nilash)
|
||||
case 804: // Explode Bug (AQ40, Emperor Vek'lor)
|
||||
case 23138: // Gate of Shazzrah (MC, Shazzrah)
|
||||
case 28560: // Summon Blizzard (Naxx, Sapphiron)
|
||||
case 30541: // Blaze (Magtheridon)
|
||||
case 30572: // Quake (Magtheridon)
|
||||
case 30769: // Pick Red Riding Hood (Karazhan, Big Bad Wolf)
|
||||
case 30835: // Infernal Relay (Karazhan, Prince Malchezaar)
|
||||
case 31347: // Doom (Hyjal Summit, Azgalor)
|
||||
case 33711: // Murmur's Touch (Shadow Labyrinth, Murmur)
|
||||
case 38794: // Murmur's Touch (h) (Shadow Labyrinth, Murmur)
|
||||
case 40834: // Agonizing Flames (BT, Illidan Stormrage)
|
||||
case 41537: // Summon Enslaved Soul (BT, Reliquary of Souls)
|
||||
case 44869: // Spectral Blast (SWP, Kalecgos)
|
||||
case 45892: // Sinister Reflection (SWP, Kil'jaeden)
|
||||
case 45976: // Open Portal (SWP, M'uru)
|
||||
case 47669: // Awaken Subboss (Utgarde Pinnacle)
|
||||
case 48278: // Paralyze (Utgarde Pinnacle)
|
||||
case 50742: // Ooze Combine (Halls of Stone)
|
||||
case 50988: // Glare of the Tribunal (Halls of Stone)
|
||||
case 51003: // Summon Dark Matter Target (Halls of Stone)
|
||||
case 51146: // Summon Searing Gaze Target (Halls Of Stone)
|
||||
case 52438: // Summon Skittering Swarmer (Azjol Nerub, Krik'thir the Gatewatcher)
|
||||
case 52449: // Summon Skittering Infector (Azjol Nerub, Krik'thir the Gatewatcher)
|
||||
case 53457: // Impale (Azjol Nerub, Anub'arak)
|
||||
case 54148: // Ritual of the Sword (Utgarde Pinnacle, Svala)
|
||||
case 55479: // Forced Obedience (Naxxramas, Razovius)
|
||||
case 56140: // Summon Power Spark (Eye of Eternity, Malygos)
|
||||
case 59870: // Glare of the Tribunal (h) (Halls of Stone)
|
||||
case 62016: // Charge Orb (Ulduar, Thorim)
|
||||
case 62042: // Stormhammer (Ulduar, Thorim)
|
||||
case 62166: // Stone Grip (Ulduar, Kologarn)
|
||||
case 62301: // Cosmic Smash (Ulduar, Algalon)
|
||||
case 62488: // Activate Construct (Ulduar, Ignis)
|
||||
case 63018: // Searing Light (Ulduar, XT-002)
|
||||
case 63024: // Gravity Bomb (Ulduar, XT-002)
|
||||
case 63387: // Rapid Burst
|
||||
case 63795: // Psychosis (Ulduar, Yogg-Saron)
|
||||
case 63820: // Summon Scrap Bot Trigger (Ulduar, Mimiron) use for Scrap Bots, hits npc 33856
|
||||
case 64218: // Overcharge (VoA, Emalon)
|
||||
case 64234: // Gravity Bomb (h) (Ulduar, XT-002)
|
||||
case 64425: // Summon Scrap Bot Trigger (Ulduar, Mimiron) use for Assault Bots, hits npc 33856
|
||||
case 64531: // Rapid Burst (h)
|
||||
case 65121: // Searing Light (h) (Ulduar, XT-002)
|
||||
case 65301: // Psychosis (Ulduar, Yogg-Saron)
|
||||
case 65872: // Pursuing Spikes (ToCrusader, Anub'arak)
|
||||
case 65950: // Touch of Light (ToCrusader, Val'kyr Twins)
|
||||
case 66001: // Touch of Darkness (ToCrusader, Val'kyr Twins)
|
||||
case 66152: // Bullet Controller Summon Periodic Trigger Light (ToCrusader)
|
||||
case 66153: // Bullet Controller Summon Periodic Trigger Dark (ToCrusader)
|
||||
case 66332: // Nerubian Burrower (Mode 0) (ToCrusader, Anub'arak)
|
||||
case 66336: // Mistress' Kiss (ToCrusader, Jaraxxus)
|
||||
case 66339: // Summon Scarab (ToCrusader, Anub'arak)
|
||||
case 67077: // Mistress' Kiss (Mode 2) (ToCrusader, Jaraxxus)
|
||||
case 67281: // Touch of Darkness (Mode 1)
|
||||
case 67282: // Touch of Darkness (Mode 2)
|
||||
case 67283: // Touch of Darkness (Mode 3)
|
||||
case 67296: // Touch of Light (Mode 1)
|
||||
case 67297: // Touch of Light (Mode 2)
|
||||
case 67298: // Touch of Light (Mode 3)
|
||||
case 68950: // Fear (FoS)
|
||||
case 68912: // Wailing Souls (FoS)
|
||||
case 69048: // Mirrored Soul (FoS)
|
||||
case 69057: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar) 10 man
|
||||
case 72088:
|
||||
case 73142:
|
||||
case 73144:
|
||||
case 69140: // Coldflame (ICC, Marrowgar)
|
||||
case 69674: // Mutated Infection (ICC, Rotface)
|
||||
case 70450: // Blood Mirror
|
||||
case 70837: // Blood Mirror
|
||||
case 70882: // Slime Spray Summon Trigger (ICC, Rotface)
|
||||
case 70920: // Unbound Plague Search Effect (ICC, Putricide)
|
||||
case 71224: // Mutated Infection (Mode 1)
|
||||
case 71445: // Twilight Bloodbolt
|
||||
case 71471: // Twilight Bloodbolt
|
||||
case 71837: // Vampiric Bite
|
||||
case 71861: // Swarming Shadows
|
||||
case 72091: // Frozen Orb (Vault of Archavon, Toravon)
|
||||
case 73022: // Mutated Infection (Mode 2)
|
||||
case 73023: // Mutated Infection (Mode 3)
|
||||
unMaxTargets = 1;
|
||||
break;
|
||||
case 28542: // Life Drain (Naxx, Sapphiron)
|
||||
case 66013: // Penetrating Cold (10 man) (ToCrusader, Anub'arak)
|
||||
case 67755: // Nerubian Burrower (Mode 1) (ToCrusader, Anub'arak)
|
||||
case 67756: // Nerubian Burrower (Mode 2) (ToCrusader, Anub'arak)
|
||||
case 68509: // Penetrating Cold (10 man heroic)
|
||||
case 69055: // Bone Slice (ICC, Lord Marrowgar)
|
||||
case 69278: // Gas spore (ICC, Festergut)
|
||||
case 70341: // Slime Puddle (ICC, Putricide)
|
||||
case 71336: // Pact of the Darkfallen
|
||||
case 71390: // Pact of the Darkfallen
|
||||
unMaxTargets = 2;
|
||||
break;
|
||||
case 28796: // Poison Bolt Volley (Naxx, Faerlina)
|
||||
case 29213: // Curse of the Plaguebringer (Naxx, Noth the Plaguebringer)
|
||||
case 30004: // Flame Wreath (Karazhan, Shade of Aran)
|
||||
case 31298: // Sleep (Hyjal Summit, Anetheron)
|
||||
case 39992: // Needle Spine Targeting (BT, Warlord Najentus)
|
||||
case 41303: // Soul Drain (BT, Reliquary of Souls)
|
||||
case 41376: // Spite (BT, Reliquary of Souls)
|
||||
case 51904: // Summon Ghouls On Scarlet Crusade
|
||||
case 54522: // Summon Ghouls On Scarlet Crusade
|
||||
case 60936: // Surge of Power (h) (Malygos)
|
||||
case 61693: // Arcane Storm (Malygos)
|
||||
case 63981: // StoneGrip (h) (Ulduar, Kologarn)
|
||||
case 64598: // Cosmic Smash (h) (Ulduar, Algalon)
|
||||
case 64620: // Summon Fire Bot Trigger (Ulduar, Mimiron) hits npc 33856
|
||||
case 70814: // Bone Slice (ICC, Lord Marrowgar, heroic)
|
||||
case 72095: // Frozen Orb (h) (Vault of Archavon, Toravon)
|
||||
case 72089: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar) 25 man
|
||||
case 70826:
|
||||
case 73143:
|
||||
case 73145:
|
||||
unMaxTargets = 3;
|
||||
break;
|
||||
case 37676: // Insidious Whisper (SSC, Leotheras the Blind)
|
||||
case 38028: // Watery Grave (SSC, Morogrim Tidewalker)
|
||||
case 67757: // Nerubian Burrower (Mode 3) (ToCrusader, Anub'arak)
|
||||
case 71221: // Gas spore (Mode 1) (ICC, Festergut)
|
||||
unMaxTargets = 4;
|
||||
break;
|
||||
case 30843: // Enfeeble (Karazhan, Prince Malchezaar)
|
||||
case 40243: // Crushing Shadows (BT, Teron Gorefiend)
|
||||
case 42005: // Bloodboil (BT, Gurtogg Bloodboil)
|
||||
case 45641: // Fire Bloom (SWP, Kil'jaeden)
|
||||
case 55665: // Life Drain (h) (Naxx, Sapphiron)
|
||||
case 58917: // Consume Minions
|
||||
case 64604: // Nature Bomb (Ulduar, Freya)
|
||||
case 67076: // Mistress' Kiss (Mode 1) (ToCrusader, Jaraxxus)
|
||||
case 67078: // Mistress' Kiss (Mode 3) (ToCrusader, Jaraxxus)
|
||||
case 67700: // Penetrating Cold (25 man)
|
||||
case 68510: // Penetrating Cold (25 man, heroic)
|
||||
unMaxTargets = 5;
|
||||
break;
|
||||
case 61694: // Arcane Storm (h) (Malygos)
|
||||
unMaxTargets = 7;
|
||||
break;
|
||||
case 38054: // Random Rocket Missile
|
||||
unMaxTargets = 8;
|
||||
break;
|
||||
case 54098: // Poison Bolt Volley (h) (Naxx, Faerlina)
|
||||
case 54835: // Curse of the Plaguebringer (h) (Naxx, Noth the Plaguebringer)
|
||||
unMaxTargets = 10;
|
||||
break;
|
||||
case 25991: // Poison Bolt Volley (AQ40, Pincess Huhuran)
|
||||
unMaxTargets = 15;
|
||||
break;
|
||||
case 61916: // Lightning Whirl (Ulduar, Stormcaller Brundir)
|
||||
unMaxTargets = urand(2, 3);
|
||||
break;
|
||||
case 46771: // Flame Sear (SWP, Grand Warlock Alythess)
|
||||
unMaxTargets = urand(3, 5);
|
||||
break;
|
||||
case 63482: // Lightning Whirl (h) (Ulduar, Stormcaller Brundir)
|
||||
unMaxTargets = urand(3, 6);
|
||||
break;
|
||||
case 74452: // Conflagration (Saviana, Ruby Sanctum)
|
||||
{
|
||||
if (m_caster)
|
||||
{
|
||||
switch (m_caster->GetMap()->GetDifficulty())
|
||||
{
|
||||
case RAID_DIFFICULTY_10MAN_NORMAL:
|
||||
case RAID_DIFFICULTY_10MAN_HEROIC:
|
||||
unMaxTargets = 2;
|
||||
break;
|
||||
case RAID_DIFFICULTY_25MAN_NORMAL:
|
||||
case RAID_DIFFICULTY_25MAN_HEROIC:
|
||||
unMaxTargets = 5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
if (m_spellInfo->Id == 38194) // Blink
|
||||
unMaxTargets = 1;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
{
|
||||
// Sunder Armor (main spell)
|
||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000004000), 0x00000000) && m_spellInfo->SpellVisual[0] == 406)
|
||||
if (m_caster->HasAura(58387)) // Glyph of Sunder Armor
|
||||
EffectChainTarget = 2;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
// Starfall
|
||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x00000100))
|
||||
unMaxTargets = 2;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
{
|
||||
if (m_spellInfo->SpellIconID == 1737) // Corpse Explosion // TODO - spell 50445?
|
||||
unMaxTargets = 1;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_PALADIN:
|
||||
if (m_spellInfo->Id == 20424) // Seal of Command (2 more target for single targeted spell)
|
||||
{
|
||||
// overwrite EffectChainTarget for non single target spell
|
||||
if (Spell* currSpell = m_caster->GetCurrentSpell(CURRENT_GENERIC_SPELL))
|
||||
{
|
||||
for(int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
if(SpellEffectEntry const* spellEffect = currSpell->m_spellInfo->GetSpellEffect(SpellEffectIndex(i)))
|
||||
if(spellEffect->EffectChainTarget > 0)
|
||||
EffectChainTarget = 0; // no chain targets
|
||||
if (currSpell->m_spellInfo->GetMaxAffectedTargets() > 0)
|
||||
EffectChainTarget = 0; // no chain targets
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// custom radius cases
|
||||
switch (m_spellInfo->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case 24811: // Draw Spirit (Lethon)
|
||||
{
|
||||
if (effIndex == EFFECT_INDEX_0) // Copy range from EFF_1 to 0
|
||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->GetRadiusIndex()));
|
||||
break;
|
||||
}
|
||||
case 28241: // Poison (Naxxramas, Grobbulus Cloud)
|
||||
case 54363: // Poison (Naxxramas, Grobbulus Cloud) (H)
|
||||
{
|
||||
uint32 auraId = (m_spellInfo->Id == 28241 ? 28158 : 54362);
|
||||
if (SpellAuraHolder* auraHolder = m_caster->GetSpellAuraHolder(auraId))
|
||||
radius = 0.5f * (60000 - auraHolder->GetAuraDuration()) * 0.001f;
|
||||
break;
|
||||
}
|
||||
case 66881: // Slime Pool (ToCrusader, Acidmaw & Dreadscale)
|
||||
case 67638: // Slime Pool (ToCrusader, Acidmaw & Dreadscale) (Mode 1)
|
||||
case 67639: // Slime Pool (ToCrusader, Acidmaw & Dreadscale) (Mode 2)
|
||||
case 67640: // Slime Pool (ToCrusader, Acidmaw & Dreadscale) (Mode 3)
|
||||
if (SpellAuraHolder* auraHolder = m_caster->GetSpellAuraHolder(66882))
|
||||
radius = 0.5f * (60000 - auraHolder->GetAuraDuration()) * 0.001f;
|
||||
break;
|
||||
case 56438: // Arcane Overload
|
||||
if (Unit* realCaster = GetAffectiveCaster())
|
||||
radius = radius * realCaster->GetObjectScale();
|
||||
break;
|
||||
case 69057: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar encounter, 10N)
|
||||
case 70826: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar encounter, 25N)
|
||||
case 72088: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar encounter, 10H)
|
||||
case 72089: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar encounter, 25H)
|
||||
case 73142: // Bone Spike Graveyard (during Bone Storm) (Icecrown Citadel, Lord Marrowgar encounter, 10N)
|
||||
case 73143: // Bone Spike Graveyard (during Bone Storm) (Icecrown Citadel, Lord Marrowgar encounter, 25N)
|
||||
case 73144: // Bone Spike Graveyard (during Bone Storm) (Icecrown Citadel, Lord Marrowgar encounter, 10H)
|
||||
case 73145: // Bone Spike Graveyard (during Bone Storm) (Icecrown Citadel, Lord Marrowgar encounter, 25H)
|
||||
radius = DEFAULT_VISIBILITY_INSTANCE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
float radius;
|
||||
GetSpellRangeAndRadius(spellEffect, radius, EffectChainTarget, unMaxTargets);
|
||||
|
||||
std::list<GameObject*> tempTargetGOList;
|
||||
|
||||
|
|
@ -8143,3 +7843,304 @@ void Spell::CancelGlobalCooldown()
|
|||
else if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)m_caster)->GetGlobalCooldownMgr().CancelGlobalCooldown(m_spellInfo);
|
||||
}
|
||||
|
||||
void Spell::GetSpellRangeAndRadius(SpellEffectEntry const* spellEffect, float& radius, uint32& EffectChainTarget, uint32& unMaxTargets) const
|
||||
{
|
||||
if (uint32 radiusIndex = spellEffect->GetRadiusIndex())
|
||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->GetRadiusIndex()));
|
||||
else
|
||||
radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
||||
if (Unit* realCaster = GetAffectiveCaster())
|
||||
{
|
||||
if (Player* modOwner = realCaster->GetSpellModOwner())
|
||||
{
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius, this);
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_JUMP_TARGETS, EffectChainTarget, this);
|
||||
}
|
||||
}
|
||||
|
||||
// custom target amount cases
|
||||
switch(m_spellInfo->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case 802: // Mutate Bug (AQ40, Emperor Vek'nilash)
|
||||
case 804: // Explode Bug (AQ40, Emperor Vek'lor)
|
||||
case 23138: // Gate of Shazzrah (MC, Shazzrah)
|
||||
case 28560: // Summon Blizzard (Naxx, Sapphiron)
|
||||
case 30541: // Blaze (Magtheridon)
|
||||
case 30572: // Quake (Magtheridon)
|
||||
case 30769: // Pick Red Riding Hood (Karazhan, Big Bad Wolf)
|
||||
case 30835: // Infernal Relay (Karazhan, Prince Malchezaar)
|
||||
case 31347: // Doom (Hyjal Summit, Azgalor)
|
||||
case 33711: // Murmur's Touch (Shadow Labyrinth, Murmur)
|
||||
case 38794: // Murmur's Touch (h) (Shadow Labyrinth, Murmur)
|
||||
case 40834: // Agonizing Flames (BT, Illidan Stormrage)
|
||||
case 41537: // Summon Enslaved Soul (BT, Reliquary of Souls)
|
||||
case 44869: // Spectral Blast (SWP, Kalecgos)
|
||||
case 45892: // Sinister Reflection (SWP, Kil'jaeden)
|
||||
case 45976: // Open Portal (SWP, M'uru)
|
||||
case 47669: // Awaken Subboss (Utgarde Pinnacle)
|
||||
case 48278: // Paralyze (Utgarde Pinnacle)
|
||||
case 50742: // Ooze Combine (Halls of Stone)
|
||||
case 50988: // Glare of the Tribunal (Halls of Stone)
|
||||
case 51003: // Summon Dark Matter Target (Halls of Stone)
|
||||
case 51146: // Summon Searing Gaze Target (Halls Of Stone)
|
||||
case 52438: // Summon Skittering Swarmer (Azjol Nerub, Krik'thir the Gatewatcher)
|
||||
case 52449: // Summon Skittering Infector (Azjol Nerub, Krik'thir the Gatewatcher)
|
||||
case 53457: // Impale (Azjol Nerub, Anub'arak)
|
||||
case 54148: // Ritual of the Sword (Utgarde Pinnacle, Svala)
|
||||
case 55479: // Forced Obedience (Naxxramas, Razovius)
|
||||
case 56140: // Summon Power Spark (Eye of Eternity, Malygos)
|
||||
case 59870: // Glare of the Tribunal (h) (Halls of Stone)
|
||||
case 62016: // Charge Orb (Ulduar, Thorim)
|
||||
case 62042: // Stormhammer (Ulduar, Thorim)
|
||||
case 62166: // Stone Grip (Ulduar, Kologarn)
|
||||
case 62301: // Cosmic Smash (Ulduar, Algalon)
|
||||
case 62488: // Activate Construct (Ulduar, Ignis)
|
||||
case 63018: // Searing Light (Ulduar, XT-002)
|
||||
case 63024: // Gravity Bomb (Ulduar, XT-002)
|
||||
case 63387: // Rapid Burst
|
||||
case 63795: // Psychosis (Ulduar, Yogg-Saron)
|
||||
case 63820: // Summon Scrap Bot Trigger (Ulduar, Mimiron) use for Scrap Bots, hits npc 33856
|
||||
case 64218: // Overcharge (VoA, Emalon)
|
||||
case 64234: // Gravity Bomb (h) (Ulduar, XT-002)
|
||||
case 64425: // Summon Scrap Bot Trigger (Ulduar, Mimiron) use for Assault Bots, hits npc 33856
|
||||
case 64531: // Rapid Burst (h)
|
||||
case 65121: // Searing Light (h) (Ulduar, XT-002)
|
||||
case 65301: // Psychosis (Ulduar, Yogg-Saron)
|
||||
case 65872: // Pursuing Spikes (ToCrusader, Anub'arak)
|
||||
case 65950: // Touch of Light (ToCrusader, Val'kyr Twins)
|
||||
case 66001: // Touch of Darkness (ToCrusader, Val'kyr Twins)
|
||||
case 66152: // Bullet Controller Summon Periodic Trigger Light (ToCrusader)
|
||||
case 66153: // Bullet Controller Summon Periodic Trigger Dark (ToCrusader)
|
||||
case 66332: // Nerubian Burrower (Mode 0) (ToCrusader, Anub'arak)
|
||||
case 66336: // Mistress' Kiss (ToCrusader, Jaraxxus)
|
||||
case 66339: // Summon Scarab (ToCrusader, Anub'arak)
|
||||
case 67077: // Mistress' Kiss (Mode 2) (ToCrusader, Jaraxxus)
|
||||
case 67281: // Touch of Darkness (Mode 1)
|
||||
case 67282: // Touch of Darkness (Mode 2)
|
||||
case 67283: // Touch of Darkness (Mode 3)
|
||||
case 67296: // Touch of Light (Mode 1)
|
||||
case 67297: // Touch of Light (Mode 2)
|
||||
case 67298: // Touch of Light (Mode 3)
|
||||
case 68950: // Fear (FoS)
|
||||
case 68912: // Wailing Souls (FoS)
|
||||
case 69048: // Mirrored Soul (FoS)
|
||||
case 69057: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar) 10 man
|
||||
case 72088:
|
||||
case 73142:
|
||||
case 73144:
|
||||
case 69140: // Coldflame (ICC, Marrowgar)
|
||||
case 69674: // Mutated Infection (ICC, Rotface)
|
||||
case 70450: // Blood Mirror
|
||||
case 70837: // Blood Mirror
|
||||
case 70882: // Slime Spray Summon Trigger (ICC, Rotface)
|
||||
case 70920: // Unbound Plague Search Effect (ICC, Putricide)
|
||||
case 71224: // Mutated Infection (Mode 1)
|
||||
case 71445: // Twilight Bloodbolt
|
||||
case 71471: // Twilight Bloodbolt
|
||||
case 71837: // Vampiric Bite
|
||||
case 71861: // Swarming Shadows
|
||||
case 72091: // Frozen Orb (Vault of Archavon, Toravon)
|
||||
case 73022: // Mutated Infection (Mode 2)
|
||||
case 73023: // Mutated Infection (Mode 3)
|
||||
unMaxTargets = 1;
|
||||
break;
|
||||
case 28542: // Life Drain (Naxx, Sapphiron)
|
||||
case 66013: // Penetrating Cold (10 man) (ToCrusader, Anub'arak)
|
||||
case 67755: // Nerubian Burrower (Mode 1) (ToCrusader, Anub'arak)
|
||||
case 67756: // Nerubian Burrower (Mode 2) (ToCrusader, Anub'arak)
|
||||
case 68509: // Penetrating Cold (10 man heroic)
|
||||
case 69055: // Bone Slice (ICC, Lord Marrowgar)
|
||||
case 69278: // Gas spore (ICC, Festergut)
|
||||
case 70341: // Slime Puddle (ICC, Putricide)
|
||||
case 71336: // Pact of the Darkfallen
|
||||
case 71390: // Pact of the Darkfallen
|
||||
unMaxTargets = 2;
|
||||
break;
|
||||
case 28796: // Poison Bolt Volley (Naxx, Faerlina)
|
||||
case 29213: // Curse of the Plaguebringer (Naxx, Noth the Plaguebringer)
|
||||
case 30004: // Flame Wreath (Karazhan, Shade of Aran)
|
||||
case 31298: // Sleep (Hyjal Summit, Anetheron)
|
||||
case 39992: // Needle Spine Targeting (BT, Warlord Najentus)
|
||||
case 41303: // Soul Drain (BT, Reliquary of Souls)
|
||||
case 41376: // Spite (BT, Reliquary of Souls)
|
||||
case 51904: // Summon Ghouls On Scarlet Crusade
|
||||
case 54522: // Summon Ghouls On Scarlet Crusade
|
||||
case 60936: // Surge of Power (h) (Malygos)
|
||||
case 61693: // Arcane Storm (Malygos)
|
||||
case 63981: // StoneGrip (h) (Ulduar, Kologarn)
|
||||
case 64598: // Cosmic Smash (h) (Ulduar, Algalon)
|
||||
case 64620: // Summon Fire Bot Trigger (Ulduar, Mimiron) hits npc 33856
|
||||
case 70814: // Bone Slice (ICC, Lord Marrowgar, heroic)
|
||||
case 72095: // Frozen Orb (h) (Vault of Archavon, Toravon)
|
||||
case 72089: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar) 25 man
|
||||
case 70826:
|
||||
case 73143:
|
||||
case 73145:
|
||||
unMaxTargets = 3;
|
||||
break;
|
||||
case 37676: // Insidious Whisper (SSC, Leotheras the Blind)
|
||||
case 38028: // Watery Grave (SSC, Morogrim Tidewalker)
|
||||
case 67757: // Nerubian Burrower (Mode 3) (ToCrusader, Anub'arak)
|
||||
case 71221: // Gas spore (Mode 1) (ICC, Festergut)
|
||||
unMaxTargets = 4;
|
||||
break;
|
||||
case 30843: // Enfeeble (Karazhan, Prince Malchezaar)
|
||||
case 40243: // Crushing Shadows (BT, Teron Gorefiend)
|
||||
case 42005: // Bloodboil (BT, Gurtogg Bloodboil)
|
||||
case 45641: // Fire Bloom (SWP, Kil'jaeden)
|
||||
case 55665: // Life Drain (h) (Naxx, Sapphiron)
|
||||
case 58917: // Consume Minions
|
||||
case 64604: // Nature Bomb (Ulduar, Freya)
|
||||
case 67076: // Mistress' Kiss (Mode 1) (ToCrusader, Jaraxxus)
|
||||
case 67078: // Mistress' Kiss (Mode 3) (ToCrusader, Jaraxxus)
|
||||
case 67700: // Penetrating Cold (25 man)
|
||||
case 68510: // Penetrating Cold (25 man, heroic)
|
||||
unMaxTargets = 5;
|
||||
break;
|
||||
case 61694: // Arcane Storm (h) (Malygos)
|
||||
unMaxTargets = 7;
|
||||
break;
|
||||
case 38054: // Random Rocket Missile
|
||||
unMaxTargets = 8;
|
||||
break;
|
||||
case 54098: // Poison Bolt Volley (h) (Naxx, Faerlina)
|
||||
case 54835: // Curse of the Plaguebringer (h) (Naxx, Noth the Plaguebringer)
|
||||
unMaxTargets = 10;
|
||||
break;
|
||||
case 25991: // Poison Bolt Volley (AQ40, Pincess Huhuran)
|
||||
unMaxTargets = 15;
|
||||
break;
|
||||
case 61916: // Lightning Whirl (Ulduar, Stormcaller Brundir)
|
||||
unMaxTargets = urand(2, 3);
|
||||
break;
|
||||
case 46771: // Flame Sear (SWP, Grand Warlock Alythess)
|
||||
unMaxTargets = urand(3, 5);
|
||||
break;
|
||||
case 63482: // Lightning Whirl (h) (Ulduar, Stormcaller Brundir)
|
||||
unMaxTargets = urand(3, 6);
|
||||
break;
|
||||
case 74452: // Conflagration (Saviana, Ruby Sanctum)
|
||||
{
|
||||
if (m_caster)
|
||||
{
|
||||
switch (m_caster->GetMap()->GetDifficulty())
|
||||
{
|
||||
case RAID_DIFFICULTY_10MAN_NORMAL:
|
||||
case RAID_DIFFICULTY_10MAN_HEROIC:
|
||||
unMaxTargets = 2;
|
||||
break;
|
||||
case RAID_DIFFICULTY_25MAN_NORMAL:
|
||||
case RAID_DIFFICULTY_25MAN_HEROIC:
|
||||
unMaxTargets = 5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
if (m_spellInfo->Id == 38194) // Blink
|
||||
unMaxTargets = 1;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
{
|
||||
// Sunder Armor (main spell)
|
||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000004000), 0x00000000) && m_spellInfo->SpellVisual[0] == 406)
|
||||
if (m_caster->HasAura(58387)) // Glyph of Sunder Armor
|
||||
EffectChainTarget = 2;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
// Starfall
|
||||
if (m_spellInfo->IsFitToFamilyMask(UI64LIT(0x0000000000000000), 0x00000100))
|
||||
unMaxTargets = 2;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
{
|
||||
if (m_spellInfo->SpellIconID == 1737) // Corpse Explosion // TODO - spell 50445?
|
||||
unMaxTargets = 1;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_PALADIN:
|
||||
if (m_spellInfo->Id == 20424) // Seal of Command (2 more target for single targeted spell)
|
||||
{
|
||||
// overwrite EffectChainTarget for non single target spell
|
||||
if (Spell* currSpell = m_caster->GetCurrentSpell(CURRENT_GENERIC_SPELL))
|
||||
{
|
||||
for(int i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
if(SpellEffectEntry const* spellEffect = currSpell->m_spellInfo->GetSpellEffect(SpellEffectIndex(i)))
|
||||
if(spellEffect->EffectChainTarget > 0)
|
||||
EffectChainTarget = 0; // no chain targets
|
||||
if (currSpell->m_spellInfo->GetMaxAffectedTargets() > 0)
|
||||
EffectChainTarget = 0; // no chain targets
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// custom radius cases
|
||||
switch (m_spellInfo->GetSpellFamilyName())
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
switch (m_spellInfo->Id)
|
||||
{
|
||||
case 24811: // Draw Spirit (Lethon)
|
||||
{
|
||||
if (spellEffect->EffectIndex == EFFECT_INDEX_0) // Copy range from EFF_1 to 0
|
||||
radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(spellEffect->GetRadiusIndex()));
|
||||
break;
|
||||
}
|
||||
case 28241: // Poison (Naxxramas, Grobbulus Cloud)
|
||||
case 54363: // Poison (Naxxramas, Grobbulus Cloud) (H)
|
||||
{
|
||||
uint32 auraId = (m_spellInfo->Id == 28241 ? 28158 : 54362);
|
||||
if (SpellAuraHolder* auraHolder = m_caster->GetSpellAuraHolder(auraId))
|
||||
radius = 0.5f * (60000 - auraHolder->GetAuraDuration()) * 0.001f;
|
||||
break;
|
||||
}
|
||||
case 66881: // Slime Pool (ToCrusader, Acidmaw & Dreadscale)
|
||||
case 67638: // Slime Pool (ToCrusader, Acidmaw & Dreadscale) (Mode 1)
|
||||
case 67639: // Slime Pool (ToCrusader, Acidmaw & Dreadscale) (Mode 2)
|
||||
case 67640: // Slime Pool (ToCrusader, Acidmaw & Dreadscale) (Mode 3)
|
||||
if (SpellAuraHolder* auraHolder = m_caster->GetSpellAuraHolder(66882))
|
||||
radius = 0.5f * (60000 - auraHolder->GetAuraDuration()) * 0.001f;
|
||||
break;
|
||||
case 56438: // Arcane Overload
|
||||
if (Unit* realCaster = GetAffectiveCaster())
|
||||
radius = radius * realCaster->GetObjectScale();
|
||||
break;
|
||||
case 69057: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar encounter, 10N)
|
||||
case 70826: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar encounter, 25N)
|
||||
case 72088: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar encounter, 10H)
|
||||
case 72089: // Bone Spike Graveyard (Icecrown Citadel, Lord Marrowgar encounter, 25H)
|
||||
case 73142: // Bone Spike Graveyard (during Bone Storm) (Icecrown Citadel, Lord Marrowgar encounter, 10N)
|
||||
case 73143: // Bone Spike Graveyard (during Bone Storm) (Icecrown Citadel, Lord Marrowgar encounter, 25N)
|
||||
case 73144: // Bone Spike Graveyard (during Bone Storm) (Icecrown Citadel, Lord Marrowgar encounter, 10H)
|
||||
case 73145: // Bone Spike Graveyard (during Bone Storm) (Icecrown Citadel, Lord Marrowgar encounter, 25H)
|
||||
radius = DEFAULT_VISIBILITY_INSTANCE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,6 +366,9 @@ class Spell
|
|||
void EffectQuestOffer(SpellEffectEntry const* effect);
|
||||
void EffectActivateRune(SpellEffectEntry const* effect);
|
||||
void EffectTeachTaxiNode(SpellEffectEntry const* effect);
|
||||
void EffectWMODamage(SpellEffectEntry const* effect);
|
||||
void EffectWMORepair(SpellEffectEntry const* effect);
|
||||
void EffectWMOChange(SpellEffectEntry const* effect);
|
||||
void EffectTitanGrip(SpellEffectEntry const* effect);
|
||||
void EffectEnchantItemPrismatic(SpellEffectEntry const* effect);
|
||||
void EffectPlaySound(SpellEffectEntry const* effect);
|
||||
|
|
@ -419,21 +422,12 @@ class Spell
|
|||
void WriteSpellGoTargets(WorldPacket* data);
|
||||
void WriteAmmoToPacket(WorldPacket* data);
|
||||
|
||||
typedef std::list<Unit*> UnitList;
|
||||
void FillTargetMap();
|
||||
void SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& targetUnitMap);
|
||||
|
||||
void FillAreaTargets(UnitList& targetUnitMap, float radius, SpellNotifyPushType pushType, SpellTargets spellTargets, WorldObject* originalCaster = NULL);
|
||||
void FillRaidOrPartyTargets(UnitList& targetUnitMap, Unit* member, Unit* center, float radius, bool raid, bool withPets, bool withcaster);
|
||||
void FillRaidOrPartyManaPriorityTargets(UnitList& targetUnitMap, Unit* member, Unit* center, float radius, uint32 count, bool raid, bool withPets, bool withcaster);
|
||||
void FillRaidOrPartyHealthPriorityTargets(UnitList& targetUnitMap, Unit* member, Unit* center, float radius, uint32 count, bool raid, bool withPets, bool withcaster);
|
||||
|
||||
template<typename T> WorldObject* FindCorpseUsing();
|
||||
|
||||
bool CheckTarget(Unit* target, SpellEffectIndex eff);
|
||||
bool CanAutoCast(Unit* target);
|
||||
|
||||
static void MANGOS_DLL_SPEC SendCastResult(Player* caster, SpellEntry const* spellInfo, uint8 cast_count, SpellCastResult result);
|
||||
static void MANGOS_DLL_SPEC SendCastResult(Player* caster, SpellEntry const* spellInfo, uint8 cast_count, SpellCastResult result, bool isPetCastResult = false);
|
||||
void SendCastResult(SpellCastResult result);
|
||||
void SendSpellStart();
|
||||
void SendSpellGo();
|
||||
|
|
@ -498,6 +492,7 @@ class Spell
|
|||
WorldObject* GetCastingObject() const;
|
||||
|
||||
uint32 GetPowerCost() const { return m_powerCost; }
|
||||
uint32 GetUsedHolyPower() const { return m_usedHolyPower; }
|
||||
|
||||
void UpdatePointers(); // must be used at call Spell code after time delay (non triggered spell cast/update spell call/etc)
|
||||
|
||||
|
|
@ -515,6 +510,8 @@ class Spell
|
|||
|
||||
static void SelectMountByAreaAndSkill(Unit* target, SpellEntry const* parentSpell, uint32 spellId75, uint32 spellId150, uint32 spellId225, uint32 spellId300, uint32 spellIdSpecial);
|
||||
|
||||
typedef std::list<Unit*> UnitList;
|
||||
|
||||
protected:
|
||||
bool HasGlobalCooldown();
|
||||
void TriggerGlobalCooldown();
|
||||
|
|
@ -536,6 +533,7 @@ class Spell
|
|||
SpellSchoolMask m_spellSchoolMask; // Spell school (can be overwrite for some spells (wand shoot for example)
|
||||
WeaponAttackType m_attackType; // For weapon based attack
|
||||
uint32 m_powerCost; // Calculated spell cost initialized only in Spell::prepare
|
||||
uint32 m_usedHolyPower;
|
||||
int32 m_casttime; // Calculated spell cast time initialized only in Spell::prepare
|
||||
int32 m_duration;
|
||||
bool m_canReflect; // can reflect this spell?
|
||||
|
|
@ -593,6 +591,22 @@ class Spell
|
|||
uint32 m_procVictim; // Victim trigger flags
|
||||
void prepareDataForTriggerSystem();
|
||||
|
||||
//*****************************************
|
||||
// Spell target filling
|
||||
//*****************************************
|
||||
|
||||
void FillTargetMap();
|
||||
void SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& targetUnitMap);
|
||||
|
||||
void FillAreaTargets(UnitList& targetUnitMap, float radius, SpellNotifyPushType pushType, SpellTargets spellTargets, WorldObject* originalCaster = NULL);
|
||||
void FillRaidOrPartyTargets(UnitList& targetUnitMap, Unit* member, Unit* center, float radius, bool raid, bool withPets, bool withcaster);
|
||||
void FillRaidOrPartyManaPriorityTargets(UnitList& targetUnitMap, Unit* member, Unit* center, float radius, uint32 count, bool raid, bool withPets, bool withcaster);
|
||||
void FillRaidOrPartyHealthPriorityTargets(UnitList& targetUnitMap, Unit* member, Unit* center, float radius, uint32 count, bool raid, bool withPets, bool withcaster);
|
||||
|
||||
// Returns a target that was filled by SPELL_SCRIPT_TARGET (or selected victim) Can return NULL
|
||||
Unit* GetPrefilledUnitTargetOrUnitTarget(SpellEffectIndex effIndex) const;
|
||||
void GetSpellRangeAndRadius(SpellEffectEntry const* spellEffect, float& radius, uint32& EffectChainTarget, uint32& unMaxTargets) const;
|
||||
|
||||
//*****************************************
|
||||
// Spell target subsystem
|
||||
//*****************************************
|
||||
|
|
@ -688,6 +702,7 @@ class Spell
|
|||
bool DoSummonCritter(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectEntry const* effect, uint32 level);
|
||||
bool DoSummonGuardian(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectEntry const* effect, uint32 level);
|
||||
bool DoSummonPossessed(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectEntry const* effect, uint32 level);
|
||||
bool DoSummonVehicle(CreatureSummonPositions& list, SummonPropertiesEntry const* prop, SpellEffectEntry const* effect, uint32 level);
|
||||
};
|
||||
|
||||
enum ReplenishType
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12555"
|
||||
#define REVISION_NR "12556"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue