С мертвой цели комбо поинты должны удаляться через 10 секунд, а не сразу, проверено на офе.
Код:
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 9bdcc79..1d8f379 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1403,8 +1403,6 @@ void Player::SetDeathState(DeathState s)
{
// drunken state is cleared on death
SetDrunkValue(0);
- // lost combo points at any target (targeted combo points clear in Unit::SetDeathState)
- ClearComboPoints();
clearResurrectRequestData();
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 888d4a6..9bb08e1 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -213,6 +213,8 @@ Unit::Unit() :
m_castCounter = 0;
+ m_ClearComboPointsExpiredTime = 0;
+
// m_Aura = NULL;
// m_AurasCheck = 2000;
// m_removeAuraTimer = 4;
@@ -363,6 +365,14 @@ void Unit::Update(uint32 update_diff, uint32 p_time)
m_vehicleInfo->Update(update_diff);
}
+ if (m_ClearComboPointsExpiredTime)
+ {
+ if (update_diff >= m_ClearComboPointsExpiredTime)
+ ClearComboPointHolders();
+ else
+ m_ClearComboPointsExpiredTime -= update_diff;
+ }
+
// update abilities available only for fraction of time
UpdateReactives(update_diff);
@@ -8584,7 +8594,8 @@ void Unit::SetDeathState(DeathState s)
{
CombatStop();
DeleteThreatList();
- ClearComboPointHolders(); // any combo points pointed to unit lost at it death
+
+ m_ClearComboPointsExpiredTime = 10000;
if (IsNonMeleeSpellCasted(false))
InterruptNonMeleeSpells(false);
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 2d3305c..31bebec 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -1987,6 +1987,8 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
uint32 m_state; // Even derived shouldn't modify
uint32 m_CombatTimer;
+ uint32 m_ClearComboPointsExpiredTime;
+
Spell* m_currentSpells[CURRENT_MAX_SPELL];
uint32 m_castCounter; // count casts chain of triggered spells for prevent infinity cast crashes