RefreshExtra() публичный Метод

public RefreshExtra ( int player, int flag = 0x81fff ) : void
player int
flag int
Результат void
Пример #1
0
        private void OnTagSwap(CoreMessage msg)
        {
            GamePacketWriter packet = GamePacketFactory.Create(GameMessage.TagSwap);

            int player = msg.Reader.ReadByte();

            packet.Write((byte)player);

            packet.Write(msg.Reader.ReadByte()); // mcount
            int ecount = msg.Reader.ReadByte();

            packet.Write((byte)ecount);
            packet.Write(msg.Reader.ReadByte()); // pcount
            int hcount = msg.Reader.ReadByte();

            packet.Write((byte)hcount);

            packet.Write(msg.Reader.ReadBytes(4)); // topcode

            for (int i = 0; i < hcount + ecount; i++)
            {
                uint code = msg.Reader.ReadUInt32();
                if ((code & 0x80000000) != 0)
                {
                    packet.Write(code);
                }
                else
                {
                    packet.Write(0);
                }
            }

            SendToPlayer(msg, player);
            Game.SendToAllBut(packet, player);

            Game.RefreshExtra(player);
            Game.RefreshMonsters(0, 0x81fff);
            Game.RefreshMonsters(1, 0x81fff);
            Game.RefreshSpells(0, 0x681fff);
            Game.RefreshSpells(1, 0x681fff);
            Game.RefreshHand(0, 0x181fff);
            Game.RefreshHand(1, 0x181fff);
        }
Пример #2
0
        private void OnTagSwap(CoreMessage msg)
        {
            GameServerPacket packet = new GameServerPacket(GameMessage.TagSwap);

            int player = msg.Reader.ReadByte();

            packet.Write((byte)player);
            packet.Write(msg.Reader.ReadBytes(2));
            int count = msg.Reader.ReadByte();

            packet.Write((byte)count);
            packet.Write(msg.Reader.ReadBytes(4));

            for (int i = 0; i < count; i++)
            {
                uint code = msg.Reader.ReadUInt32();
                if ((code & 0x80000000) != 0)
                {
                    packet.Write(code);
                }
                else
                {
                    packet.Write(0);
                }
            }

            SendToPlayer(msg, player);
            Game.SendToAllBut(packet, player);

            Game.RefreshExtra(player);
            Game.RefreshMonsters(0, 0x81fff, false);
            Game.RefreshMonsters(1, 0x81fff, false);
            Game.RefreshSpells(0, 0x681fff, false);
            Game.RefreshSpells(1, 0x681fff, false);
            Game.RefreshHand(0, 0x181fff, false);
            Game.RefreshHand(1, 0x181fff, false);
        }