コード例 #1
0
ファイル: ProjectilePacket.cs プロジェクト: xSlayper/sharpot
 public static void Add(NetworkMessage message, Location fromLocation, Location toLocation, ProjectileType projectile)
 {
     message.AddByte((byte)ServerPacketType.Projectile);
     message.AddLocation(fromLocation);
     message.AddLocation(toLocation);
     message.AddByte((byte)projectile);
 }
コード例 #2
0
 public static void Add(NetworkMessage message, Location fromLocation, Location toLocation, ProjectileType projectile)
 {
     message.AddByte((byte)ServerPacketType.Projectile);
     message.AddLocation(fromLocation);
     message.AddLocation(toLocation);
     message.AddByte((byte)projectile);
 }
コード例 #3
0
        public static void Add(
            NetworkMessage message,
            Location fromLocation,
            byte fromStackPosition,
            Location toLocation
            )
        {
            message.AddByte((byte)ServerPacketType.CreatureMove);

            message.AddLocation(fromLocation);
            message.AddByte(fromStackPosition);
            message.AddLocation(toLocation);
        }
コード例 #4
0
        public static void Add
        (
            NetworkMessage message,
            Location fromLocation,
            byte fromStackPosition,
            Location toLocation
        )
        {
            message.AddByte((byte)ServerPacketType.CreatureMove);

            message.AddLocation(fromLocation);
            message.AddByte(fromStackPosition);
            message.AddLocation(toLocation);
        }
コード例 #5
0
 public static void Add(NetworkMessage message, Location location, TextColor color, string text)
 {
     message.AddByte((byte)ServerPacketType.AnimatedText);
     message.AddLocation(location);
     message.AddByte((byte)color);
     message.AddString(text);
 }
コード例 #6
0
 public static void Add(NetworkMessage message, Location location, TextColor color, string text)
 {
     message.AddByte((byte)ServerPacketType.AnimatedText);
     message.AddLocation(location);
     message.AddByte((byte)color);
     message.AddString(text);
 }
コード例 #7
0
 public static void Add(NetworkMessage message, Location fromLocation, byte fromStackPosition)
 {
     if (fromStackPosition < 10)
     {
         message.AddByte((byte)ServerPacketType.TileRemoveThing);
         message.AddLocation(fromLocation);
         message.AddByte(fromStackPosition);
     }
 }
コード例 #8
0
 public static void Add(NetworkMessage message, Location fromLocation, byte fromStackPosition)
 {
     if (fromStackPosition < 10)
     {
         message.AddByte((byte)ServerPacketType.TileRemoveThing);
         message.AddLocation(fromLocation);
         message.AddByte(fromStackPosition);
     }
 }
コード例 #9
0
        public static void Add(
            Connection connection,
            NetworkMessage message,
            Tile tile
            )
        {
            message.AddByte((byte)ServerPacketType.TileUpdate);

            message.AddLocation(tile.Location);
            MapPacket.AddTileDescription(connection, message, tile);
        }
コード例 #10
0
ファイル: TileUpdatePacket.cs プロジェクト: xSlayper/sharpot
        public static void Add
        (
            Connection connection,
            NetworkMessage message,
            Tile tile
        )
        {
            message.AddByte((byte)ServerPacketType.TileUpdate);

            message.AddLocation(tile.Location);
            MapPacket.AddTileDescription(connection, message, tile);
        }
コード例 #11
0
        public static void Add(
            NetworkMessage message,
            Location location,
            byte stackPosition,
            Item item
            )
        {
            message.AddByte((byte)ServerPacketType.TileAddThing);

            message.AddLocation(location);
            message.AddByte(stackPosition);
            message.AddItem(item);
        }
コード例 #12
0
        public static void Add(
            NetworkMessage message,
            Creature creature
            )
        {
            message.AddByte((byte)ServerPacketType.TileTransformThing);

            message.AddLocation(creature.Tile.Location);
            message.AddByte(creature.Tile.GetStackPosition(creature));
            message.AddUInt16(0x63);
            message.AddUInt32(creature.Id);
            message.AddByte((byte)creature.Direction);
        }
コード例 #13
0
ファイル: TileAddItemPacket.cs プロジェクト: xSlayper/sharpot
        public static void Add
        (
            NetworkMessage message,
            Location location,
            byte stackPosition,
            Item item
        )
        {
            message.AddByte((byte)ServerPacketType.TileAddThing);

            message.AddLocation(location);
            message.AddByte(stackPosition);
            message.AddItem(item);
        }
