Пример #1
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);
        }
Пример #2
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);
        }
Пример #3
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);
        }
Пример #4
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;
 }
Пример #5
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);
        }
Пример #6
0
        public void SendSpeech(string message, string name, ObjectId itemId, ModelId itemModel, SpeechType type, Color color)
        {
            SendSpeechPacket packet = new SendSpeechPacket
            {
                Id      = itemId,
                Model   = itemModel,
                Type    = type,
                Color   = color,
                Font    = 0x0003,
                Name    = string.IsNullOrEmpty(name) ? "<null>" : name,
                Message = string.IsNullOrEmpty(message) ? "<null>" : message,
            };

            packet.Serialize();

            Send(packet.RawPacket);
        }
Пример #7
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);
        }
Пример #8
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);
        }
Пример #9
0
        public void ObjectInfo(ObjectId id, ModelId type, Location3D location, Color?color)
        {
            ObjectInfoPacket packet = new ObjectInfoPacket(id, type, location, color);

            Send(packet.RawPacket);
        }
Пример #10
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);
        }
Пример #11
0
        public void TargetLocation(CursorId cursorId, Location3D location, ModelId tileType, CursorType cursorType)
        {
            TargetLocationRequest targetRequest = new TargetLocationRequest(cursorId, location, tileType, cursorType);

            Send(targetRequest.RawPacket);
        }
Пример #12
0
        public void DialogBoxResponse(uint dialogId, ushort menuId, byte responseIndex, ModelId responseType,
                                      Color responseColor)
        {
            var packet = new ResponseToDialogBoxRequest(dialogId, menuId, responseIndex, responseType, responseColor);

            Send(packet.RawPacket);
        }
Пример #13
0
 public Mobile(ObjectId id, ModelId type, Location3D location) : base(id, type, location)
 {
 }