GetLegionSystem() public méthode

public GetLegionSystem ( ) : PlayerLegion
Résultat PlayerLegion
        //军团添加成员
        public void AddMember(uint legion_id,PlayerObject play)
        {
            //已经有军团了
            if(play.GetLegionSystem().IsHaveLegion())return;
            Legion legion = GetLegion(legion_id);
            if (legion == null) return;
            LegionMember member = new LegionMember();
            member.members_name = play.GetName();
            member.money = 0;
            member.rank = GameBase.Config.Define.LEGION_PLACE_PUTONGTUANYUAN;
            legion.GetBaseInfo().list_member.Add(member);
            play.GetLegionSystem().SetLegion(legion,true);

            UpdateLegionInfo(legion_id, play.GetBaseAttr().player_id);
        }
 //退出军团
 public void QuitLegion(PlayerObject play)
 {
     Legion legion =  play.GetLegionSystem().GetLegion();
     if(legion == null)return;
     uint legion_id = legion.GetBaseInfo().id;
     play.GetLegionSystem().SetLegion(null,true);
     int player_id = play.GetBaseAttr().player_id;
     for (int i = 0; i < legion.GetBaseInfo().list_member.Count; i++)
     {
         if (legion.GetBaseInfo().list_member[i].members_name == play.GetName())
         {
             legion.GetBaseInfo().list_member[i].id = 0;
             break;
         }
     }
     this.UpdateLegionInfo(legion_id, player_id);
 }
