From 2302b04a063e79988fb8fae0c0c595c5fc5c8a55 Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 22 Dec 2012 17:49:51 +0100 Subject: Core/Spell: Last work on Shadows Fate - Shadows Fate can now be applied by more than just one player at the same time. So on everyone who hits the unit the credit spell with the visual will be casted on death. - The AOE credit spells for the three infusion quests will be casted by the boss once. If this would be done on proc, these AOE spells could be casted up to 25 times. -> 25 AOE credit spells plus 25 Soul Feast credit spells equals Sh** --- src/server/game/Entities/Unit/Unit.cpp | 36 +++------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'src/server/game/Entities/Unit') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 92629d286bc..52515ebee8b 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -5572,44 +5572,14 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere // Shadow's Fate (Shadowmourne questline) case 71169: { - bool ok = false; - if (GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC) - { - uint32 spellId = 0; - - switch (GetEntry()) - { - case 36678: // NPC: Professor Putricide - spellId = 71518; // Spell: Unholy Infusion Credit - break; - case 37955: // NPC: Blood-Queen Lana'thel - spellId = 72934; // Spell: Quest Credit - break; - case 36853: // NPC: Sindragosa - spellId = 72289; // Spell: Frost Infusion Quest Credit - break; - default: - break; - } - - if (spellId) - CastSpell((Unit*)NULL, spellId, true); - - ok = true; - } - - // TODO: The aura should be applieable by multiple players Unit* caster = triggeredByAura->GetCaster(); if (caster && caster->GetTypeId() == TYPEID_PLAYER && caster->ToPlayer()->GetQuestStatus(24547) == QUEST_STATUS_INCOMPLETE) { CastSpell(caster, 71203, true); - ok = true; + return true; } - - if (!ok) + else return false; - - return true; } // Essence of the Blood Queen case 70871: @@ -9055,7 +9025,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg case 71169: { // Victim needs more checks so bugs, rats or summons can not be affected by the proc. - if (GetTypeId() != TYPEID_PLAYER || victim->GetTypeId() != TYPEID_UNIT || victim->GetCreatureType() == CREATURE_TYPE_CRITTER) + if (GetTypeId() != TYPEID_PLAYER || !victim || victim->GetTypeId() != TYPEID_UNIT || victim->GetCreatureType() == CREATURE_TYPE_CRITTER) return false; Player* player = ToPlayer(); -- cgit v1.2.3