Example #1
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_WULIN_MEMBERLIST packet = (GC_WULIN_MEMBERLIST )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            WuLinData.ShowRegisterMemberList(packet);
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
    public static void ShowRegisterMemberList(GC_WULIN_MEMBERLIST msg)
    {
        RegisterMemberList.Clear();
        WuLinPosition = msg.SelfPos;
        CurWuLinPage  = msg.CurPage;
        MaxWuLinPage  = msg.MaxPage;
        //
        if (msg.guidCount <= 0)
        {
            if (null != ActivityController.Instance())
            {
                ActivityController.Instance().ChangeToWuLinShowDefault();
            }
        }
        else
        {
            if (null != ActivityController.Instance())
            {
                ActivityController.Instance().ChangeToWuLinShowMemberList();
            }

            for (int i = 0; i < msg.guidCount; i++)
            {
                RegisterMemberList.Add(new RegisterMemberInfo(
                                           msg.GetGuid(i), msg.GetName(i),
                                           (CharacterDefine.PROFESSION)msg.GetProfession(i),
                                           msg.GetLevel(i), msg.GetCombatnum(i), msg.GetPos(i)));
            }

            // ....
            if (null != delegateShowRegisterMemberList)
            {
                delegateShowRegisterMemberList();
            }
        }
    }