[7428] Add new .map file format use more compact data store and use
Rewrite .map extractor
+ extract more useful data
+ add "-f 0" option for disable size/accuracy optimisation
+ Compatability vs 2.4.3 client data
More fast get .map data
Implement fatigue timer
Rewrite breath timer
Allow absorb/resist for lava/slime environmental damage
Need re-extract map for work.
Author: DiSlord
--HG--
branch : trunk
This commit is contained in:
+14
-10
@@ -72,10 +72,11 @@ enum PlayerUnderwaterState
|
||||
{
|
||||
UNDERWATER_NONE = 0x00,
|
||||
UNDERWATER_INWATER = 0x01, // terrain type is water and player is afflicted by it
|
||||
UNDERWATER_WATER_TRIGGER = 0x02, // m_breathTimer has been initialized
|
||||
UNDERWATER_WATER_BREATHB = 0x04, // breathbar has been send to client
|
||||
UNDERWATER_WATER_BREATHB_RETRACTING = 0x10, // breathbar is currently refilling - the player is above water level
|
||||
UNDERWATER_INLAVA = 0x80 // terrain type is lava and player is afflicted by it
|
||||
UNDERWATER_INLAVA = 0x02, // terrain type is lava and player is afflicted by it
|
||||
UNDERWATER_INSLIME = 0x04, // terrain type is lava and player is afflicted by it
|
||||
UNDERWARER_INDARKWATER = 0x08, // terrain type is dark water and player is afflicted by it
|
||||
|
||||
UNDERWATER_EXIST_TIMERS = 0x10
|
||||
};
|
||||
|
||||
enum PlayerSpellState
|
||||
@@ -501,6 +502,8 @@ enum MirrorTimerType
|
||||
BREATH_TIMER = 1,
|
||||
FIRE_TIMER = 2
|
||||
};
|
||||
#define MAX_TIMERS 3
|
||||
#define DISABLED_MIRROR_TIMER -1
|
||||
|
||||
// 2^n values
|
||||
enum PlayerExtraFlags
|
||||
@@ -1722,6 +1725,7 @@ class TRINITY_DLL_SPEC Player : public Unit
|
||||
uint32 DurabilityRepairAll(bool cost, float discountMod, bool guildBank);
|
||||
uint32 DurabilityRepair(uint16 pos, bool cost, float discountMod, bool guildBank);
|
||||
|
||||
void UpdateMirrorTimers();
|
||||
void StopMirrorTimers()
|
||||
{
|
||||
StopMirrorTimer(FATIGUE_TIMER);
|
||||
@@ -2040,7 +2044,6 @@ class TRINITY_DLL_SPEC Player : public Unit
|
||||
bool IsFlying() const { return HasUnitMovementFlag(MOVEMENTFLAG_FLYING); }
|
||||
bool IsAllowUseFlyMountsHere() const;
|
||||
|
||||
void HandleDrowning();
|
||||
void HandleFallUnderMap();
|
||||
|
||||
void SetClientControl(Unit* target, uint8 allowMove);
|
||||
@@ -2268,12 +2271,14 @@ class TRINITY_DLL_SPEC Player : public Unit
|
||||
/*********************************************************/
|
||||
/*** ENVIRONMENTAL SYSTEM ***/
|
||||
/*********************************************************/
|
||||
void HandleLava();
|
||||
void HandleSobering();
|
||||
void StartMirrorTimer(MirrorTimerType Type, uint32 MaxValue);
|
||||
void ModifyMirrorTimer(MirrorTimerType Type, uint32 MaxValue, uint32 CurrentValue, uint32 Regen);
|
||||
void SendMirrorTimer(MirrorTimerType Type, uint32 MaxValue, uint32 CurrentValue, int32 Regen);
|
||||
void StopMirrorTimer(MirrorTimerType Type);
|
||||
uint8 m_isunderwater;
|
||||
void HandleDrowning(uint32 time_diff);
|
||||
int32 getMaxTimer(MirrorTimerType timer);
|
||||
int32 m_MirrorTimer[MAX_TIMERS];
|
||||
uint8 m_MirrorTimerFlags;
|
||||
uint8 m_MirrorTimerFlagsLast;
|
||||
bool m_isInWater;
|
||||
|
||||
/*********************************************************/
|
||||
@@ -2357,7 +2362,6 @@ class TRINITY_DLL_SPEC Player : public Unit
|
||||
bool m_DailyQuestChanged;
|
||||
time_t m_lastDailyQuestTime;
|
||||
|
||||
uint32 m_breathTimer;
|
||||
uint32 m_drunkTimer;
|
||||
uint16 m_drunk;
|
||||
uint32 m_weaponChangeTimer;
|
||||
|
||||
Reference in New Issue
Block a user