mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[8478] Removed dependency on getMSTime() for last mana use.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
dffa5d43bd
commit
71e736abc6
5 changed files with 17 additions and 15 deletions
|
|
@ -140,7 +140,7 @@ Unit::Unit()
|
|||
m_baseSpellCritChance = 5;
|
||||
|
||||
m_CombatTimer = 0;
|
||||
m_lastManaUse = 0;
|
||||
m_lastManaUseTimer = 0;
|
||||
|
||||
//m_victimThreat = 0.0f;
|
||||
for (int i = 0; i < MAX_SPELL_SCHOOL; ++i)
|
||||
|
|
@ -192,6 +192,14 @@ void Unit::Update( uint32 p_time )
|
|||
m_Events.Update( p_time );
|
||||
_UpdateSpells( p_time );
|
||||
|
||||
if (m_lastManaUseTimer)
|
||||
{
|
||||
if (p_time >= m_lastManaUseTimer)
|
||||
m_lastManaUseTimer = 0;
|
||||
else
|
||||
m_lastManaUseTimer -= p_time;
|
||||
}
|
||||
|
||||
// really delete auras "deleted" while processing its ApplyModify code
|
||||
for(AuraList::const_iterator itr = m_deletedAuras.begin(); itr != m_deletedAuras.begin(); ++itr)
|
||||
delete *itr;
|
||||
|
|
@ -11803,11 +11811,6 @@ Aura* Unit::GetDummyAura( uint32 spell_id ) const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
bool Unit::IsUnderLastManaUseEffect() const
|
||||
{
|
||||
return getMSTimeDiff(m_lastManaUse,getMSTime()) < 5000;
|
||||
}
|
||||
|
||||
void Unit::SetContestedPvP(Player *attackedPlayer)
|
||||
{
|
||||
Player* player = GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue