Ejemplo n.º 1
0
        public uint Execute(PacketDistributed ipacket)
        {
            CG_MASTER_CREATE packet = (CG_MASTER_CREATE )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Ejemplo n.º 2
0
        //申请创建师门
        public void ReqCreateMaster(string MasterName, string MasterNotice)
        {
            //检测名字长度
            if (MasterName.Length <= 0 || MasterName.Length > GlobeVar.MAX_MASTER_NAME)
            {
                return;
            }
            //检测公告长度
            if (MasterNotice.Length <= 0 || MasterNotice.Length > GlobeVar.MAX_MASTER_NOTICE)
            {
                return;
            }

            //玩家等级判断
            if (BaseAttr.Level < GlobeVar.CREATE_MASTER_LEVEL)
            {
                Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{3322}");

                return;
            }

            //有师门无法申请
            if (GameManager.gameManager.PlayerDataPool.MasterInfo.MasterGuid != GlobeVar.INVALID_GUID)
            {
                //是待审批成员时 可以创建师门
                if (GameManager.gameManager.PlayerDataPool.IsMasterReserveMember() == false)
                {
                    Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, "#{3323}");

                    return;
                }
            }

            CG_MASTER_CREATE msg = (CG_MASTER_CREATE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_MASTER_CREATE);

            msg.MasterName   = MasterName;
            msg.MasterNotice = MasterNotice;
            msg.SendPacket();
        }