//3-28 public void SendPostageReq(List <ToggleAndObj> taos) { var builder = Farm_Game_Postage_Req.CreateBuilder(); for (int i = 0; i < taos.Count; i++) { if (taos[i].T.isOn) { var a = PMsg_StagePropUnit.CreateBuilder(); a.Count = taos[i].Num; a.Id = taos[i].Id; builder.AddObjs(a); } } _Proxy.SendMsg(NetModules.GameAction.ModuleId, NetModules.GameAction.Farm_Game_Postage_Req, builder); }
//3-27兑换请求 public void OidExchangeReq(int userId, int pattern, string recieverName, string phoneNumber, string province, string city, string county, int pinpai, string adress, string beaty, int PayPattern) { if (FieldsController.ProtocalAction != ProtocalAction.None) { return; } else { FieldsController.ProtocalAction = ProtocalAction.Exchange; } Farm_Game_OidExchange_Req.Builder builder = Farm_Game_OidExchange_Req.CreateBuilder(); builder.UserGameID = userId; builder.RecieverName = recieverName; builder.PhoneNum = phoneNumber; builder.Adress = adress; builder.Beaty = beaty; builder.City = city; builder.County = county == "请选择县级"?"没有填写,见联系地址":county; builder.PinPai = pinpai; builder.Pattern = pattern; builder.PayPattern = PayPattern; builder.Province = province; Debug.Log(string.Format("<color=#ffffffff><---{0}-{1}----></color>", builder.County, "hjhj")); List <ToggleAndObj> taos = CommitViewModel.Instance.taos; for (int i = 0; i < taos.Count; i++) { if (taos[i].T.isOn) { var a = PMsg_StagePropUnit.CreateBuilder(); a.Count = taos[i].Num; a.Id = taos[i].Id; Debug.Log(string.Format("<color=#ffffffff><---{0}-{1}----></color>", a.Count, a.Id)); builder.AddObjs(a); } } Debug.Log(string.Format("<color=#ffffffff><---{0}-{1}----></color>", province, county)); _Proxy.SendMsg(NetModules.GameAction.ModuleId, NetModules.GameAction.Farm_Game_OidExchange_Req, builder); }
public static DogFood SetDogFoodAnwData(PMsg_StagePropUnit obj) { if (obj != null) { //查找本地配置表 BaseAtrribute ba = LoadObjctDateConfig.Instance.GetAtrribute(obj.Id); DogFood p = new DogFood(); p.Speedup = ba.SpeedUp; p.Url = "Sprites/DogFoods/DogFood_" + ba.Id; p.Des = ba.Des; DataSettingManager.SerializeProto(p, obj); return(p); } else { Debug.LogError(string.Format("the DogFoodObject is null")); return(null); } }
public static Elixir SetElixirAnwData(PMsg_StagePropUnit obj) { if (obj != null) { //查找本地配置表 BaseAtrribute ba = LoadObjctDateConfig.Instance.GetAtrribute(obj.Id); Elixir p = new Elixir(); //p.Url = "Sprites/Fertilizers/Fertilizer_" + ba.Id; p.StoreShowTag = 4; p.Des = ba.Des; DataSettingManager.SerializeProto(p, obj); return(p); } else { Debug.LogError(string.Format("the FertilizerObject is null")); return(null); } }
public static Result SetResultAnwData(PMsg_StagePropUnit obj) { if (obj != null) { //查找本地配置表 BaseAtrribute ba = LoadObjctDateConfig.Instance.GetAtrribute(obj.Id); Result p = new Result(); p.UpGradeToOilNum = ba.CombineCount; p.StoreShowTag = 2; p.Url = "Sprites/Results/Result_" + ba.Id; p.Des = ba.Des; DataSettingManager.SerializeProto(p, obj); return(p); } else { Debug.LogError(string.Format("the ResultObject is null")); return(null); } }
public static Seed SetSeedAnwData(PMsg_StagePropUnit obj) { if (obj != null) { //查找本地配置表 BaseAtrribute ba = LoadObjctDateConfig.Instance.GetAtrribute(obj.Id); Seed p = new Seed(); p.GrothTime = ba.GrothTime; p.StoreShowTag = 1; p.Url = "Sprites/Seeds/Seed_" + ba.Id; p.Des = ba.Des; DataSettingManager.SerializeProto(p, obj); return(p); } else { Debug.LogError(string.Format("the SeedObject is null")); return(null); } }
public static Oil SetOilAnwData(PMsg_StagePropUnit obj) { if (obj != null) { //查找本地配置表 BaseAtrribute ba = LoadObjctDateConfig.Instance.GetAtrribute(obj.Id); Oil p = new Oil(); if (ba.Type == ObjectType.PrimaryOil) { p.OilType = 1;//初级精油 ?合成数量? p.CombinCount = ba.CombineCount; p.Url = "Sprites/Oils/PrimaryOil/POil_" + ba.Id; } else if (ba.Type == ObjectType.SemiOil) { p.OilType = 2;//半成品精油 p.Url = "Sprites/Oils/SemiOil/SEOil_" + ba.Id; } else if (ba.Type == ObjectType.SeniorOil) { p.OilType = 3;//高级精油 p.Url = "Sprites/Oils/SeniorOil/SOil_" + ba.Id; } //p.GainExp = obj.GainEXP; //p.OnceLackResult = obj.OnceLackResult; p.StoreShowTag = 3; p.Des = ba.Des; DataSettingManager.SerializeProto(p, obj); return(p); } else { Debug.LogError(string.Format("the OilObject is null")); return(null); } }