Skip to content

Commit

Permalink
[9060] Fixed leave combat by timer.
Browse files Browse the repository at this point in the history
This also fix some problems with stealth detection.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
laise authored and VladimirMangos committed Dec 25, 2009
1 parent cadabfa commit 14ed8c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/game/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,17 @@ void Unit::Update( uint32 p_time )
// Check UNIT_STAT_MELEE_ATTACKING or UNIT_STAT_CHASE (without UNIT_STAT_FOLLOW in this case) so pets can reach far away
// targets without stopping half way there and running off.
// These flags are reset after target dies or another command is given.
if( m_HostileRefManager.isEmpty() )
if (m_HostileRefManager.isEmpty())
{
// m_CombatTimer set at aura start and it will be freeze until aura removing
if ( m_CombatTimer <= p_time )
ClearInCombat();
if (m_CombatTimer <= p_time)
CombatStop();
else
m_CombatTimer -= p_time;
}
}

if(uint32 base_att = getAttackTimer(BASE_ATTACK))
if (uint32 base_att = getAttackTimer(BASE_ATTACK))
{
setAttackTimer(BASE_ATTACK, (p_time >= base_att ? 0 : base_att - p_time) );
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9059"
#define REVISION_NR "9060"
#endif // __REVISION_NR_H__

0 comments on commit 14ed8c0

Please sign in to comment.