Example #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;
        }
Example #2
0
 public void SetStatus(string Key, string Value = "")
 {
     if (Statusses.ContainsKey(Key))
     {
         Statusses[Key] = Value;
     }
     else
     {
         Statusses.Add(Key, Value);
     }
 }
Example #3
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;
        }
Example #4
0
 public bool HasStatus(string Key) => Statusses.ContainsKey(Key);
Example #5
0
 public bool HasStatus(string Key)
 {
     return(Statusses.ContainsKey(Key));
 }