From 5c17458fb812de92e1364907cc5c9967fb026bc5 Mon Sep 17 00:00:00 2001 From: Laise Date: Sat, 8 May 2010 13:46:54 +0300 Subject: [PATCH] [9851] Restore work of 1856 and ranks --- src/game/SpellEffects.cpp | 25 +------------------------ src/shared/revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 5de99261b..ce226ab30 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2514,30 +2514,7 @@ void Spell::EffectTriggerSpell(SpellEffectIndex effIndex) if (unitTarget->GetTypeId() != TYPEID_PLAYER) return; - // get highest rank of the Stealth spell - uint32 spellId = 0; - const PlayerSpellMap& sp_list = ((Player*)unitTarget)->GetSpellMap(); - for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr) - { - // only highest rank is shown in spell book, so simply check if shown in spell book - if (!itr->second.active || itr->second.disabled || itr->second.state == PLAYERSPELL_REMOVED) - continue; - - SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); - if (!spellInfo) - continue; - - if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && spellInfo->SpellFamilyFlags & SPELLFAMILYFLAG_ROGUE_STEALTH) - { - spellId = spellInfo->Id; - break; - } - } - - // no Stealth spell found - if (!spellId) - return; - + uint32 spellId = 1784; // reset cooldown on it if needed if (((Player*)unitTarget)->HasSpellCooldown(spellId)) ((Player*)unitTarget)->RemoveSpellCooldown(spellId); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a023e0350..74c35151c 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9850" + #define REVISION_NR "9851" #endif // __REVISION_NR_H__