Exemple #3
0
        public void AddTempPlayObject(GameBase.Network.Internal.RoleInfo info)
        {
            TempPlayObject temp = new TempPlayObject();
            PlayerObject play = new PlayerObject();
            temp.play = play;
            temp.key = info.mKey;
            temp.key2 = info.mKey1;
            temp.isRole = info.isRole;
            temp.accountid = info.accountid;
            //基本属性
            m_DicTempPlayObject[play.GetGameID()] = temp;

            if (temp.isRole)
            {
                play.SetName(info.name);
                GameStruct.PlayerAttribute attr = play.GetBaseAttr();
                attr.account_id = info.accountid;
                attr.player_id = info.playerid;
                attr.mana = info.mana;
                attr.lookface = info.lookface;
                attr.hair = info.hair;
                attr.profession = info.profession;
                attr.level = info.lv;
                attr.exp = (int)info.exp;
                attr.life = info.life;
                attr.pk = info.pk;
                attr.gold = info.gold;
                attr.gamegold = info.gamegold;
                attr.stronggold = info.stronggold;
                attr.mapid = (uint)info.mapid;
                attr.guanjue = info.guanjue;
                attr.sAccount = info.sAccount;
                attr.godlevel = (byte)info.godlevel;
                attr.maxeudemon = info.maxeudemon;
                play.SetHotKeyInfo(info.hotkey);
                play.CalcSex();
                play.SetPoint(info.x, info.y);

                //官爵信息
                GameStruct.GUANGJUELEVEL gjlevel = GuanJueManager.Instance().GetLevel(play);
                play.SetGuanJue(gjlevel);
                //初始化军团信息
                play.GetLegionSystem().Init();
            }
        }
 private void Action_Legion_ChangeTitle(ActionInfo info, PlayerObject play)
 {
     if (!play.GetLegionSystem().IsHaveLegion()) return;
     byte bTitle = Convert.ToByte(info.param);
     play.GetLegionSystem().ChangeLegionTitle(bTitle);
 }
        public bool Action_Legion_Create(ActionInfo info, PlayerObject play)
        {
            String legionname = mszStr;
            mszStr = "";
            if (legionname.Length <= 0) return false;
            if (play.GetLegionSystem().IsHaveLegion())
            {
                return false;
            }
            //是否有重复的军团
            if (LegionManager.Instance().IsExist(legionname))
            {
                return false;
            }
            String[] option = info.param.Split(' ');
            int level = Convert.ToInt32(option[0]);//创建军团所需等级
            int money = Convert.ToInt32(option[1]); //创建军团的费用
            int capital = Convert.ToInt32(option[2]); //军团起始资金
            if (play.GetBaseAttr().level < level )
            {
                return false;
            }

            if (play.GetMoneyCount(MONEYTYPE.GOLD) < money )
            {
                return false;
            }

            play.ChangeMoney(MONEYTYPE.GOLD, money);

            LegionManager.Instance().CreateLegion(play.GetBaseAttr().player_id, legionname,play.GetName(), GameBase.Config.Define.LEGION_JUNTUAN, capital, "公告");
            //发给数据库服务器创建军团

            return true;
            //246, 0, 0, 0 为军团id
            //1107 为军团协议
               // 收到网络协议:长度:16协议号:1302
            //            byte[] dat1 = {16,0,22,5,61,2,0,0,182,113,0,0,88,2,0,0};
            //            play.GetGamePackKeyEx().EncodePacket(ref dat1, dat1.Length);
            //            play.SendData(dat1);
            //            //收到网络协议:长度:20协议号:1017

            //            byte[] dat2 = { 20, 0, 249, 3, 64, 66, 15, 0, 1, 0, 0, 0, 9, 0, 0, 0, 100, 0, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref dat2, dat2.Length);
            //            play.SendData(dat2);
            ////收到网络协议:长度:20协议号:1017
            //            byte[] dat3 = {20,0,249,3,65,66,15,0,1,0,0,0,70,0,0,0,64,0,0,0};
            //            play.GetGamePackKeyEx().EncodePacket(ref dat3, dat3.Length);
            //            play.SendData(dat3);

            ////收到网络协议:长度:16协议号:1012

            //            byte[] dat4 = { 16, 0, 244, 3, 64, 66, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref dat4, dat4.Length);
            //            play.SendData(dat4);
            //收到网络协议:长度:108协议号:1106/
              //头衔注释
            //0.1.军团长 2.帮主  3.教主 4.会长
               // byte[] dat5 = {108,0,82,4,246,0,0,0,144,208,3,0,144,208,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,232,3,1,0,4/*!!!头衔*/,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,176,177,200,186,243,204,236,0,0,0,0,0,0,0,0,0,0,246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
            //byte[] dat5 = { 108, 0, 82, 4, 246, 0, 0, 0, 144, 208, 3, 0, 144, 208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4/*!!!头衔*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 176, 177, 200, 186, 243, 204, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
            //play.GetGamePackKeyEx().EncodePacket(ref dat5, dat5.Length);
            //play.SendData(dat5);

            //收到网络协议:长度:21协议号:1015
            //{27,0,247,3,117,1,0,0,3,0,1,14,169,89,211,200,207,170,161,239,180,180,187,212,187,205,0}
            //byte[] data10 = { 21, 0, 247, 3, 246, 0, 0, 0, 3, 0, 1, 8, 196, 234, 201, 217, 187, 196, 204, 198, 0 };
            //play.GetGamePackKeyEx().EncodePacket(ref data10, data10.Length);
            //play.SendData(data10);

            //收到网络协议:长度:172协议号:2056
            //            byte[] dat6 = { 172, 0, 8, 8, 64, 66, 15, 0, 20, 0, 0, 0, 3, 0, 0, 0, 144, 208, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 144, 208, 3, 0, 11, 0, 0, 0, 144, 208, 3, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref dat6, dat6.Length);
            //            play.SendData(dat6);

            ////收到网络协议:长度:108协议号:1106
            //            byte[] dat7 = {108,0,82,4,246,0,0,0,144,208,3,0,144,208,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,232,3,0,0,0,0,232,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,176,177,200,186,243,204,236,0,0,0,0,0,0,0,0,0,0,246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
            //            play.GetGamePackKeyEx().EncodePacket(ref dat7, dat7.Length);
            //            play.SendData(dat7);

            ////收到网络协议:长度:172协议号:2056
            //            byte[] dat8 = { 172, 0, 8, 8, 64, 66, 15, 0, 20, 0, 0, 0, 3, 0, 0, 0, 144, 208, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 144, 208, 3, 0, 11, 0, 0, 0, 144, 208, 3, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref dat8, dat8.Length);
            //            play.SendData(dat8);

            ////收到网络协议:长度:108协议号:1106
            //            byte[] dat9={108,0,82,4,246,0,0,0,144,208,3,0,160,247,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,232,3,0,0,0,0,232,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,176,177,200,186,243,204,236,0,0,0,0,0,0,0,0,0,0,246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
            //            play.GetGamePackKeyEx().EncodePacket(ref dat9, dat9.Length);
            //            play.SendData(dat9);

            ////收到网络协议:长度:172协议号:2056
            //            byte[] dat10 = { 172, 0, 8, 8, 64, 66, 15, 0, 20, 0, 0, 0, 3, 0, 0, 0, 144, 208, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 144, 208, 3, 0, 11, 0, 0, 0, 144, 208, 3, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref dat10, dat10.Length);
            //            play.SendData(dat10);

            ////收到网络协议:长度:108协议号:1106
            //            byte[] dat11={108,0,82,4,246,0,0,0,144,208,3,0,160,247,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,232,3,0,0,0,0,232,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,176,177,200,186,243,204,236,0,0,0,0,0,0,0,0,0,0,246,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
            //            play.GetGamePackKeyEx().EncodePacket(ref dat11, dat11.Length);
            //            play.SendData(dat11);
            //收到网络协议:长度:172协议号:2056
            //            byte[] dat12 = { 172, 0, 8, 8, 64, 66, 15, 0, 20, 0, 0, 0, 3, 0, 0, 0, 144, 208, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 144, 208, 3, 0, 11, 0, 0, 0, 144, 208, 3, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref dat12, dat12.Length);
            //            play.SendData(dat12);

            ////收到网络协议:长度:189协议号:1014
            //            byte[] dat13 = { 189, 0, 246, 3, 64, 66, 15, 0, 33, 191, 2, 0, 33, 191, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 0, 0, 0, 21, 0, 2, 0, 102, 66, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 0, 114, 1, 132, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 97, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 197, 10, 0, 0, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8, 210, 176, 177, 200, 186, 243, 204, 236, 0, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref dat13, dat13.Length);
            //            play.SendData(dat13);

            ////收到网络协议:长度:46协议号:1004
            //            byte[] dat15 = { 46, 0, 236, 3, 0, 255, 255, 0, 63, 8, 0, 0, 71, 8, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 4, 6, 83, 89, 83, 84, 69, 77, 8, 210, 176, 177, 200, 186, 243, 204, 236, 0, 0, 0, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref dat15, dat15.Length);
            //            play.SendData(dat15);

            //收到网络协议:长度:16协议号:1015

            //byte[] data = { 16, 0, 247, 3, 1, 0, 0, 0, 101, 0, 1, 3, 50, 52, 54, 0 };
            //play.GetGamePackKeyEx().EncodePacket(ref data, data.Length);
            //play.SendData(data);
            ////收到网络协议:长度:16协议号:1015

            //byte[] data1 = { 16, 0, 247, 3, 1, 0, 0, 0, 100, 0, 1, 3, 50, 52, 54, 0 };
            //play.GetGamePackKeyEx().EncodePacket(ref data1, data1.Length);
            //play.SendData(data1);
            //收到网络协议:长度:29协议号:1107

            //byte[] data2 = { 29, 0, 83, 4, 14, 0, 0, 0, 246, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8, 196, 234, 201, 217, 187, 196, 204, 198, 0, 0 };
            //play.GetGamePackKeyEx().EncodePacket(ref data2, data2.Length);
            //play.SendData(data2);
            //收到网络协议:长度:20协议号:1107

            //byte[] data3 = { 20, 0, 83, 4, 119, 0, 0, 0, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
            //play.GetGamePackKeyEx().EncodePacket(ref data3, data3.Length);
            //play.SendData(data3);
            //收到网络协议:长度:16协议号:2036

            //byte[] data4 = { 16, 0, 244, 7, 205, 0, 2, 0, 246, 0, 0, 0, 0, 0, 0, 0 };
            //play.GetGamePackKeyEx().EncodePacket(ref data4, data4.Length);
            //play.SendData(data4);
            ////收到网络协议:长度:56协议号:2036

            //byte[] data5 = { 56, 0, 244, 7, 210, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 0, 0, 0 };
            //play.GetGamePackKeyEx().EncodePacket(ref data5, data5.Length);
            //play.SendData(data5);
            //收到网络协议:长度:12协议号:1015

            //byte[] data6 = { 12, 0, 247, 3, 0, 0, 0, 0, 152, 0, 0, 0 };
            //play.GetGamePackKeyEx().EncodePacket(ref data6, data6.Length);
            //play.SendData(data6);
            ////收到网络协议:长度:20协议号:1017

            //byte[] data7 = { 20, 0, 249, 3, 64, 66, 15, 0, 1, 0, 0, 0, 4, 0, 0, 0, 11, 139, 16, 0 };
            //play.GetGamePackKeyEx().EncodePacket(ref data7, data7.Length);
            //play.SendData(data7);

            //收到网络协议:长度:74协议号:1107
            //            byte[] data8 = { 74, 0, 83, 4, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 5, 48, 32, 48, 32, 48, 5, 49, 32, 48, 32, 48, 5, 50, 32, 48, 32, 48, 5, 51, 32, 48, 32, 48, 5, 52, 32, 48, 32, 48, 5, 53, 32, 48, 32, 48, 5, 54, 32, 48, 32, 48, 5, 55, 32, 48, 32, 48, 5, 56, 32, 48, 32, 48, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref data8, data8.Length);
            //            play.SendData(data8);
            ////
            ////收到网络协议:长度:16协议号:1182
            ////
            //            byte[] data9 = { 16, 0, 158, 4, 7, 0, 0, 0, 232, 3, 0, 0, 3, 0, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref data9, data9.Length);
            //            play.SendData(data9);

            //收到网络协议:长度:16协议号:1302
            //
            //            byte[] data11 = { 16, 0, 22, 5, 61, 2, 0, 0, 253, 101, 0, 0, 88, 2, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref data11, data11.Length);
            //            play.SendData(data11);
            ////收到网络协议:长度:28协议号:1010
            ////
            //            byte[] data12 = { 28, 0, 242, 3, 118, 202, 19, 86, 65, 66, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 37, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref data12, data12.Length);
            //            play.SendData(data12);
            //收到网络协议:长度:28协议号:1010
            //
            //            byte[] data13 = { 28, 0, 242, 3, 118, 202, 19, 86, 65, 66, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 37, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref data13, data13.Length);
            //            play.SendData(data13);
            ////收到网络协议:长度:28协议号:1010
            ////
            //            byte[] data14 = { 28, 0, 242, 3, 118, 202, 19, 86, 194, 148, 53, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 37, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref data14, data14.Length);
            //            play.SendData(data14);
            //收到网络协议:长度:28协议号:1010
            //
            //            byte[] data15 = { 28, 0, 242, 3, 118, 202, 19, 86, 193, 148, 53, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 37, 0, 0 };
            //            play.GetGamePackKeyEx().EncodePacket(ref data15, data15.Length);
            //            play.SendData(data15);
            ////收到网络协议:长度:20协议号:1017
            ////{
            //            byte[] data16 ={20,0,249,3,65,66,15,0,1,0,0,0,70,0,0,0,64,0,0,0};
            //            play.GetGamePackKeyEx().EncodePacket(ref data16, data16.Length);
            //            play.SendData(data16);
            //收到网络协议:长度:192协议号:1014 天晴猪宝贝
                    //byte[] data17 ={192,0,246,3,65,66,15,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,132,16,2,0,0,0,0,0,0,0,0,0,0,0,0,0,159,0,110,1,100,0,0,0,0,5,0,0,0,0,0,0,125,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,197,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,11,183,201,184,235,54,50,56,91,71,77,93,0,0,0};
                    //play.GetGamePackKeyEx().EncodePacket(ref data17, data17.Length);
                    //play.SendData(data17);
            //
            //收到网络协议:长度:28协议号:2036
            //
                    //byte[] data18= { 28, 0, 244, 7, 109, 0, 5, 0, 65, 66, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
                    //play.GetGamePackKeyEx().EncodePacket(ref data18, data18.Length);
                    //play.SendData(data18);
            //收到网络协议:长度:28协议号:1017
            //
                    //byte[] data19 = { 28, 0, 249, 3, 65, 66, 15, 0, 2, 0, 0, 0, 36, 0, 0, 0, 0, 4, 0, 0, 70, 0, 0, 0, 64, 0, 0, 0 };
                    //play.GetGamePackKeyEx().EncodePacket(ref data19, data19.Length);
                    //play.SendData(data19);

            //收到网络协议:长度:108协议号:1106
            //这个是更改军团头衔 会长 军团战 帮主之类的
                    //byte[] data20 = { 108, 0, 82, 4, 246, 0, 0, 0, 144, 208, 3, 0, 160, 247, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 232, 3, 0, 0, 0, 0, 232, 3, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 176, 177, 200, 186, 243, 204, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
                    //play.GetGamePackKeyEx().EncodePacket(ref data20, data20.Length);
                    //play.SendData(data20);

            //收到网络协议:长度:172协议号:2056
                    //byte[] data21 = { 172, 0, 8, 8, 76, 152, 15, 0, 20, 0, 0, 0, 3, 0, 0, 0, 144, 208, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 144, 208, 3, 0, 11, 0, 0, 0, 144, 208, 3, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0 };
                    //play.GetGamePackKeyEx().EncodePacket(ref data21, data21.Length);
                    //play.SendData(data21);
            //
            //收到网络协议:长度:189协议号:1014 野比后天
                    //byte[] data22 = { 189, 0, 246, 3, 76, 152, 15, 0, 33, 191, 2, 0, 33, 191, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 0, 0, 0, 21, 0, 2, 0, 102, 66, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 0, 114, 1, 132, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 97, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 197, 10, 0, 0, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8, 210, 176, 177, 200, 186, 243, 204, 236, 0, 0, 0 };
                    //play.GetGamePackKeyEx().EncodePacket(ref data22, data22.Length);
                    //play.SendData(data22);
            //
            //return true;
        }
        public void SendRoleInfo(PlayerObject play)
        {
            NetMsg.MsgRoleInfo role = new NetMsg.MsgRoleInfo();
            role.Create(null, this.GetGamePackKeyEx());
            role.role_id = play.GetTypeId();
            role.x = play.GetCurrentX();
            role.y = play.GetCurrentY();
            role.armor_id = play.GetItemSystem().GetArmorLook();
            role.wepon_id = play.GetItemSystem().GetWeaponLook();
            // role.face_sex = play.GetFace();
            role.face_sex = (uint)play.GetLookFace();
            role.face_sex1 = play.GetBaseAttr().lookface;

            role.dir = play.GetDir();
            role.action = play.GetCurrentAction();
            role.guanjue = (byte)play.GetGuanJue();
            role.hair_id = play.GetBaseAttr().hair;
            role.str.Add(play.GetName());
            role.rid_id = play.GetMountID();

            //军团
            if (play.GetLegionSystem().IsHaveLegion() && play.GetLegionSystem().GetLegion() != null)
            {
                role.legion_id = play.GetLegionSystem().GetLegion().GetBaseInfo().id;
                role.legion_title = play.GetLegionSystem().GetLegion().GetBaseInfo().title;
                role.legion_place = play.GetLegionSystem().GetPlace();
                role.legion_id1 = role.legion_id;
            }

            this.SendData(role.GetBuffer());
            //发送状态
            play.GetTimerSystem().SendState(this);
            //军团名称-
            if (role.legion_id > 0)
            {
                NetMsg.MsgLegionName legion = new NetMsg.MsgLegionName();
                legion.Create(null, this.GetGamePackKeyEx());
                legion.legion_id = role.legion_id;
                legion.legion_name = play.GetLegionSystem().GetLegion().GetBaseInfo().name;
                this.SendData(legion.GetBuffer());

            }
            //加到对方玩家可视列表
            //if (!this.GetVisibleList().ContainsKey(play.GetGameID()))
            //{
            //    RefreshObject refobj = new RefreshObject();
            //    refobj.bRefreshTag = true;
            //    refobj.obj = play;
            //    this.GetVisibleList()[play.GetGameID()] = refobj;
            //}
            this.AddVisibleObject(play, true);
            //前面发送了角色的lookface 却并没有变为鬼魂状态,用这个协议号再改变一次..偷个懒 省的去分析封包结构了。
            if (play.IsDie() && play.IsGhost())
            {
                play.ChangeAttribute(UserAttribute.LOOKFACE, play.GetLookFace(), true);
            }
        }