aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp53
1 files changed, 37 insertions, 16 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index d0518191bb3..c417a14ccd3 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
@@ -1158,9 +1158,13 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
return;
m_caster->CastCustomSpell(unitTarget, 52752, &damage, NULL, NULL, true);
return;
- case 54171: //Divine Storm
+ case 54171: // Divine Storm
{
- m_caster->CastCustomSpell(unitTarget, 54172, &damage, 0, 0, true);
+ if (m_UniqueTargetInfo.size())
+ {
+ int32 heal = damage / m_UniqueTargetInfo.size();
+ m_caster->CastCustomSpell(unitTarget, 54172, &heal, NULL, NULL, true);
+ }
return;
}
case 58418: // Portal to Orgrimmar
@@ -1387,16 +1391,6 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
}
break;
case SPELLFAMILY_PALADIN:
- // Divine Storm
- if (m_spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_PALADIN_DIVINESTORM && effIndex == 1)
- {
- int32 dmg = CalculatePctN(m_damage, damage);
- if (!unitTarget)
- unitTarget = m_caster;
- m_caster->CastCustomSpell(unitTarget, 54171, &dmg, 0, 0, true);
- return;
- }
-
switch (m_spellInfo->Id)
{
case 31789: // Righteous Defense (step 1)
@@ -2806,9 +2800,8 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
return;
case GAMEOBJECT_TYPE_QUESTGIVER:
- // start or end quest
- player->PrepareQuestMenu(guid);
- player->SendPreparedQuest(guid);
+ player->PrepareGossipMenu(gameObjTarget, gameObjTarget->GetGOInfo()->questgiver.gossipID);
+ player->SendPreparedGossip(gameObjTarget);
return;
case GAMEOBJECT_TYPE_SPELL_FOCUS:
@@ -5836,7 +5829,10 @@ void Spell::EffectInebriate(SpellEffIndex /*effIndex*/)
uint16 currentDrunk = player->GetDrunkValue();
uint16 drunkMod = damage * 256;
if (currentDrunk + drunkMod > 0xFFFF)
+ {
currentDrunk = 0xFFFF;
+ player->CastSpell(player, 67468, false);
+ }
else
currentDrunk += drunkMod;
player->SetDrunkValue(currentDrunk, m_CastItem ? m_CastItem->GetEntry() : 0);
@@ -6959,10 +6955,35 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
{
if (player->GetRuneCooldown(j) && player->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue))
{
+ if (m_spellInfo->Id == 45529)
+ if (player->GetBaseRune(j) != RuneType(m_spellInfo->Effects[effIndex].MiscValueB))
+ continue;
player->SetRuneCooldown(j, 0);
--count;
}
}
+
+ // Blood Tap
+ if (m_spellInfo->Id == 45529 && count > 0)
+ {
+ for (uint32 l = 0; l < MAX_RUNES && count > 0; ++l)
+ {
+ // Check if both runes are on cd as that is the only time when this needs to come into effect
+ if ((player->GetRuneCooldown(l) && player->GetCurrentRune(l) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)) && (player->GetRuneCooldown(l+1) && player->GetCurrentRune(l+1) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)))
+ {
+ // Should always update the rune with the lowest cd
+ if (player->GetRuneCooldown(l) >= player->GetRuneCooldown(l+1))
+ l++;
+ player->SetRuneCooldown(l, 0);
+ --count;
+ // is needed to push through to the client that the rune is active
+ player->ResyncRunes(MAX_RUNES);
+ }
+ else
+ break;
+ }
+ }
+
// Empower rune weapon
if (m_spellInfo->Id == 47568)
{