Core/Players/DK: Implement Rune Grace Period mechanic
Closes #11736 Fixes #6122
This commit is contained in:
1 parent
84efd8b92b
commit
ec59c3ab03
4 files changed
+69
-8
No files matched your search
@@ -7604,7 +7604,7 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
|
||||
player->GetBaseRune(i) != RUNE_BLOOD)
|
||||
continue;
|
||||
}
|
||||
if (player->GetRuneCooldown(i) != player->GetRuneBaseCooldown(i))
|
||||
if (player->GetRuneCooldown(i) != (player->GetRuneBaseCooldown(i) - player->GetLastRuneGraceTimer(i)))
|
||||
continue;
|
||||
|
||||
--runesLeft;
|
||||
@@ -11760,6 +11760,16 @@ void Unit::ClearInCombat()
|
||||
m_CombatTimer = 0;
|
||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
|
||||
|
||||
// Reset rune flags after combat
|
||||
if (GetTypeId() == TYPEID_PLAYER && getClass() == CLASS_DEATH_KNIGHT)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_RUNES; ++i)
|
||||
{
|
||||
ToPlayer()->SetRuneTimer(i, 0xFFFFFFFF);
|
||||
ToPlayer()->SetLastRuneGraceTimer(i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Player's state will be cleared in Player::UpdateContestedPvP
|
||||
if (Creature* creature = ToCreature())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user