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);
|
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)
|
public override void UpdateObjectVisibility(bool forced = true)
|
||||||
{
|
{
|
||||||
if (!forced)
|
if (!forced)
|
||||||
|
|||||||
@@ -334,6 +334,13 @@ namespace Game.Networking.Packets
|
|||||||
public int EmoteID;
|
public int EmoteID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ClearBossEmotes : ServerPacket
|
||||||
|
{
|
||||||
|
public ClearBossEmotes() : base(ServerOpcodes.ClearBossEmotes) { }
|
||||||
|
|
||||||
|
public override void Write() { }
|
||||||
|
}
|
||||||
|
|
||||||
public class PrintNotification : ServerPacket
|
public class PrintNotification : ServerPacket
|
||||||
{
|
{
|
||||||
public PrintNotification(string notifyText) : base(ServerOpcodes.PrintNotification)
|
public PrintNotification(string notifyText) : base(ServerOpcodes.PrintNotification)
|
||||||
|
|||||||
Reference in New Issue
Block a user