aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-04 10:25:28 -0600
committermegamage <none@none>2009-02-04 10:25:28 -0600
commitedbfb386ce87f918da8e11e843d7b5a227e5328d (patch)
tree521c454182fcd43f4b2b4686a29f8d9d478af875 /src
parent18cbc94dd403e85da69068e61b5b90829fbb3a0a (diff)
*Do not check range weapon skills for paladin. This fix the bug that flying hammer miss too much.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Creature.h1
-rw-r--r--src/game/Unit.cpp6
-rw-r--r--src/game/Unit.h2
3 files changed, 7 insertions, 2 deletions
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*)