Core/Spells: SpellHistory updates

Port From (https://github.com/TrinityCore/TrinityCore/commit/8cc6520b89583d4bf6549b28fa5b7390fc2b0b9d)
This commit is contained in:
hondacrx
2021-11-23 14:36:54 -05:00
parent 751f4dd8b2
commit b3a92137d3
8 changed files with 167 additions and 124 deletions
+2 -2
View File
@@ -1578,7 +1578,7 @@ namespace Game.Entities
{
m_weaponChangeTimer = spellProto.StartRecoveryTime;
GetSpellHistory().AddGlobalCooldown(spellProto, m_weaponChangeTimer);
GetSpellHistory().AddGlobalCooldown(spellProto, TimeSpan.FromMilliseconds(m_weaponChangeTimer));
SpellCooldownPkt spellCooldown = new();
spellCooldown.Caster = GetGUID();
@@ -3912,7 +3912,7 @@ namespace Game.Entities
continue;
// Don't replace longer cooldowns by equip cooldown if we have any.
if (GetSpellHistory().GetRemainingCooldown(effectSpellInfo) > 30 * Time.InMilliseconds)
if (GetSpellHistory().GetRemainingCooldown(effectSpellInfo) > TimeSpan.FromSeconds(30))
continue;
GetSpellHistory().AddCooldown((uint)effectData.SpellID, pItem.GetEntry(), TimeSpan.FromSeconds(30));
+1 -1
View File
@@ -6388,7 +6388,7 @@ namespace Game.Entities
BroadcastTextRecord bct = CliDB.BroadcastTextStorage.LookupByKey(textId);
if (bct == null)
{
Log.outError(LogFilter.Unit, "WorldObject.MonsterWhisper: `broadcast_text` was not {0} found", textId);
Log.outError(LogFilter.Unit, "WorldObject.Whisper: `broadcast_text` was not {0} found", textId);
return;
}