Пример #1
0
        public bool HandlePacket(PacketList.Server opcode, GameReader packet, GameData gameData, bool Handled, ExtensionHandler extensions)
        {
            InfoExt infoExt = (InfoExt)extensions.Get("InfoExt");

            switch (opcode)
            {
            case PacketList.Server.CreatureSay:
                Character toon = new Character();
                toon.ObjectID = packet.readD();
                ChatType type = (ChatType)packet.readD();
                toon.Name = packet.readS();
                ChatReceived(type, toon, packet.readS(), packet, gameData, extensions);
                break;

            case PacketList.Server.Die:
                Character toon2 = new Character();
                toon2.ObjectID = packet.readD();
                bool hideout   = (packet.readD() == 0x00) ? false : true;
                bool castle    = (packet.readD() == 0x00) ? false : true;
                bool siege     = (packet.readD() == 0x00) ? false : true;
                bool sweep     = (packet.readD() == 0x00) ? false : true;
                bool fixedresp = (packet.readD() == 0x00) ? false : true;
                bool fortress  = (packet.readD() == 0x00) ? false : true;
                if (toon2.ObjectID == infoExt.User.ObjectID)
                {
                    SelfDie(hideout, castle, siege, fortress, packet, gameData, extensions);
                }
                else
                {
                    OtherDie(hideout, castle, siege, fortress, sweep, fixedresp, packet, gameData, extensions);
                }
                break;
            }
            return(false);
        }
Пример #2
0
        public bool HandlePacket(PacketList.Server opcode, GameReader packet, GameData gameData, bool Handled, ExtensionHandler extensions)
        {
            InfoExt infoExt = (InfoExt)extensions.Get("InfoExt");

            if (infoExt.HandlePacket(opcode, packet, gameData, Handled, extensions))
            {
                Handled = true;
            }

            Events events = (Events)extensions.Get("Events");

            if (events.HandlePacket(opcode, packet, gameData, Handled, extensions))
            {
                Handled = true;
            }

            return(Handled);
        }