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