From cdd41601579e6e76dc2d82ceeb9de24af31aa79e Mon Sep 17 00:00:00 2001 From: tobmaps Date: Thu, 12 May 2011 02:44:41 +0700 Subject: Core/Spells: Fix talent Sword Specialization for melee abilities --- src/server/game/Entities/Unit/Unit.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index ecfc4e9c943..b87d665fb99 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -8624,6 +8624,25 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig break; } + // Sword Specialization + if (auraSpellInfo->SpellFamilyName == SPELLFAMILY_GENERIC && auraSpellInfo->SpellIconID == 1462 && procSpell) + { + if (Player* plr = ToPlayer()) + { + if (cooldown && plr->HasSpellCooldown(16459)) + return false; + + // this required for attacks like Mortal Strike + plr->RemoveSpellCooldown(procSpell->Id); + + CastSpell(pVictim, procSpell->Id, true); + + if (cooldown) + plr->AddSpellCooldown(16459, 0, time(NULL) + cooldown); + return true; + } + } + // Blade Barrier if (auraSpellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && auraSpellInfo->SpellIconID == 85) { -- cgit v1.2.3