Example #1
0
 public SCOverHeadMarkerSetPacket(uint teamId, OverHeadMark index, bool isObjId, uint id) : base(SCOffsets.SCOverHeadMarkerSetPacket, 1)
 {
     _teamId  = teamId;
     _index   = index;
     _isObjId = isObjId;
     _id      = id;
 }
Example #2
0
        public void SetOverHeadMarker(Character unit, uint teamId, OverHeadMark index, byte type, uint targetId)
        {
            var activeTeam = GetActiveTeam(teamId);

            if (activeTeam == null || activeTeam.OwnerId != unit.Id && !activeTeam.IsParty)
            {
                return;
            }

            if (Enum.IsDefined(typeof(OverHeadMark), index) && index != OverHeadMark.ResetAll && type <= 2)
            {
                activeTeam.MarksList[(int)index].Item1 = type;
                activeTeam.MarksList[(int)index].Item2 = type != 0 ? targetId : 0u;
            }
            else
            {
                activeTeam.ResetMarks();
                index    = OverHeadMark.ResetAll;
                type     = 100;
                targetId = 0;
            }

            activeTeam.BroadcastPacket(new SCOverHeadMarkerSetPacket(teamId, index, type == 2, targetId));
        }