Core/Auras: implemented PROC_FLAG_HEARTBEAT and moved food/drink emote mechanic into heartbeat handling

Port From (https://github.com/TrinityCore/TrinityCore/commit/d60b4e5b199d56477010941fc1d3aff9eb7064a2)
This commit is contained in:
Hondacrx
2024-08-19 12:14:22 -04:00
parent 5f616b95f5
commit bf0c457273
5 changed files with 37 additions and 29 deletions
+11
View File
@@ -2561,6 +2561,17 @@ namespace Game.Entities
// SMSG_FLIGHT_SPLINE_SYNC for cyclic splines
SendFlightSplineSyncUpdate();
// Trigger heartbeat procs and generic aura behavior such as food emotes
TriggerAuraHeartbeat();
}
void TriggerAuraHeartbeat()
{
foreach (var (_, auraApplication) in m_appliedAuras)
auraApplication.GetBase().Heartbeat();
Unit.ProcSkillsAndAuras(this, null, new ProcFlagsInit(ProcFlags.Heartbeat), new ProcFlagsInit(ProcFlags.None), ProcFlagsSpellType.MaskAll, ProcFlagsSpellPhase.None, ProcFlagsHit.None, null, null, null);
}
public bool HaveOffhandWeapon()