aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-24 09:46:45 -0600
committermegamage <none@none>2009-03-24 09:46:45 -0600
commit208398017a3b83e37e6d657c0444622d70f617d3 (patch)
treef05b27eca18cad20c61efcde5e6af4d53b33ca14 /src/game/Player.cpp
parentcd66e85ed191defdde64164829e443e2c008139b (diff)
[7529] Hide some implementation details for fall damage calculation and breath timers. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index a4b9ceabb60..b688c48fc52 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -468,6 +468,9 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this)
m_farsightVision = false;
m_runes = NULL;
+
+ m_lastFallTime = 0;
+ m_lastFallZ = 0;
}
Player::~Player ()
@@ -20948,3 +20951,9 @@ void Player::UpdateKnownCurrencies(uint32 itemId, bool apply)
RemoveFlag64(PLAYER_FIELD_KNOWN_CURRENCIES,(1LL << (ctEntry->BitIndex-1)));
}
}
+
+void Player::UpdateFallInformationIfNeed( MovementInfo const& minfo,uint16 opcode )
+{
+ if (m_lastFallTime >= minfo.fallTime || m_lastFallZ <=minfo.z || opcode == MSG_MOVE_FALL_LAND)
+ SetFallInformation(minfo.fallTime, minfo.z);
+}