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

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Exemplo n.º 2
0
        //修改帮会公告
        public void ReqChangeGuildNotice(string message)
        {
            if (false == GameManager.gameManager.PlayerDataPool.IsHaveGuild())
            {
                return;
            }

            Guild info = GameManager.gameManager.PlayerDataPool.GuildInfo;

            GuildMember mainPlayerGuildInfo = info.GetMainPlayerGuildInfo();

            if (false == mainPlayerGuildInfo.IsValid())
            {
                return;
            }

            if (false == info.IsHaveAuthority(mainPlayerGuildInfo.Job, (int)GameDefine_Globe.GUILD_ROUTINE.GUILD_ROUTINE_CHANGE_NOTICE))
            {
                GUIData.AddNotifyData("#{2513}");
                return;
            }

            //判断字符串的合法性
            if (message.Length <= 0)
            {
                return;
            }

            CG_GUILD_REQ_CHANGE_NOTICE msg = (CG_GUILD_REQ_CHANGE_NOTICE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_GUILD_REQ_CHANGE_NOTICE);

            msg.GuildNotice = message;
            msg.SendPacket();

            //为了避免实时刷新,这里暂时将帮会公告设置为修改后的。等待下次向服务器申请后即可再次被赋值
            GameManager.gameManager.PlayerDataPool.GuildInfo.GuildNotice = message;

            if (GuildWindow.Instance() != null)
            {
                GuildWindow.Instance().UpdateGuildNotice();
            }
        }