public static ViewPlayerData BuildViewData(GameCmd.stViewRoleReturnPropertyUserCmd_S cmd) { retData = new ViewPlayerData(); retData.userid = cmd.userid; retData.user_level = cmd.user_level; retData.userid = cmd.userid; retData.username = cmd.username; retData.sex = cmd.sex; retData.power = cmd.power; retData.job = cmd.job; retData.clan_name = cmd.clan_name; retData.gem_data = cmd.gem_data; retData.viewRoleData = cmd.user_data; retData.suit_data = cmd.suit_data; retData.itemList = cmd.itemList; retData.strengthList = cmd.strength_data; Engine.PackageIn pack = new Engine.PackageIn(cmd.pet_data); retData.petdata = GameCmd.PetUserData.Deserialize(pack); pack = new Engine.PackageIn(cmd.ride_data); retData.rideData = GameCmd.RideUserData.Deserialize(pack); return(retData); }
public void Excute(GameCmd.stViewRoleReturnPropertyUserCmd_S cmd) { // IEntitySystem es = ClientGlobal.Instance().GetEntitySystem(); // if (es == null) // { // Engine.Utility.Log.Error("严重错误:EntitySystem is null!"); // return; // } // // EntityCreateData data = new EntityCreateData(); // data.PropList = new EntityAttr[(int)PlayerProp.End - (int)EntityProp.Begin]; // data.ID = cmd.userdata.dwUserID; // RoleUtil.BuildPlayerPropList(cmd.userdata, ref data.PropList); // IPlayer player = es.FindPlayer(cmd.userdata.dwUserID); // if (player != null) // { // player.UpdateProp(data); // DataManager.Manager<UIPanelManager>().ShowPanel(PanelID.PropPanel, data: cmd.userdata.dwUserID); // } DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.ViewPlayerPanel, data: ViewPlayerData.BuildViewData(cmd)); }