Exemplo n.º 1
0
 public void Setup(ClientUID client_uid, InterServerID srv_uid, PlayerInfoForWS info)
 {
     m_char_idx   = info.char_idx;
     m_client_uid = client_uid;
     m_srv_uid    = srv_uid;
     m_player_data.Copy(info);
 }
Exemplo n.º 2
0
        /// <summary>
        /// 登入处理
        /// </summary>
        public void HandleLogin(ClientUID client_uid, InterServerID srv_uid, PlayerInfoForWS data)
        {
            Unit unit = GetUnitByIdx(data.char_idx);

            if (unit != null)
            {//可能上次退出时,没有清除数据
                this.RemoveUnit(unit);
            }
            //创建玩家
            unit = new Unit();
            unit.Setup(client_uid, srv_uid, data);
            UnitManager.Instance.AddUnit(unit);
            unit.OnEnter();
        }
Exemplo n.º 3
0
        public uint vip_grade;      // vip等级

        public void Copy(PlayerInfoForWS info)
        {
            account_idx = info.account_idx;
            char_idx    = info.char_idx;
            spid        = info.spid;
            char_name   = info.char_name;
            char_type   = info.char_type;
            ws_id       = info.ws_id;
            flags       = info.flags;
            model_idx   = info.model_idx;
            job         = info.job;
            level       = info.level;
            exp         = info.exp;
            gold        = info.gold;
            coin        = info.coin;
            vip_grade   = info.vip_grade;
        }