mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 14:10:18 -04:00
Core/Cleanup: Drop some unused code and update some unknown player flags (from Mangos).
Closes #1167
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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, // <Dev> 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_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, // <Dev> 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
|
||||
PLAYER_FLAGS_NO_XP_GAIN = 0x02000000
|
||||
};
|
||||
|
||||
// used for PLAYER__FIELD_KNOWN_TITLES field (uint64), (1<<bit_index) without (-1)
|
||||
|
||||
@@ -170,7 +170,6 @@ m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE), m_HostileRefManager(this)
|
||||
m_CombatTimer = 0;
|
||||
m_lastManaUse = 0;
|
||||
|
||||
//m_victimThreat = 0.0f;
|
||||
for (uint8 i = 0; i < MAX_SPELL_SCHOOL; ++i)
|
||||
m_threatModifier[i] = 1.0f;
|
||||
m_isSorted = true;
|
||||
@@ -178,7 +177,6 @@ m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE), m_HostileRefManager(this)
|
||||
m_speed_rate[i] = 1.0f;
|
||||
|
||||
m_charmInfo = NULL;
|
||||
//m_unit_movement_flags = 0;
|
||||
m_reducedThreatPercent = 0;
|
||||
m_misdirectionTargetGUID = 0;
|
||||
|
||||
|
||||
@@ -687,12 +687,6 @@ enum MovementFlags2
|
||||
MOVEMENTFLAG2_UNK14 = 0x00002000,
|
||||
MOVEMENTFLAG2_UNK15 = 0x00004000,
|
||||
MOVEMENTFLAG2_UNK16 = 0x00008000,
|
||||
|
||||
// player only?
|
||||
MOVEMENTFLAG2_INTERPOLATED =
|
||||
MOVEMENTFLAG2_INTERPOLATED_MOVEMENT |
|
||||
MOVEMENTFLAG2_INTERPOLATED_TURNING |
|
||||
MOVEMENTFLAG2_INTERPOLATED_PITCHING
|
||||
};
|
||||
enum SplineFlags
|
||||
{
|
||||
@@ -988,7 +982,6 @@ enum CommandStates
|
||||
|
||||
#define UNIT_ACTION_BUTTON_ACTION(X) (uint32(X) & 0x00FFFFFF)
|
||||
#define UNIT_ACTION_BUTTON_TYPE(X) ((uint32(X) & 0xFF000000) >> 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;
|
||||
|
||||
|
||||
@@ -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<<MECHANIC_SHACKLE)|(1<<MECHANIC_TURN)|(1<<MECHANIC_HORROR)| \
|
||||
(1<<MECHANIC_DAZE)|(1<<MECHANIC_SAPPED))
|
||||
|
||||
// Daze and all croud control spells except polymorph are not removed
|
||||
#define MECHANIC_NOT_REMOVED_BY_SHAPESHIFT (\
|
||||
(1<<MECHANIC_CHARM)|(1<<MECHANIC_DISORIENTED)|(1<<MECHANIC_FEAR)|(1<<MECHANIC_PACIFY)| \
|
||||
(1<<MECHANIC_STUN)|(1<<MECHANIC_FREEZE)|(1<<MECHANIC_BANISH)|(1<<MECHANIC_SHACKLE)| \
|
||||
(1<<MECHANIC_HORROR)|(1<<MECHANIC_TURN)|(1<<MECHANIC_DAZE)|(1<<MECHANIC_SAPPED))
|
||||
|
||||
// Spell dispell type
|
||||
enum DispelType
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user