From 337b75cafc4a8abcbee0e5cba274bc4dcdb5b289 Mon Sep 17 00:00:00 2001 From: pek2011 Date: Thu, 7 Apr 2011 15:10:10 +0300 Subject: Core/Cleanup: Drop some unused code and update some unknown player flags (from Mangos). Closes #1167 --- src/server/game/Entities/Creature/Creature.cpp | 1 - src/server/game/Entities/Player/Player.h | 54 +++++++++++++------------- src/server/game/Entities/Unit/Unit.cpp | 2 - src/server/game/Entities/Unit/Unit.h | 16 -------- src/server/game/Miscellaneous/SharedDefines.h | 8 ---- 5 files changed, 27 insertions(+), 54 deletions(-) (limited to 'src/server') diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 07a2ce1b886..ae39ef0fae5 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -154,7 +154,6 @@ m_formation(NULL) m_CreatureSpellCooldowns.clear(); m_CreatureCategoryCooldowns.clear(); DisableReputationGain = false; - //m_unit_movement_flags = MONSTER_MOVE_WALK; m_SightDistance = sWorld->getFloatConfig(CONFIG_SIGHT_MONSTER); m_CombatDistance = 0;//MELEE_RANGE; diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 9a2f509c521..03f09fcf3be 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -357,33 +357,33 @@ enum DrunkenState enum PlayerFlags { - PLAYER_FLAGS_GROUP_LEADER = 0x00000001, - PLAYER_FLAGS_AFK = 0x00000002, - PLAYER_FLAGS_DND = 0x00000004, - PLAYER_FLAGS_GM = 0x00000008, - PLAYER_FLAGS_GHOST = 0x00000010, - PLAYER_FLAGS_RESTING = 0x00000020, - PLAYER_FLAGS_UNK7 = 0x00000040, - PLAYER_FLAGS_UNK8 = 0x00000080, // pre-3.0.3 PLAYER_FLAGS_FFA_PVP flag for FFA PVP state - PLAYER_FLAGS_CONTESTED_PVP = 0x00000100, // Player has been involved in a PvP combat and will be attacked by contested guards - PLAYER_FLAGS_IN_PVP = 0x00000200, - PLAYER_FLAGS_HIDE_HELM = 0x00000400, - PLAYER_FLAGS_HIDE_CLOAK = 0x00000800, - PLAYER_FLAGS_UNK13 = 0x00001000, // played long time - PLAYER_FLAGS_UNK14 = 0x00002000, // played too long time - PLAYER_FLAGS_UNK15 = 0x00004000, - PLAYER_FLAGS_DEVELOPER = 0x00008000, // prefix for something? - PLAYER_FLAGS_UNK17 = 0x00010000, // pre-3.0.3 PLAYER_FLAGS_SANCTUARY flag for player entered sanctuary - PLAYER_FLAGS_UNK18 = 0x00020000, // taxi benchmark mode (on/off) (2.0.1) - PLAYER_FLAGS_PVP_TIMER = 0x00040000, // 3.0.2, pvp timer active (after you disable pvp manually) - PLAYER_FLAGS_UNK20 = 0x00080000, - PLAYER_FLAGS_UNK21 = 0x00100000, - PLAYER_FLAGS_UNK22 = 0x00200000, - PLAYER_FLAGS_UNK23 = 0x00400000, - PLAYER_ALLOW_ONLY_ABILITY = 0x00800000, // used by bladestorm and killing spree - PLAYER_FLAGS_UNK25 = 0x01000000, // disabled all melee ability on tab include autoattack - - PLAYER_FLAGS_NO_XP_GAIN = 0x02000000 + PLAYER_FLAGS_GROUP_LEADER = 0x00000001, + PLAYER_FLAGS_AFK = 0x00000002, + PLAYER_FLAGS_DND = 0x00000004, + PLAYER_FLAGS_GM = 0x00000008, + PLAYER_FLAGS_GHOST = 0x00000010, + PLAYER_FLAGS_RESTING = 0x00000020, + PLAYER_FLAGS_UNK7 = 0x00000040, + PLAYER_FLAGS_UNK8 = 0x00000080, // pre-3.0.3 PLAYER_FLAGS_FFA_PVP flag for FFA PVP state + PLAYER_FLAGS_CONTESTED_PVP = 0x00000100, // Player has been involved in a PvP combat and will be attacked by contested guards + PLAYER_FLAGS_IN_PVP = 0x00000200, + PLAYER_FLAGS_HIDE_HELM = 0x00000400, + PLAYER_FLAGS_HIDE_CLOAK = 0x00000800, + PLAYER_FLAGS_PLAYED_LONG_TIME = 0x00001000, // played long time + PLAYER_FLAGS_PLAYED_TOO_LONG = 0x00002000, // played too long time + PLAYER_FLAGS_IS_OUT_OF_BOUNDS = 0x00004000, + PLAYER_FLAGS_DEVELOPER = 0x00008000, // prefix for something? + PLAYER_FLAGS_UNK17 = 0x00010000, // pre-3.0.3 PLAYER_FLAGS_SANCTUARY flag for player entered sanctuary + PLAYER_FLAGS_TAXI_BENCHMARK = 0x00020000, // taxi benchmark mode (on/off) (2.0.1) + PLAYER_FLAGS_PVP_TIMER = 0x00040000, // 3.0.2, pvp timer active (after you disable pvp manually) + PLAYER_FLAGS_UNK20 = 0x00080000, + PLAYER_FLAGS_UNK21 = 0x00100000, + PLAYER_FLAGS_UNK22 = 0x00200000, + PLAYER_FLAGS_COMMENTATOR2 = 0x00400000, + PLAYER_ALLOW_ONLY_ABILITY = 0x00800000, // used by bladestorm and killing spree + PLAYER_FLAGS_UNK25 = 0x01000000, // disabled all melee ability on tab include autoattack + + PLAYER_FLAGS_NO_XP_GAIN = 0x02000000 }; // used for PLAYER__FIELD_KNOWN_TITLES field (uint64), (1<> 24) -#define MAX_UNIT_ACTION_BUTTON_ACTION_VALUE (0x00FFFFFF+1) #define MAKE_UNIT_ACTION_BUTTON(A,T) (uint32(A) | (uint32(T) << 24)) struct UnitActionBarEntry @@ -1056,9 +1049,6 @@ struct CharmInfo void SetCommandState(CommandStates st) { m_CommandState = st; } CommandStates GetCommandState() const { return m_CommandState; } bool HasCommandState(CommandStates state) const { return (m_CommandState == state); } - //void SetReactState(ReactStates st) { m_reactState = st; } - //ReactStates GetReactState() { return m_reactState; } - //bool HasReactState(ReactStates state) { return (m_reactState == state); } void InitPossessCreateSpells(); void InitCharmCreateSpells(); @@ -1100,7 +1090,6 @@ struct CharmInfo UnitActionBarEntry PetActionBar[MAX_UNIT_ACTION_BAR_INDEX]; CharmSpellEntry m_charmspells[4]; CommandStates m_CommandState; - //ReactStates m_reactState; uint32 m_petnumber; bool m_barInit; @@ -1372,8 +1361,6 @@ class Unit : public WorldObject void HandleEmoteCommand(uint32 anim_id); void AttackerStateUpdate (Unit *pVictim, WeaponAttackType attType = BASE_ATTACK, bool extra = false); - //float MeleeMissChanceCalc(const Unit *pVictim, WeaponAttackType attType) const; - void CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *damageInfo, WeaponAttackType attackType = BASE_ATTACK); void DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss); @@ -2142,7 +2129,6 @@ class Unit : public WorldObject virtual SpellSchoolMask GetMeleeDamageSchoolMask() const; MotionMaster i_motionMaster; - //uint32 m_unit_movement_flags; uint32 m_reactiveTimer[MAX_REACTIVE]; uint32 m_regenTimer; @@ -2191,8 +2177,6 @@ class Unit : public WorldObject Spell* m_currentSpells[CURRENT_MAX_SPELL]; Diminishing m_Diminishing; - // Manage all Units threatening us -// ThreatManager m_ThreatManager; // Manage all Units that are threatened by us HostileRefManager m_HostileRefManager; diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 6e2e338fa4a..05e00dba6b4 100755 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -642,8 +642,6 @@ enum Team TEAM_OTHER = 0, // if ReputationListId > 0 && Flags != FACTION_FLAG_TEAM_HEADER }; -const Team TeamId2Team[3] = {ALLIANCE, HORDE, TEAM_OTHER}; - enum SpellEffects { SPELL_EFFECT_INSTAKILL = 1, @@ -1211,12 +1209,6 @@ enum Mechanics (1<