mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Core/Spells: corrected haste rune cooldown reduction behaivior
* the haste regeneration modifier will now act multiplicative on the base regeneration rate rather than modifying it directly * renamed some functions for clarification
This commit is contained in:
@@ -4194,7 +4194,7 @@ void Spell::SendSpellStart()
|
||||
for (uint8 i = 0; i < MAX_RUNES; ++i)
|
||||
{
|
||||
// float casts ensure the division is performed on floats as we need float result
|
||||
float baseCd = float(player->GetRuneBaseCooldown(i));
|
||||
float baseCd = float(uint32(RUNE_BASE_COOLDOWN));
|
||||
data << uint8((baseCd - float(player->GetRuneCooldown(i))) / baseCd * 255); // rune cooldown passed
|
||||
}
|
||||
}
|
||||
@@ -4320,7 +4320,7 @@ void Spell::SendSpellGo()
|
||||
for (uint8 i = 0; i < MAX_RUNES; ++i)
|
||||
{
|
||||
// float casts ensure the division is performed on floats as we need float result
|
||||
float baseCd = float(player->GetRuneBaseCooldown(i));
|
||||
float baseCd = float(uint32(RUNE_BASE_COOLDOWN));
|
||||
data << uint8((baseCd - float(player->GetRuneCooldown(i))) / baseCd * 255); // rune cooldown passed
|
||||
}
|
||||
}
|
||||
@@ -5048,7 +5048,7 @@ void Spell::TakeRunePower(SpellMissInfo hitInfo)
|
||||
RuneType rune = player->GetCurrentRune(i);
|
||||
if (!player->GetRuneCooldown(i) && runeCost[rune] > 0)
|
||||
{
|
||||
player->SetRuneCooldown(i, consumeRunes ? player->GetRuneBaseCooldown(i) : uint32(RUNE_MISS_COOLDOWN));
|
||||
player->SetRuneCooldown(i, consumeRunes ? uint32(RUNE_BASE_COOLDOWN) : uint32(RUNE_MISS_COOLDOWN));
|
||||
player->SetLastUsedRune(rune);
|
||||
player->SetLastUsedRuneIndex(i);
|
||||
runeCost[rune]--;
|
||||
@@ -5065,7 +5065,7 @@ void Spell::TakeRunePower(SpellMissInfo hitInfo)
|
||||
RuneType rune = player->GetCurrentRune(i);
|
||||
if (!player->GetRuneCooldown(i) && rune == RUNE_DEATH)
|
||||
{
|
||||
player->SetRuneCooldown(i, consumeRunes ? player->GetRuneBaseCooldown(i) : uint32(RUNE_MISS_COOLDOWN));
|
||||
player->SetRuneCooldown(i, consumeRunes ? uint32(RUNE_BASE_COOLDOWN) : uint32(RUNE_MISS_COOLDOWN));
|
||||
player->SetLastUsedRune(rune);
|
||||
player->SetLastUsedRuneIndex(i);
|
||||
runeCost[rune]--;
|
||||
|
||||
Reference in New Issue
Block a user