From 43f713f660107bf9c8c17306f555b416c3b9f6ca Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Sat, 6 Dec 2008 08:05:00 +0300 Subject: [PATCH] [6879] Not apply casting time spell bonuses mods to creature (non-pets) casted spells with 0 cast time. --- src/game/Unit.cpp | 4 ++++ src/shared/revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 21d6aa831..f58e54e7d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10552,6 +10552,10 @@ void Unit::ApplyCastTimePercentMod(float val, bool apply ) uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectType damagetype, uint32 CastingTime ) { + // Not apply this to creature casted spells with casttime==0 + if(CastingTime==0 && GetTypeId()==TYPEID_UNIT && !((Creature*)this)->isPet()) + return 3500; + if (CastingTime > 7000) CastingTime = 7000; if (CastingTime < 1500) CastingTime = 1500; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 53d0f4b8d..cfb991ff2 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 "6878" + #define REVISION_NR "6879" #endif // __REVISION_NR_H__