diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 0b3b075b2b6..c8a00d1afe4 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5641,6 +5641,97 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger triggered_spell_id = 63321; // Life Tap break; } + case 71519: // Deathbringer's Will Normal + { + if (GetTypeId() != TYPEID_PLAYER) + return false; + + std::vector<uint32> RandomSpells; + switch (getClass()) + { + case CLASS_WARRIOR: + case CLASS_PALADIN: + case CLASS_DEATH_KNIGHT: + RandomSpells.push_back(71484); + RandomSpells.push_back(71491); + RandomSpells.push_back(71492); + break; + case CLASS_SHAMAN: + case CLASS_ROGUE: + RandomSpells.push_back(71486); + RandomSpells.push_back(71485); + RandomSpells.push_back(71492); + break; + case CLASS_DRUID: + RandomSpells.push_back(71484); + RandomSpells.push_back(71485); + RandomSpells.push_back(71486); + break; + case CLASS_HUNTER: + RandomSpells.push_back(71486); + RandomSpells.push_back(71491); + RandomSpells.push_back(71485); + break; + default: + return false; + } + if (RandomSpells.empty()) //shouldn't happen + return false; + + uint8 rand_spell = irand(0,(RandomSpells.size() - 1)); + CastSpell(target,RandomSpells[rand_spell],true,castItem,triggeredByAura, originalCaster); + for (std::vector<uint32>::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr) + { + if (!ToPlayer()->HasSpellCooldown(*itr)) + ToPlayer()->AddSpellCooldown(*itr,0,time(NULL) + cooldown); + } + break; + } + case 71562: // Deahtbringer's Will Heroic + { + if (GetTypeId() != TYPEID_PLAYER) + return false; + + std::vector<uint32> RandomSpells; + switch (getClass()) + { + case CLASS_WARRIOR: + case CLASS_PALADIN: + case CLASS_DEATH_KNIGHT: + RandomSpells.push_back(71561); + RandomSpells.push_back(71559); + RandomSpells.push_back(71560); + break; + case CLASS_SHAMAN: + case CLASS_ROGUE: + RandomSpells.push_back(71558); + RandomSpells.push_back(71556); + RandomSpells.push_back(71560); + break; + case CLASS_DRUID: + RandomSpells.push_back(71561); + RandomSpells.push_back(71556); + RandomSpells.push_back(71558); + break; + case CLASS_HUNTER: + RandomSpells.push_back(71558); + RandomSpells.push_back(71559); + RandomSpells.push_back(71556); + break; + default: + return false; + } + if (RandomSpells.empty()) //shouldn't happen + return false; + + uint8 rand_spell = irand(0,(RandomSpells.size() - 1)); + CastSpell(target,RandomSpells[rand_spell],true,castItem,triggeredByAura, originalCaster); + for (std::vector<uint32>::iterator itr = RandomSpells.begin(); itr != RandomSpells.end(); ++itr) + { + ToPlayer()->AddSpellCooldown(*itr,0,time(NULL) + cooldown); + } + break; + } } break; } |