Beispiel #1
0
        //创建军团
        public void CreateLegion(int player_id,String legion_name,String leader_name,byte title,long money,String notice)
        {
            //已经创建军团的过程中,返回
            for(int i = 0;i < mListTemp.Count;i++)
            {
                if (mListTemp[i].leader_id == player_id)
                {
                    return;
                }
            }
            LegionOption option = new LegionOption();
            option.SetCreateTag();
            option.player_id = player_id;
            option.mInfo.leader_id = player_id;
            option.mInfo.leader_name = leader_name;
            option.mInfo.name = legion_name;
            option.mInfo.money = money;
            option.mInfo.notice = notice;
            DBServer.Instance().GetDBClient().SendData(option.GetBuffer());

            LegionInfo info = new LegionInfo();
            info.leader_id = player_id;
            info.name = legion_name;
            info.leader_name = leader_name;
            info.money = money;
            info.notice = notice;
            mListTemp.Add(info);
        }
Beispiel #2
0
        public void UpdateLegionInfo(uint legion_id,int player_id)
        {
            if (!mDicLegion.ContainsKey(legion_id)) return;
            Legion info = mDicLegion[legion_id];

            //发送给dbserver 更新军团数据
            LegionOption option = new LegionOption();
            option.SetUpdateTag();
            option.player_id = player_id;
            option.mInfo = info.GetBaseInfo();
            DBServer.Instance().GetDBClient().SendData(option.GetBuffer());
        }
Beispiel #3
0
 private void ProcessUpdateLegion(byte[] data)
 {
     GameBase.Network.Internal.LegionOption option = new GameBase.Network.Internal.LegionOption();
     option.Create(data);
     Legion.GetInstance().UpdateLegion(option.mInfo);
 }