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

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            HuaShanPVPData.ShowMercenaryEmployed(packet);
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Beispiel #2
0
    public static void ShowMercenaryEmployed(GC_MERCENARY_EMPLOYLIST msg)
    {
        MercenaryEmployList.Clear();

        //...
        for (int i = 0; i < msg.guidCount; i++)
        {
            if (msg.GetGuid(i) != GlobeVar.INVALID_GUID)
            {
                MercenaryEmployList.Add(new MercenaryInfo(
                                            msg.GetGuid(i), msg.GetName(i),
                                            msg.GetSource(i), msg.GetCost(i),
                                            msg.GetProfession(i), msg.GetCombat(i)));
            }
        }

        if (null != delegateShowMercenaryEmployed)
        {
            delegateShowMercenaryEmployed();
        }
    }