Merge branch 'master' of git@github.com:mangos/mangos.git into procflag

This commit is contained in:
DiSlord 2008-12-12 01:34:09 +03:00
commit 6c02f00a93
115 changed files with 3209 additions and 1482 deletions

View file

@ -339,7 +339,8 @@ enum DeathState
JUST_DIED = 1,
CORPSE = 2,
DEAD = 3,
JUST_ALIVED = 4
JUST_ALIVED = 4,
DEAD_FALLING= 5
};
enum UnitState
@ -365,14 +366,14 @@ enum UnitState
enum UnitMoveType
{
MOVE_WALK = 0,
MOVE_RUN = 1,
MOVE_WALKBACK = 2,
MOVE_SWIM = 3,
MOVE_SWIMBACK = 4,
MOVE_TURN = 5,
MOVE_FLY = 6,
MOVE_FLYBACK = 7
MOVE_WALK = 0,
MOVE_RUN = 1,
MOVE_RUN_BACK = 2,
MOVE_SWIM = 3,
MOVE_SWIM_BACK = 4,
MOVE_TURN_RATE = 5,
MOVE_FLIGHT = 6,
MOVE_FLIGHT_BACK = 7,
};
#define MAX_MOVE_TYPE 8
@ -1003,11 +1004,14 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
DeathState getDeathState() { return m_deathState; };
virtual void setDeathState(DeathState s); // overwrited in Creature/Player/Pet
uint64 const& GetOwnerGUID() const { return GetUInt64Value(UNIT_FIELD_SUMMONEDBY); }
uint64 GetOwnerGUID() const { return GetUInt64Value(UNIT_FIELD_SUMMONEDBY); }
void SetOwnerGUID(uint64 owner) { SetUInt64Value(UNIT_FIELD_SUMMONEDBY, owner); }
uint64 GetCreatorGUID() const { return GetUInt64Value(UNIT_FIELD_CREATEDBY); }
void SetCreatorGUID(uint64 creator) { SetUInt64Value(UNIT_FIELD_CREATEDBY, creator); }
uint64 GetPetGUID() const { return GetUInt64Value(UNIT_FIELD_SUMMON); }
uint64 GetCharmerGUID() const { return GetUInt64Value(UNIT_FIELD_CHARMEDBY); }
uint64 GetCharmGUID() const { return GetUInt64Value(UNIT_FIELD_CHARM); }
void SetCharmerGUID(uint64 owner) { SetUInt64Value(UNIT_FIELD_CHARMEDBY, owner); }
uint64 GetCharmGUID() const { return GetUInt64Value(UNIT_FIELD_CHARM); }
uint64 GetCharmerOrOwnerGUID() const { return GetCharmerGUID() ? GetCharmerGUID() : GetOwnerGUID(); }
uint64 GetCharmerOrOwnerOrOwnGUID() const
@ -1036,6 +1040,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
void SetPet(Pet* pet);
void SetCharm(Unit* pet);
bool isCharmed() const { return GetCharmerGUID() != 0; }
CharmInfo* GetCharmInfo() { return m_charmInfo; }
@ -1158,7 +1163,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
void SetVisibility(UnitVisibility x);
// common function for visibility checks for player/creatures with detection code
bool isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList = false) const;
bool isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList = false, bool is3dDistance = true) const;
bool canDetectInvisibilityOf(Unit const* u) const;
// virtual functions for all world objects types
@ -1171,7 +1176,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
AuraList const& GetSingleCastAuras() const { return m_scAuras; }
SpellImmuneList m_spellImmune[MAX_SPELL_IMMUNITY];
// Threat related methodes
// Threat related methods
bool CanHaveThreatList() const;
void AddThreat(Unit* pVictim, float threat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellEntry const *threatSpell = NULL);
float ApplyTotalThreatModifier(float threat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL);