public uint Execute(PacketDistributed ipacket)
        {
            GC_MERCENARY_LIST_RES packet = (GC_MERCENARY_LIST_RES )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            HuaShanPVPData.ShowMercenaryList(packet);
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
예제 #2
0
    public static void ShowMercenaryList(GC_MERCENARY_LIST_RES msg)
    {
        MercenaryList.Clear();

        HuaShanPVPData.MercenaryTimesLeft = msg.Lefttimes;
        //...
        for (int i = 0; i < msg.guidCount; i++)
        {
            MercenaryList.Add(new MercenaryInfo(
                                  msg.GetGuid(i), msg.GetName(i),
                                  msg.GetSource(i), msg.GetCost(i),
                                  msg.GetProfession(i), msg.GetCombat(i)));
        }

        if (MercenaryWindow.Instance() != null)
        {
            CallShowMercenaryList();
            CallShowMercenaryLeftTime();
        }
        else
        {
            UIManager.ShowUI(UIInfo.MercenaryWindowRoot, OnShowMercenaryMemberRoot);
        }
    }