コード例 #14
0
        public static void Add
        (
            NetworkMessage message,
            Creature creature
        )
        {
            message.AddByte((byte)ServerPacketType.TileTransformThing);

            message.AddLocation(creature.Tile.Location);
            message.AddByte(creature.Tile.GetStackPosition(creature));
            message.AddUInt16(0x63);
            message.AddUInt32(creature.Id);
            message.AddByte((byte)creature.Direction);
        }
コード例 #15
0
 public static void Add(Connection connection, NetworkMessage message, Location playerLocation)
 {
     message.AddByte((byte)ServerPacketType.MapDescription);
     message.AddLocation(playerLocation);
     AddMapDescription(
         connection,
         message,
         playerLocation.X - 8,
         playerLocation.Y - 6,
         playerLocation.Z,
         18,
         14
         );
 }
コード例 #16
0
        public static void Add(
            NetworkMessage message,
            Location location,
            byte stackPosition,
            Creature creature,
            bool known,
            uint removeKnown
            )
        {
            message.AddByte((byte)ServerPacketType.TileAddThing);

            message.AddLocation(location);
            message.AddByte(stackPosition);
            message.AddCreature(creature, known, removeKnown);
        }
コード例 #17
0
        public static void Add
        (
            NetworkMessage message,
            string senderName,
            ushort senderLevel,
            SpeechType speechType,
            string text,
            Location location,
            ChatChannel channelId,
            uint time
        )
        {
            message.AddByte((byte)ServerPacketType.CreatureSpeech);

            message.AddUInt32(0x00000000);
            message.AddString(senderName);
            message.AddUInt16(senderLevel);
            message.AddByte((byte)speechType);

            switch (speechType)
            {
            case SpeechType.Say:
            case SpeechType.Whisper:
            case SpeechType.Yell:
            case SpeechType.MonsterSay:
            case SpeechType.MonsterYell:
            case SpeechType.PrivateNPCToPlayer:
                message.AddLocation(location);
                break;

            case SpeechType.ChannelRed:
            case SpeechType.ChannelRedAnonymous:
            case SpeechType.ChannelOrange:
            case SpeechType.ChannelYellow:
            case SpeechType.ChannelWhite:
                message.AddUInt16((ushort)channelId);
                break;

            case SpeechType.RuleViolationReport:
                message.AddUInt32(time);
                break;

            default:
                break;
            }

            message.AddString(text);
        }
コード例 #18
0
        public static void Add
        (
            NetworkMessage message,
            Location location,
            byte stackPosition,
            Creature creature,
            bool known,
            uint removeKnown
        )
        {
            message.AddByte((byte)ServerPacketType.TileAddThing);

            message.AddLocation(location);
            message.AddByte(stackPosition);
            message.AddCreature(creature, known, removeKnown);
        }
コード例 #19
0
        public static void Add(
            NetworkMessage message,
            string senderName,
            ushort senderLevel,
            SpeechType speechType,
            string text,
            Location location,
            ChatChannel channelId,
            uint time
            )
        {
            message.AddByte((byte)ServerPacketType.CreatureSpeech);

            message.AddUInt32(0x00000000);
            message.AddString(senderName);
            message.AddUInt16(senderLevel);
            message.AddByte((byte)speechType);

            switch (speechType)
            {
                case SpeechType.Say:
                case SpeechType.Whisper:
                case SpeechType.Yell:
                case SpeechType.MonsterSay:
                case SpeechType.MonsterYell:
                case SpeechType.PrivateNPCToPlayer:
                    message.AddLocation(location);
                    break;
                case SpeechType.ChannelRed:
                case SpeechType.ChannelRedAnonymous:
                case SpeechType.ChannelOrange:
                case SpeechType.ChannelYellow:
                case SpeechType.ChannelWhite:
                    message.AddUInt16((ushort)channelId);
                    break;
                case SpeechType.RuleViolationReport:
                    message.AddUInt32(time);
                    break;
                default:
                    break;

            }

            message.AddString(text);
        }
コード例 #20
0
ファイル: EffectPacket.cs プロジェクト: henriqueuller/sharpot
 public static void Add(NetworkMessage message, Location location, Effect effect)
 {
     message.AddByte((byte)ServerPacketType.Effect);
     message.AddLocation(location);
     message.AddByte((byte)effect);
 }
コード例 #21
0
ファイル: EffectPacket.cs プロジェクト: xSlayper/sharpot
 public static void Add(NetworkMessage message, Location location, Effect effect)
 {
     message.AddByte((byte)ServerPacketType.Effect);
     message.AddLocation(location);
     message.AddByte((byte)effect);
 }