mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[7475] Move Player::IsInFeralForm to Unit::IsInFeralForm
This commit is contained in:
parent
816862db65
commit
c99a849eb9
5 changed files with 7 additions and 5 deletions
|
|
@ -1161,7 +1161,6 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
void AddArmorProficiency(uint32 newflag) { m_ArmorProficiency |= newflag; }
|
void AddArmorProficiency(uint32 newflag) { m_ArmorProficiency |= newflag; }
|
||||||
uint32 GetWeaponProficiency() const { return m_WeaponProficiency; }
|
uint32 GetWeaponProficiency() const { return m_WeaponProficiency; }
|
||||||
uint32 GetArmorProficiency() const { return m_ArmorProficiency; }
|
uint32 GetArmorProficiency() const { return m_ArmorProficiency; }
|
||||||
bool IsInFeralForm() const { return m_form == FORM_CAT || m_form == FORM_BEAR || m_form == FORM_DIREBEAR; }
|
|
||||||
bool IsUseEquipedWeapon( bool mainhand ) const
|
bool IsUseEquipedWeapon( bool mainhand ) const
|
||||||
{
|
{
|
||||||
// disarm applied only to mainhand weapon
|
// disarm applied only to mainhand weapon
|
||||||
|
|
|
||||||
|
|
@ -3327,7 +3327,7 @@ void Aura::HandleAuraModDisarm(bool apply, bool Real)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// main-hand attack speed already set to special value for feral form already and don't must change and reset at remove.
|
// main-hand attack speed already set to special value for feral form already and don't must change and reset at remove.
|
||||||
if (((Player *)m_target)->IsInFeralForm())
|
if (m_target->IsInFeralForm())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (apply)
|
if (apply)
|
||||||
|
|
|
||||||
|
|
@ -2842,7 +2842,7 @@ uint32 Unit::GetWeaponSkillValue (WeaponAttackType attType, Unit const* target)
|
||||||
if(attType != BASE_ATTACK && !item )
|
if(attType != BASE_ATTACK && !item )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(((Player*)this)->IsInFeralForm())
|
if(IsInFeralForm())
|
||||||
return GetMaxSkillValueForLevel(); // always maximized SKILL_FERAL_COMBAT in fact
|
return GetMaxSkillValueForLevel(); // always maximized SKILL_FERAL_COMBAT in fact
|
||||||
|
|
||||||
// weapon skill or (unarmed for base attack)
|
// weapon skill or (unarmed for base attack)
|
||||||
|
|
@ -9645,7 +9645,7 @@ uint32 Unit::GetCreatureType() const
|
||||||
{
|
{
|
||||||
if(GetTypeId() == TYPEID_PLAYER)
|
if(GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
SpellShapeshiftEntry const* ssEntry = sSpellShapeshiftStore.LookupEntry(((Player*)this)->m_form);
|
SpellShapeshiftEntry const* ssEntry = sSpellShapeshiftStore.LookupEntry(m_form);
|
||||||
if(ssEntry && ssEntry->creatureType > 0)
|
if(ssEntry && ssEntry->creatureType > 0)
|
||||||
return ssEntry->creatureType;
|
return ssEntry->creatureType;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1197,8 +1197,11 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
||||||
uint64 m_ObjectSlot[4];
|
uint64 m_ObjectSlot[4];
|
||||||
uint32 m_detectInvisibilityMask;
|
uint32 m_detectInvisibilityMask;
|
||||||
uint32 m_invisibilityMask;
|
uint32 m_invisibilityMask;
|
||||||
|
|
||||||
uint32 m_ShapeShiftFormSpellId;
|
uint32 m_ShapeShiftFormSpellId;
|
||||||
ShapeshiftForm m_form;
|
ShapeshiftForm m_form;
|
||||||
|
bool IsInFeralForm() const { return m_form == FORM_CAT || m_form == FORM_BEAR || m_form == FORM_DIREBEAR; }
|
||||||
|
|
||||||
float m_modMeleeHitChance;
|
float m_modMeleeHitChance;
|
||||||
float m_modRangedHitChance;
|
float m_modRangedHitChance;
|
||||||
float m_modSpellHitChance;
|
float m_modSpellHitChance;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7474"
|
#define REVISION_NR "7475"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue