aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.h')
-rw-r--r--src/game/Unit.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 75bc9d927f1..399d0667e3e 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -219,6 +219,8 @@ enum SheathState
SHEATH_STATE_RANGED = 2 // prepared ranged weapon
};
+#define MAX_SHEATH_STATE 3
+
// byte (1 from 0..3) of UNIT_FIELD_BYTES_2
enum UnitBytes2_Flags
{
@@ -1036,6 +1038,9 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void ApplyAttackTimePercentMod(WeaponAttackType att,float val, bool apply);
void ApplyCastTimePercentMod(float val, bool apply);
+ SheathState GetSheath() const { return SheathState(GetByteValue(UNIT_FIELD_BYTES_2, 0)); }
+ virtual void SetSheath( SheathState sheathed ) { SetByteValue(UNIT_FIELD_BYTES_2, 0, sheathed); }
+
// faction template id
uint32 getFaction() const { return GetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE); }
void setFaction(uint32 faction) { SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, faction ); }