Exemplo n.º 1
0
 public static RobotLegionManager GetInstance()
 {
     if (mInstance == null)
     {
         mInstance = new RobotLegionManager();
     }
     return mInstance;
 }
Exemplo n.º 2
0
 public static RobotLegionManager GetInstance()
 {
     if (mInstance == null)
     {
         mInstance = new RobotLegionManager();
     }
     return(mInstance);
 }
Exemplo n.º 3
0
        //发送机器人的角色信息
        //play 玩家对象

        public void SendRobotInfo(PlayerObject play /*bool boRepeat = true*/)
        {
            uint legion_id = RobotLegionManager.GetInstance().GetLegionId(mInfo.legion_name);

            NetMsg.MsgRoleInfo role = new NetMsg.MsgRoleInfo();
            role.Create(null, play.GetGamePackKeyEx());
            role.role_id  = this.GetTypeId();
            role.x        = mInfo.x;
            role.y        = mInfo.y;
            role.armor_id = mInfo.armor_id;
            role.wepon_id = mInfo.wepon_id;
            role.face_sex = role.face_sex1 = mInfo.lookface;
            role.dir      = mInfo.dir;
            role.guanjue  = mInfo.guanjue;
            role.hair_id  = mInfo.hair;
            role.rid_id   = mInfo.rid_id;
            role.str.Add(mInfo.name);

            //军团
            if (mInfo.legion_name.Length > 0)
            {
                role.legion_id    = legion_id;
                role.legion_title = mInfo.legion_title;
                role.legion_place = mInfo.legion_place;
                role.legion_id1   = legion_id;
            }
            play.SendData(role.GetBuffer());
            //军团名称-
            if (legion_id > 0)
            {
                NetMsg.MsgLegionName legion = new NetMsg.MsgLegionName();
                legion.Create(null, play.GetGamePackKeyEx());
                legion.legion_id   = legion_id;
                legion.legion_name = mInfo.legion_name;
                play.SendData(legion.GetBuffer());
                //if (boRepeat)
                //{
                //    mListPlay.Add(play.GetTypeId());
                //}
            }
            //取该玩家对象- 如果是王、女王、公爵则行礼
            //2015.11.21 遇到玩家就行礼
            //GameStruct.GUANGJUELEVEL lv = play.GetGuanJue();
            //if (lv == GameStruct.GUANGJUELEVEL.KING ||
            //    lv == GameStruct.GUANGJUELEVEL.QUEEN ||
            //    lv == GameStruct.GUANGJUELEVEL.DUKE
            //    )
            //{
            //      this.PlayFaceAcion(Define._ACTION_GENUFLECT, play);
            // }
            this.PlayFaceAcion(Define._ACTION_GENUFLECT, play);
        }