From ff93dc41efd7b78f24787e60ed172d0de73aba72 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sat, 26 Aug 2017 12:33:37 -0400 Subject: [PATCH] Added casting bar functions. --- .../actors/chara/player/Player.cs | 19 +++++++++++++++++++ .../actors/chara/player/PlayerWork.cs | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index c940fbe6..4018cbed 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -1447,6 +1447,25 @@ namespace FFXIVClassic_Map_Server.Actors QueuePackets(propPacketUtil.Done()); } + public void SendStartCastbar(uint commandId, uint endTime) + { + playerWork.castCommandClient = commandId; + playerWork.castEndClient = endTime; + ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("playerWork/castState", this); + propPacketUtil.AddProperty("playerWork.castEndClient"); + propPacketUtil.AddProperty("playerWork.castCommandClient"); + QueuePackets(propPacketUtil.Done()); + } + + public void SendEndCastbar() + { + playerWork.castCommandClient = 0; + playerWork.castEndClient = 0; + ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("playerWork/castState", this); + propPacketUtil.AddProperty("playerWork.castCommandClient"); + QueuePackets(propPacketUtil.Done()); + } + public void SetLoginDirector(Director director) { if (ownedDirectors.Contains(director)) diff --git a/FFXIVClassic Map Server/actors/chara/player/PlayerWork.cs b/FFXIVClassic Map Server/actors/chara/player/PlayerWork.cs index b0b358cd..a4206abf 100644 --- a/FFXIVClassic Map Server/actors/chara/player/PlayerWork.cs +++ b/FFXIVClassic Map Server/actors/chara/player/PlayerWork.cs @@ -18,8 +18,8 @@ public bool isContentsCommand; - public int castCommandClient; - public int castEndClient; + public uint castCommandClient; + public uint castEndClient; public int[] comboNextCommandId = new int[2]; public float comboCostBonusRate;