Core/Units: Added helper function to clear boss emote frame and enable SMSG_CLEAR_BOSS_EMOTES
Port From (https://github.com/TrinityCore/TrinityCore/commit/deb24f3f53540733bef15f0a90a1b7e41e76d60e)
This commit is contained in:
@@ -437,6 +437,26 @@ namespace Game.Entities
|
||||
target.SendPacket(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears boss emotes frame
|
||||
/// </summary>
|
||||
/// <param name="zoneId">Only clears emotes for players in that zone id</param>
|
||||
/// <param name="target">Only clears emotes for that player</param>
|
||||
public void ClearBossEmotes(uint? zoneId, Player target)
|
||||
{
|
||||
ClearBossEmotes clearBossEmotes = new();
|
||||
|
||||
if (target != null)
|
||||
{
|
||||
target.SendPacket(clearBossEmotes);
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var player in GetMap().GetPlayers())
|
||||
if (!zoneId.HasValue || Global.DB2Mgr.IsInArea(player.GetAreaId(), zoneId.Value))
|
||||
player.SendPacket(clearBossEmotes);
|
||||
}
|
||||
|
||||
public override void UpdateObjectVisibility(bool forced = true)
|
||||
{
|
||||
if (!forced)
|
||||
|
||||
Reference in New Issue
Block a user