Exemplo n.º 1
0
        public void CancelTarget(CursorId lastCursorId, ObjectId itemId, Location3D location, ModelId type)
        {
            TargetLocationRequest cancelRequest = new TargetLocationRequest(lastCursorId, itemId, CursorType.Cancel, location,
                                                                            type);

            Send(cancelRequest.RawPacket);
        }
Exemplo n.º 2
0
        public void DrawGamePlayer(ObjectId playerId, ModelId bodyType, Location3D location, Direction direction, MovementType movementType, Color color)
        {
            var drawGamePlayerPacket = new DrawGamePlayerPacket(playerId, bodyType,
                                                                location, direction, movementType, color);

            Send(drawGamePlayerPacket.RawPacket);
        }
Exemplo n.º 3
0
        public void PlayGraphicalEffect(EffectDirectionType directionType, ObjectId characterId, ModelId type,
                                        Location3D location, byte animationSpeed, byte duration, bool adjustDirection, bool explodeOnImpact)
        {
            GraphicalEffectPacket packet = new GraphicalEffectPacket(characterId, 0, type, location, location,
                                                                     animationSpeed, directionType, duration, adjustDirection, explodeOnImpact);

            Send(packet.RawPacket);
        }
Exemplo n.º 4
0
        public ushort GetDistance(Location3D secondLocation)
        {
            var vector = this - secondLocation;

            var distance = Math.Sqrt(Math.Pow(vector.X, 2) + Math.Pow(vector.Y, 2) + Math.Pow(vector.Z, 2));

            return((ushort)distance);
        }
Exemplo n.º 5
0
        public Item CreatePhantom(ObjectId id, ModelId modelId, Location3D location, Color?color)
        {
            Item item = new Item(id, modelId, 1, location, color, null, null);

            ObjectInfo(id, modelId, location, color);

            return(item);
        }
Exemplo n.º 6
0
 public Mobile(ObjectId id, ModelId type, Location3D location, Color?color,
               Direction?orientation, MovementType?currentMovementType, Notoriety?notoriety, byte flags = 0)
     : base(id, type, location)
 {
     Color               = color;
     Orientation         = orientation;
     CurrentMovementType = currentMovementType;
     Notoriety           = notoriety;
     this.Flags          = flags;
 }
Exemplo n.º 7
0
        public GameObject UpdateLocation(Location3D location, Direction direction, MovementType movementType)
        {
            var updatedMobile = (Mobile)Duplicate();

            updatedMobile.Location            = location;
            updatedMobile.Orientation         = direction;
            updatedMobile.CurrentMovementType = movementType;

            return(updatedMobile);
        }
Exemplo n.º 8
0
        public Mobile Update(ModelId type, Location3D location, Color color, Direction?orientation, MovementType?currentMovementType, Notoriety?notoriety, byte flags)
        {
            var updatedMobile = (Mobile)Duplicate();

            updatedMobile.Location            = location;
            updatedMobile.Type                = type;
            updatedMobile.Color               = color;
            updatedMobile.Orientation         = orientation;
            updatedMobile.CurrentMovementType = currentMovementType;
            updatedMobile.Notoriety           = notoriety;
            updatedMobile.Flags               = flags;

            return(updatedMobile);
        }
Exemplo n.º 9
0
        public void RejectMove(Location3D location, Direction direction)
        {
            var packet = new CharMoveRejectionPacket(0, location, direction);

            Send(packet.RawPacket);
        }
Exemplo n.º 10
0
        public void ObjectInfo(ObjectId id, ModelId type, Location3D location, Color?color)
        {
            ObjectInfoPacket packet = new ObjectInfoPacket(id, type, location, color);

            Send(packet.RawPacket);
        }
Exemplo n.º 11
0
        public void TargetLocation(CursorId cursorId, Location3D location, ModelId tileType, CursorType cursorType)
        {
            TargetLocationRequest targetRequest = new TargetLocationRequest(cursorId, location, tileType, cursorType);

            Send(targetRequest.RawPacket);
        }
Exemplo n.º 12
0
        public void DropItem(ObjectId itemId, Location3D location)
        {
            var dropPacket = new DropItemRequest(itemId, location);

            Send(dropPacket.RawPacket);
        }
Exemplo n.º 13
0
        public void DropItem(ObjectId itemId, Location3D location)
        {
            var dropPacket = packetRegistry.Instantiate <DropItemRequest>();

            Send(dropPacket.Serialize(itemId, location));
        }
Exemplo n.º 14
0
 public Mobile(ObjectId id, ModelId type, Location3D location) : base(id, type, location)
 {
 }
Exemplo n.º 15
0
        public void TargetItem(CursorId cursorId, ObjectId itemId, CursorType cursorType, Location3D location,
                               ModelId type)
        {
            var targetRequest = new TargetLocationRequest(cursorId, itemId, CursorType.Harmful, location,
                                                          type);

            Send(targetRequest.RawPacket);
        }
Exemplo n.º 16
0
        public void UpdatePlayer(ObjectId playerId, ModelId bodyType, Location3D location, Direction direction, Color color)
        {
            var packet = new UpdatePlayerPacket(playerId, bodyType, location, direction, color);

            Send(packet.RawPacket);
        }
Exemplo n.º 17
0
 public bool Equals(Location3D other) => X == other.X && Y == other.Y && Z == other.Z;