202 uint32 triggered_spell_id = 0;
203 uint32 cooldown_spell_id = 0;
205 Unit* target = victim;
206 int32 basepoints0 = 0;
207 uint64 originalCaster = 0;
213 switch (dummySpell->
Id)
218 if (!procSpell || procSpell->
Id == 24659)
239 triggered_spell_id = 33494;
245 triggered_spell_id = 21064;
251 basepoints0 = 3 * damage;
255 triggered_spell_id = 31285;
281 triggered_spell_id =
RAND(39511, 40997, 40998, 40999, 41002, 41005, 41009, 41011, 41409);
282 cooldown_spell_id = 39511;
287 triggered_spell_id =
RAND(39511, 40997, 40998, 41002, 41005, 41011);
288 cooldown_spell_id = 39511;
294 triggered_spell_id =
RAND(40999, 41002, 41005, 41009, 41011, 41406, 41409);
295 cooldown_spell_id = 40999;
298 triggered_spell_id =
RAND(40997, 40999, 41002, 41005, 41009, 41011, 41406, 41409);
299 cooldown_spell_id = 40997;
328 triggered_spell_id = 45479;
348 triggered_spell_id = 45429;
365 triggered_spell_id = 45480;
371 triggered_spell_id = 45428;
388 triggered_spell_id = 45432;
395 triggered_spell_id = 45431;
412 triggered_spell_id = 45478;
418 triggered_spell_id = 45430;
427 triggered_spell_id = 52724;
428 basepoints0 = damage / 2;
439 owner->
CastSpell(owner, 58227,
true, castItem, triggeredByAura);
459 std::vector<uint32> RandomSpells;
465 RandomSpells.push_back(71484);
466 RandomSpells.push_back(71491);
467 RandomSpells.push_back(71492);
471 RandomSpells.push_back(71486);
472 RandomSpells.push_back(71485);
473 RandomSpells.push_back(71492);
476 RandomSpells.push_back(71484);
477 RandomSpells.push_back(71485);
478 RandomSpells.push_back(71492);
481 RandomSpells.push_back(71486);
482 RandomSpells.push_back(71491);
483 RandomSpells.push_back(71485);
488 if (RandomSpells.empty())
491 uint8 rand_spell = std::rand() % RandomSpells.size();
492 CastSpell(target, RandomSpells[rand_spell],
true, castItem, triggeredByAura, originalCaster);
493 for (std::vector<uint32>::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr)
495 if (!
ToPlayer()->HasSpellCooldown(*itr))
505 std::vector<uint32> RandomSpells;
511 RandomSpells.push_back(71561);
512 RandomSpells.push_back(71559);
513 RandomSpells.push_back(71560);
517 RandomSpells.push_back(71558);
518 RandomSpells.push_back(71556);
519 RandomSpells.push_back(71560);
522 RandomSpells.push_back(71561);
523 RandomSpells.push_back(71556);
524 RandomSpells.push_back(71560);
527 RandomSpells.push_back(71558);
528 RandomSpells.push_back(71559);
529 RandomSpells.push_back(71556);
534 if (RandomSpells.empty())
537 uint8 rand_spell = std::rand() % RandomSpells.size();
538 CastSpell(target, RandomSpells[rand_spell],
true, castItem, triggeredByAura, originalCaster);
539 for (std::vector<uint32>::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr)
541 if (!
ToPlayer()->HasSpellCooldown(*itr))
591 CastSpell(
this, 48107,
true, castItem, triggeredByAura);
597 CastSpell(
this, 48108,
true, castItem, triggeredByAura);
610 triggered_spell_id = 37436;
635 caster->
CastSpell(
this, spell,
true, castItem);
657 caster->
CastSpell(
this, 32865,
true, castItem);
664 switch (dummySpell->
Id)
669 triggered_spell_id = 37379;
681 triggered_spell_id = 37382;
687 triggered_spell_id = 37378;
695 switch (dummySpell->
Id)
702 triggered_spell_id = 40441;
705 triggered_spell_id = 40440;
718 triggered_spell_id = 26170;
730 triggered_spell_id = 39373;
736 triggered_spell_id = 28810;
744 triggered_spell_id = 70772;
756 switch (dummySpell->
Id)
761 if (triggerAmount <= 0)
765 triggered_spell_id = 34299;
768 CastCustomSpell(
this, 68285, &mana, NULL, NULL,
true, castItem, triggeredByAura);
786 triggered_spell_id = 37238;
797 triggered_spell_id = 40445;
803 triggered_spell_id = 40446;
809 triggered_spell_id = 40452;
827 triggered_spell_id = 71023;
847 if (!caster->
GetGroup() && victim ==
this)
862 triggered_spell_id = 31930;
865 switch (dummySpell->
Id)
880 triggered_spell_id = 28795;
884 triggered_spell_id = 28793;
888 triggered_spell_id = 28791;
891 triggered_spell_id = 28790;
904 bool stacker = !procSpell || procSpell->
Id == 53595;
908 if (!stacker && !damager)
911 triggered_spell_id = 31803;
916 if (aur->GetStackAmount() == 5)
919 aur->RefreshDuration();
940 triggered_spell_id = 40471;
946 triggered_spell_id = 40472;
960 triggered_spell_id = 64891;
961 basepoints0 = triggerAmount * damage / 300;
967 if (!victim || !victim->
IsAlive())
970 CastSpell(
this, 71432,
true, NULL, triggeredByAura);
977 triggered_spell_id = 71433;
981 triggered_spell_id = 71434;
991 triggered_spell_id = 71881;
994 triggered_spell_id = 71883;
997 triggered_spell_id = 71882;
1000 triggered_spell_id = 71884;
1013 triggered_spell_id = 71888;
1016 triggered_spell_id = 71886;
1019 triggered_spell_id = 71887;
1022 triggered_spell_id = 71885;
1034 switch (dummySpell->
Id)
1049 triggered_spell_id = 28824;
1053 triggered_spell_id = 28825;
1057 triggered_spell_id = 28826;
1060 triggered_spell_id = 28827;
1071 if (!player || !castItem || !castItem->
IsEquipped() || !victim || !victim->
IsAlive())
1094 if (pEnchant && pEnchant->
spellid[0] == dummySpell->
Id)
1103 if (!windfurySpellInfo)
1105 SF_LOG_ERROR(
"entities.unit",
"Unit::HandleDummyAuraProc: non-existing spell id: %u (Windfury)", spellId);
1115 triggered_spell_id = 25504;
1118 triggered_spell_id = 33750;
1125 for (
uint32 i = 0; i < 2; ++i)
1126 CastCustomSpell(victim, triggered_spell_id, &basepoints0, NULL, NULL,
true, castItem, triggeredByAura);
1139 triggered_spell_id = 40465;
1144 triggered_spell_id = 40465;
1149 triggered_spell_id = 40466;
1169 triggered_spell_id = 58879;
1171 CastCustomSpell(
this, triggered_spell_id, &basepoints0, NULL, NULL,
true, NULL, triggeredByAura);
1178 triggered_spell_id = 64930;
1187 triggered_spell_id = 71824;
1189 if (!triggeredSpell)
1201 triggered_spell_id = 70809;
1203 if (!triggeredSpell)
1217 if (
ToPlayer()->HasSpellCooldown(16166))
1220 if (newCooldownDelay < 3)
1221 newCooldownDelay = 0;
1223 newCooldownDelay -= 2;
1240 Aura* flameShock = aurEff->GetBase();
1242 int32 newDuration = flameShock->
GetDuration() + 2 * aurEff->GetAmplitude();
1246 if (newDuration > maxDuration)
1263 float chance = (float)triggerAmount;
1267 triggered_spell_id = 63685;
1296 basepoints0 =
int32((fire_onhit * BaseWeaponSpeed) + (add_spellpower * BaseWeaponSpeed));
1297 triggered_spell_id = 10444;
1306 basepoints0 =
int32((fire_onhit * BaseWeaponSpeed) + (add_spellpower * BaseWeaponSpeed));
1307 triggered_spell_id = 10444;
1314 CastCustomSpell(victim, triggered_spell_id, &basepoints0, NULL, NULL,
true, castItem, triggeredByAura);
1329 CastSpell(target, spell,
true, castItem, triggeredByAura);
1341 if (!target || !target->
IsAlive())
1348 if (dummySpell->
Id == 49028)
1356 if ((*itr)->GetEntry() == 27893)
1362 if (pPet && pPet->
GetVictim() && damage && procSpell)
1364 uint32 procDmg = damage / 2;
1373 if (dummySpell->
Id == 49194)
1375 triggered_spell_id = 50536;
1384 AddPct(basepoints0, glyph->GetAmount());
1400 switch (procSpell->
Id)
1402 case 49020: triggered_spell_id = 66198;
break;
1403 case 49143: triggered_spell_id = 66196;
break;
1404 case 45462: triggered_spell_id = 66216;
break;
1405 case 49998: triggered_spell_id = 66188;
break;
1406 case 56815: triggered_spell_id = 66217;
break;
1407 case 45902: triggered_spell_id = 66215;
break;
1414 if (dummySpell->
Id == 61257)
1422 triggered_spell_id = 61258;
1433 if (!triggered_spell_id)
1437 if (!triggered_spell_id)
1443 SF_LOG_ERROR(
"entities.unit",
"Unit::HandleDummyAuraProc: Spell %u has non-existing triggered spell %u", dummySpell->
Id, triggered_spell_id);
1447 if (cooldown_spell_id == 0)
1448 cooldown_spell_id = triggered_spell_id;
1454 CastCustomSpell(target, triggered_spell_id, &basepoints0, NULL, NULL,
true, castItem, triggeredByAura, originalCaster);
1456 CastSpell(target, triggered_spell_id,
true, castItem, triggeredByAura, originalCaster);
1674 Unit* target = NULL;
1675 int32 basepoints0 = 0;
1678 basepoints0 = triggerAmount;
1684 if (
sSpellMgr->GetSpellInfo(trigger_spell_id) == NULL)
1689 switch (auraSpellInfo->
Id)
1717 trigger_spell_id = 60235;
1741 trigger_spell_id = 67703;
1756 trigger_spell_id = 67772;
1766 CastSpell(
this, 29471,
true, castItem, triggeredByAura);
1767 if (victim && victim->
IsAlive())
1768 CastSpell(victim, 27526,
true, castItem, triggeredByAura);
1784 switch (auraSpellInfo->
Id)
1791 case FORM_NONE: trigger_spell_id = 37344;
break;
1792 case FORM_CAT: trigger_spell_id = 37341;
break;
1793 case FORM_BEAR: trigger_spell_id = 37340;
break;
1794 case FORM_TREE: trigger_spell_id = 37342;
break;
1810 switch (auraSpellInfo->
Id)
1814 trigger_spell_id = 63468;
1817 SF_LOG_ERROR(
"entities.unit",
"Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots", auraSpellInfo->
Id);
1829 if (auraSpellInfo->
Id == 67151)
1831 trigger_spell_id = 68130;
1839 switch (auraSpellInfo->
Id)
1847 trigger_spell_id = 60512;
1850 trigger_spell_id = 60513;
1853 trigger_spell_id = 60514;
1856 trigger_spell_id = 60515;
1871 uint32 stack_spell_id = 0;
1872 switch (auraSpellInfo->
Id)
1875 stack_spell_id = 37658;
1876 trigger_spell_id = 37661;
1879 stack_spell_id = 54842;
1880 trigger_spell_id = 54843;
1883 stack_spell_id = 67713;
1884 trigger_spell_id = 67714;
1887 stack_spell_id = 67759;
1888 trigger_spell_id = 67760;
1892 CastSpell(
this, stack_spell_id,
true, NULL, triggeredByAura);
1910 if (auraSpellInfo->
Id == 70656)
1916 if (
ToPlayer()->GetRuneCooldown(i) == 0)
1923 switch (auraSpellInfo->
Id)
1942 if (triggerEntry == NULL)
1955 switch (auraSpellInfo->
Id)
1969 trigger_spell_id = 35101;
1978 trigger_spell_id = 26470;
1984 if (!victim || victim->
GetEntry() != 19457)
2007 if (!victim || !victim->
IsAlive())
2034 victim->
CastSpell(victim, trigger_spell_id,
true);
2053 switch (trigger_spell_id)
2067 if (!victim || victim ==
this)
2094 CastSpell(
this, 70849,
true, castItem, triggeredByAura);
2095 CastSpell(
this, 71072,
true, castItem, triggeredByAura);
2096 CastSpell(
this, 71069,
true, castItem, triggeredByAura);
2112 if ((maelstrom->GetStackAmount() == maelstrom->GetSpellInfo()->StackAmount - 1) &&
roll_chance_i(aurEff->GetAmount()))
2113 CastSpell(
this, 70831,
true, castItem, triggeredByAura);
2201 CastCustomSpell(target, trigger_spell_id, &basepoints0, NULL, NULL,
true, castItem, triggeredByAura);
2203 CastSpell(target, trigger_spell_id,
true, castItem, triggeredByAura);