From edbfb386ce87f918da8e11e843d7b5a227e5328d Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 4 Feb 2009 10:25:28 -0600 Subject: *Do not check range weapon skills for paladin. This fix the bug that flying hammer miss too much. --HG-- branch : trunk --- src/game/Creature.h | 1 - src/game/Unit.cpp | 6 +++++- src/game/Unit.h | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/Creature.h b/src/game/Creature.h index 14fc77cf24a..cde68f0670b 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -673,7 +673,6 @@ class TRINITY_DLL_SPEC Creature : public Unit bool m_AlreadyCallAssistance; bool m_regenHealth; bool m_AI_locked; - bool m_AI_enabled; bool m_isDeadByDefault; SpellSchoolMask m_meleeDamageSchoolMask; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index db777fe757f..d46b4180b64 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -149,7 +149,7 @@ bool IsPassiveStackableSpell( uint32 spellId ) Unit::Unit() : WorldObject(), i_motionMaster(this), m_ThreatManager(this), m_HostilRefManager(this) -, m_IsInNotifyList(false), m_Notified(false) +, m_IsInNotifyList(false), m_Notified(false), m_AI_enabled(false) { m_objectType |= TYPEMASK_UNIT; m_objectTypeId = TYPEID_UNIT; @@ -3576,7 +3576,11 @@ uint32 Unit::GetWeaponSkillValue (WeaponAttackType attType, Unit const* target) // feral or unarmed skill only for base attack if(attType != BASE_ATTACK && !item ) + { + if(attType == RANGED_ATTACK && getClass() == CLASS_PALADIN) //hammer + return GetMaxSkillValueForLevel(); return 0; + } if(((Player*)this)->IsInFeralForm()) return GetMaxSkillValueForLevel(); // always maximized SKILL_FERAL_COMBAT in fact diff --git a/src/game/Unit.h b/src/game/Unit.h index b1ca703007c..af670b80208 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1452,6 +1452,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject uint32 m_reactiveTimer[MAX_REACTIVE]; ThreatManager m_ThreatManager; + + bool m_AI_enabled; private: void SendAttackStop(Unit* victim); // only from AttackStop(Unit*) //void SendAttackStart(Unit* pVictim); // only from Unit::AttackStart(Unit*) -- cgit v1.2.3