Ejemplo n.º 1
0
        public static void Init()
        {
            if (Initialized)
            {
                return;
            }

            ReqOplParent = PacketHandlers.GetExtendedHandler(0x10);
            PacketHandlers.RegisterExtended(ReqOplParent.PacketID, ReqOplParent.Ingame, OnQueryProperties);

            ReqBatchOplParent = PacketHandlers.GetHandler(0xD6);

            bool is6017 = (PacketHandlers.Get6017Handler(0xD6) != null);

            PacketHandlers.Register(
                ReqBatchOplParent.PacketID, ReqBatchOplParent.Length, ReqBatchOplParent.Ingame, OnBatchQueryProperties);

            if (is6017)
            {
                PacketHandlers.Register6017(
                    ReqBatchOplParent.PacketID, ReqBatchOplParent.Length, ReqBatchOplParent.Ingame, OnBatchQueryProperties);
            }

            OutParent0xD6 = OutgoingPacketOverrides.GetHandler(0xD6);
            OutgoingPacketOverrides.Register(0xD6, true, OnEncode0xD6);

            Initialized = true;

            PollTimer.FromSeconds(10.0, FreeCache);
        }
Ejemplo n.º 2
0
 public PacketHandler GetHandler(int packetID)
 {
     if (ContainerGridLines)
     {
         return(PacketHandlers.Get6017Handler(packetID));
     }
     else
     {
         return(PacketHandlers.GetHandler(packetID));
     }
 }
Ejemplo n.º 3
0
        private static void CMConfig()
        {
            EquipItemRequestParent    = PacketHandlers.GetHandler(0x13);
            DropItemRequestParent     = PacketHandlers.GetHandler(0x08);
            DropItemRequestParent6017 = PacketHandlers.Get6017Handler(0x08);

            EquipItemParent = OutgoingPacketOverrides.GetHandler(0x2E);

            PacketHandlers.Register(0x13, 10, true, EquipItemRequest);
            //PacketHandlers.Register6017(0x13, 10, true, EquipItemRequest6017);
            PacketHandlers.Register(0x08, 14, true, DropItemRequest);
            PacketHandlers.Register6017(0x08, 15, true, DropItemRequest6017);

            OutgoingPacketOverrides.Register(0x2E, true, EquipItem);
        }
Ejemplo n.º 4
0
        public static void Initialize()
        {
            m_Target     = PacketHandlers.GetHandler(0x6C);
            m_Target6017 = PacketHandlers.Get6017Handler(0x6C);

            m_Equip     = PacketHandlers.GetHandler(0x13);
            m_Equip6017 = PacketHandlers.Get6017Handler(0x13);

            if (m_Target6017 == null)
            {
                m_Target6017 = m_Target;
            }

            if (m_Equip6017 == null)
            {
                m_Equip6017 = m_Equip;
            }

            PacketHandlers.Register(0x6C, 19, true, new OnPacketReceive(TargetResponse));
            PacketHandlers.Register6017(0x6C, 19, true, new OnPacketReceive(TargetResponse6017));
            PacketHandlers.Register(0x13, 10, true, new OnPacketReceive(EquipReq));
            PacketHandlers.Register6017(0x13, 10, true, new OnPacketReceive(EquipReq6017));
        }