using System.Collections.Generic; using Mango.Players; using Mango.Rooms.Mapping; using Mango.Rooms.Avatar; using Mango.Rooms.Mapping.PathFinding; namespace Mango.Rooms { /// /// RoomAvatarData holds all the information required for an Avatar. /// class RoomAvatarData { /// /// If this Avatar is a Player, we need direct access to the Player class so we reference it here. /// protected Player _player = null; /// /// The Avatar type, are we a Player, Pet or Bot? Default is Player. /// protected RoomAvatarType _type = RoomAvatarType.Player; /// /// The current 3D position of the Avatar. /// protected Vector3D _position = new Vector3D(0, 0, 0); /// /// Head Rotation with a default of 0. /// protected int _headRotation = 0; /// /// Body Rotation with a default of 0. /// protected int _bodyRotation = 0; /// /// The statusses the Avatar currently has (sit, lay etc). /// protected Dictionary _statusses = new Dictionary(); /// /// The path this Avatar is currently walking. /// protected List _path = new List(); /// /// The path the Avatar wants to change to (null if none). /// protected List _pathToSet = null; /// /// The position the Avatar is requesting to move to. /// protected Vector2D _positionToSet = null; /// /// The target the Avatar is attempting to get to. /// protected Vector2D _target = null; /// /// Requests the Avatar to be updated (Effect Statusses, Walking etc). /// protected bool _updateNeeded = false; /// /// Item ID to move to and interact with. /// protected int _moveToAndInteract = 0; /// /// Data. /// protected int _moveToAndInteractData = 0; /// /// Can the user skip squares and walk fast. /// protected bool _fastWalking = false; /// /// Is this Avatar taking the teleporter? /// protected bool _isTeleporting = false; /// /// The teleporter id we are targeting. /// protected int _teleporterTargetId = 0; /// /// Current dance ID that this Avatar has. /// protected int _danceId = 0; /// /// The Item ID the Avatar is currently holding. /// protected int _carryItemId = 0; /// /// The timer for the current item this Avatar is holding. /// protected int _carryItemTimer = 0; /// /// The Effect ID this Avatar currently has. /// protected int _effectId = 0; /// /// Does this Avatar hold an effect by Item (water etc). /// protected bool _effectByItem = false; /// /// Effect ID set by the user using enable or costume etc. /// protected int _userSetEffectId = 0; /// /// Is this Avatar leaving the room. /// protected bool _leavingRoom = false; /// /// Is the Avatar forced leaving. /// protected bool _forcedLeave = false; /// /// Counts how many steps taken when leaving the room. /// protected int _leaveStepsTaken = 0; /// /// Ignores all furni redirections or restrictions. /// protected bool _overriding = false; /// /// Is this Avatars walking disabled. /// protected bool _walkingDisabled = false; /// /// How long this Avatar has been idle for. /// protected int _idleTime = 0; /// /// Is this Avatar sleeping. /// protected bool _sleeping = false; /// /// Prevents chat spam. /// protected int _chatMessagesSent = 0; /// /// Prevents chat spam. /// protected int _chatSpamTicks = 0; /// /// Sit /// protected bool _forceSit = false; /// /// Signs /// protected int _applySignId = 0; /// /// Signs /// protected int _signApplyTicks = 0; public RoomAvatarData() { } /// /// Resets all the values back to there defaults. /// public void ResetToDefaults() { this._position.X = 0; this._position.Y = 0; this._position.Z = 0; this._headRotation = 0; this._bodyRotation = 0; this._statusses.Clear(); this._path.Clear(); this._pathToSet = null; this._positionToSet = null; this._target = null; this._updateNeeded = false; this._moveToAndInteract = 0; this._moveToAndInteractData = 0; this._fastWalking = false; this._isTeleporting = false; this._teleporterTargetId = 0; this._danceId = 0; this._carryItemId = 0; this._carryItemTimer = 0; this._effectId = 0; this._effectByItem = false; this._leavingRoom = false; this._forcedLeave = false; this._leaveStepsTaken = 0; this._overriding = false; this._walkingDisabled = false; this._idleTime = 0; this._sleeping = false; this._forceSit = false; this._applySignId = 0; this._signApplyTicks = 0; //this._chatMessagesSent = 0; //this._chatSpamTicks = 0; } } }