Advertisement
Guest User

Fatigue Disable

a guest
Oct 20th, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.48 KB | None | 0 0
  1. diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entiti
  2. index e12e5ee..b9e7b6d 100644
  3. --- a/src/server/game/Entities/Player/Player.cpp
  4. +++ b/src/server/game/Entities/Player/Player.cpp
  5. @@ -78,6 +78,7 @@
  6. #include "World.h"
  7. #include "WorldPacket.h"
  8. #include "WorldSession.h"
  9. +#include "Config.h"
  10.  
  11. #define ZONE_UPDATE_INTERVAL (1*IN_MILLISECONDS)
  12.  
  13. @@ -1312,9 +1313,12 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
  14. {
  15. switch (timer)
  16. {
  17. - case FATIGUE_TIMER:
  18. - return MINUTE * IN_MILLISECONDS;
  19. - case BREATH_TIMER:
  20. + if(ConfigMgr::GetBoolDefault("fatigue.enabled", true)) // If "fatigue.en
  21. + {
  22. + case FATIGUE_TIMER:
  23. + return MINUTE * IN_MILLISECONDS;
  24. + }
  25. + case BREATH_TIMER:
  26. {
  27. if (!isAlive() || HasAuraType(SPELL_AURA_WATER_BREATHING) || GetSes
  28. return DISABLED_MIRROR_TIMER;
  29. @@ -1396,6 +1400,9 @@ void Player::HandleDrowning(uint32 time_diff)
  30. }
  31.  
  32. // In dark water
  33. + if(ConfigMgr::GetBoolDefault("fatigue.enabled", true)) // If "fatigue.en
  34. + {
  35. +
  36. if (m_MirrorTimerFlags & UNDERWARER_INDARKWATER)
  37. {
  38. // Fatigue timer not activated - activate it
  39. @@ -1432,7 +1439,7 @@ void Player::HandleDrowning(uint32 time_diff)
  40. else if (m_MirrorTimerFlagsLast & UNDERWARER_INDARKWATER)
  41. SendMirrorTimer(FATIGUE_TIMER, DarkWaterTime, m_MirrorTimer[FATIGUE
  42. }
  43. -
  44. + }
  45. if (m_MirrorTimerFlags & (UNDERWATER_INLAVA /*| UNDERWATER_INSLIME*/) && !(
  46. {
  47. // Breath timer not activated - activate it
  48. diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserv
  49. index bf19240..b81fcbd 100644
  50. --- a/src/server/worldserver/worldserver.conf.dist
  51. +++ b/src/server/worldserver/worldserver.conf.dist
  52. @@ -825,6 +825,13 @@ RecruitAFriend.MaxDifference = 4
  53. DisableWaterBreath = 4
  54.  
  55. #
  56. +# Enable or Disable "Fatigue" timer
  57. +# default = 1 (enabled)
  58. +# = 0 (disabled)
  59. +
  60. +fatigue.enabled = 1
  61. +
  62. +#
  63. # AllFlightPaths
  64. # Description: Character knows all flight paths (of both factions) after
  65. # Default: 0 - (Disabled)
  66. diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entiti
  67. index e12e5ee..b9e7b6d 100644
  68. --- a/src/server/game/Entities/Player/Player.cpp
  69. +++ b/src/server/game/Entities/Player/Player.cpp
  70. @@ -78,6 +78,7 @@
  71. #include "World.h"
  72. #include "WorldPacket.h"
  73. #include "WorldSession.h"
  74. +#include "Config.h"
  75.  
  76. #define ZONE_UPDATE_INTERVAL (1*IN_MILLISECONDS)
  77.  
  78. @@ -1312,9 +1313,12 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
  79. {
  80. switch (timer)
  81. {
  82. - case FATIGUE_TIMER:
  83. - return MINUTE * IN_MILLISECONDS;
  84. - case BREATH_TIMER:
  85. + if(ConfigMgr::GetBoolDefault("fatigue.enabled", true)) // If "fatigue.en
  86. + {
  87. + case FATIGUE_TIMER:
  88. + return MINUTE * IN_MILLISECONDS;
  89. + }
  90. + case BREATH_TIMER:
  91. {
  92. if (!isAlive() || HasAuraType(SPELL_AURA_WATER_BREATHING) || GetSes
  93. return DISABLED_MIRROR_TIMER;
  94. @@ -1396,6 +1400,9 @@ void Player::HandleDrowning(uint32 time_diff)
  95. }
  96.  
  97. // In dark water
  98. + if(ConfigMgr::GetBoolDefault("fatigue.enabled", true)) // If "fatigue.en
  99. + {
  100. +
  101. if (m_MirrorTimerFlags & UNDERWARER_INDARKWATER)
  102. {
  103. // Fatigue timer not activated - activate it
  104. @@ -1432,7 +1439,7 @@ void Player::HandleDrowning(uint32 time_diff)
  105. else if (m_MirrorTimerFlagsLast & UNDERWARER_INDARKWATER)
  106. SendMirrorTimer(FATIGUE_TIMER, DarkWaterTime, m_MirrorTimer[FATIGUE
  107. }
  108. -
  109. + }
  110. if (m_MirrorTimerFlags & (UNDERWATER_INLAVA /*| UNDERWATER_INSLIME*/) && !(
  111. {
  112. // Breath timer not activated - activate it
  113. diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserv
  114. index bf19240..b81fcbd 100644
  115. --- a/src/server/worldserver/worldserver.conf.dist
  116. +++ b/src/server/worldserver/worldserver.conf.dist
  117. @@ -825,6 +825,13 @@ RecruitAFriend.MaxDifference = 4
  118. DisableWaterBreath = 4
  119.  
  120. #
  121. +# Enable or Disable "Fatigue" timer
  122. +# default = 1 (enabled)
  123. +# = 0 (disabled)
  124. +
  125. +fatigue.enabled = 1
  126. +
  127. +#
  128. # AllFlightPaths
  129. # Description: Character knows all flight paths (of both factions) after
  130. # Default: 0 - (Disabled)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement