Ejemplo n.º 1
0
        public void MoveTo(int pX, int pY, bool pOverride)
        {
            if (TeleportEnabled)
            {
                UnIdle();
                GetRoom().SendPacket(GetRoom().GetRoomItemHandler().UpdateUserOnRoller(this, new Point(pX, pY), 0, GetRoom().GetGameMap().SqAbsoluteHeight(GoalX, GoalY)));
                if (Statusses.ContainsKey("sit"))
                {
                    Z -= 0.35;
                }
                UpdateNeeded = true;
                return;
            }

            if ((GetRoom().GetGameMap().SquareHasUsers(pX, pY) && !pOverride) || Frozen)
            {
                return;
            }

            UnIdle();

            GoalX             = pX;
            GoalY             = pY;
            PathRecalcNeeded  = true;
            FreezeInteracting = false;
        }
Ejemplo n.º 2
0
 public void RemoveStatus(string Key)
 {
     if (HasStatus(Key))
     {
         Statusses.Remove(Key);
     }
 }
Ejemplo n.º 3
0
 public void Dispose()
 {
     Statusses.Clear();
     Path.Clear();
     NextTile    = null;
     Position    = null;
     TargetPoint = null;
 }
Ejemplo n.º 4
0
 public void SetStatus(string Key, string Value = "")
 {
     if (Statusses.ContainsKey(Key))
     {
         Statusses[Key] = Value;
     }
     else
     {
         Statusses.Add(Key, Value);
     }
 }
Ejemplo n.º 5
0
 public void ClearMovement(bool Update)
 {
     IsWalking = false;
     Statusses.Remove("mv");
     GoalX   = 0;
     GoalY   = 0;
     SetStep = false;
     SetX    = 0;
     SetY    = 0;
     SetZ    = 0;
     if (Update)
     {
         UpdateNeeded = true;
     }
 }
Ejemplo n.º 6
0
        public void SetRot(int Rotation, bool HeadOnly)
        {
            if (Statusses.ContainsKey("lay") || IsWalking)
            {
                return;
            }

            int diff = RotBody - Rotation;

            RotHead = RotBody;

            if (Statusses.ContainsKey("sit") || HeadOnly)
            {
                if (RotBody == 2 || RotBody == 4)
                {
                    if (diff > 0)
                    {
                        RotHead = RotBody - 1;
                    }
                    else if (diff < 0)
                    {
                        RotHead = RotBody + 1;
                    }
                }
                else if (RotBody == 0 || RotBody == 6)
                {
                    if (diff > 0)
                    {
                        RotHead = RotBody - 1;
                    }
                    else if (diff < 0)
                    {
                        RotHead = RotBody + 1;
                    }
                }
            }
            else if (diff <= -2 || diff >= 2)
            {
                RotHead = Rotation;
                RotBody = Rotation;
            }
            else
            {
                RotHead = Rotation;
            }

            UpdateNeeded = true;
        }
Ejemplo n.º 7
0
 public void Dispose()
 {
     Statusses.Clear();
     mRoom   = null;
     mClient = null;
 }
Ejemplo n.º 8
0
 public bool HasStatus(string Key) => Statusses.ContainsKey(Key);
Ejemplo n.º 9
0
 public bool HasStatus(string Key)
 {
     return(Statusses.ContainsKey(Key));
 }