From 8e519cfca0e7dc0dd4c4d2c62550393cce8a2cfa Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期三, 19 十二月 2018 21:25:54 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
Core/GameEngine/Model/Config/ResourcesBackConfig.cs | 55 +++++++------
System/DailyQuest/ResourcesBackModel.cs | 19 ++++
Core/GameEngine/Model/Player/PlayerDatas.cs | 25 +++--
System/AssetVersion/InGameDownLoadWin.cs | 16 +++-
System/DailyQuest/ResourcesBackBoxBack.cs | 15 +++
System/ClientVersion/VersionUpdateWin.cs | 18 +++-
Core/SDK/SDKUtility.cs | 16 ++++
System/ClientVersion/VersionUtility.cs | 16 ----
System/AssetVersion/DownLoadWin.cs | 17 +++-
Core/GameEngine/Model/Config/ResourcesBackConfig.cs.meta | 2
10 files changed, 130 insertions(+), 69 deletions(-)
diff --git a/Core/GameEngine/Model/Config/ResourcesBackConfig.cs b/Core/GameEngine/Model/Config/ResourcesBackConfig.cs
index e8ad383..dbd2e2c 100644
--- a/Core/GameEngine/Model/Config/ResourcesBackConfig.cs
+++ b/Core/GameEngine/Model/Config/ResourcesBackConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: 绗簩涓栫晫
-// [ Date ]: Wednesday, January 17, 2018
+// [ Date ]: Wednesday, December 19, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -11,14 +11,15 @@
public partial class ResourcesBackConfig : ConfigBase {
- public int ID { get ; private set ; }
- public int RelatedID { get ; private set ; }
- public int CanBackTimes { get ; private set ; }
- public int NormalCostJade { get ; private set ; }
- public int VipCostJade { get ; private set ; }
- public string JadeReward { get ; private set; }
- public int CostCopper { get ; private set ; }
- public string CopperReward { get ; private set; }
+ public int ID { get ; private set ; }
+ public int RelatedID { get ; private set ; }
+ public int CanBackTimes { get ; private set ; }
+ public int NormalCostJade { get ; private set ; }
+ public int VipCostJade { get ; private set ; }
+ public string JadeReward { get ; private set; }
+ public int CostCopper { get ; private set ; }
+ public string CopperReward { get ; private set; }
+ public string JobItem { get ; private set; }
public string RewardList { get ; private set; }
public override string getKey()
@@ -29,23 +30,25 @@
public override void Parse() {
try
{
- ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
-
- RelatedID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
-
- CanBackTimes=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
-
- NormalCostJade=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
-
- VipCostJade=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0;
-
- JadeReward = rawContents[5].Trim();
-
- CostCopper=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0;
-
- CopperReward = rawContents[7].Trim();
-
- RewardList = rawContents[8].Trim();
+ ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+
+ RelatedID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
+
+ CanBackTimes=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
+
+ NormalCostJade=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
+
+ VipCostJade=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0;
+
+ JadeReward = rawContents[5].Trim();
+
+ CostCopper=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0;
+
+ CopperReward = rawContents[7].Trim();
+
+ JobItem = rawContents[8].Trim();
+
+ RewardList = rawContents[9].Trim();
}
catch (Exception ex)
{
diff --git a/Core/GameEngine/Model/Config/ResourcesBackConfig.cs.meta b/Core/GameEngine/Model/Config/ResourcesBackConfig.cs.meta
index 8707e12..0f5a7d3 100644
--- a/Core/GameEngine/Model/Config/ResourcesBackConfig.cs.meta
+++ b/Core/GameEngine/Model/Config/ResourcesBackConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 2fdee2899ae3d5d469aabc2daa6c744a
-timeCreated: 1516157851
+timeCreated: 1545210998
licenseType: Free
MonoImporter:
serializedVersion: 2
diff --git a/Core/GameEngine/Model/Player/PlayerDatas.cs b/Core/GameEngine/Model/Player/PlayerDatas.cs
index bed7ab3..cf03239 100644
--- a/Core/GameEngine/Model/Player/PlayerDatas.cs
+++ b/Core/GameEngine/Model/Player/PlayerDatas.cs
@@ -670,7 +670,7 @@
extersion.ComboDamPer = (int)value;
break;
case PlayerDataRefresh.MaxProDef:
- extersion.MaxProDef = (int)value;
+ extersion.MaxProDef = (int)value;
break;
case PlayerDataRefresh.ComboDamRate:
extersion.ComboDamPerRate = (int)value;
@@ -683,21 +683,24 @@
break;
case PlayerDataRefresh.PlayerPKState:
extersion.pkState = (int)value;
- if (hero != null)
+ if (baseData.MapID != 31220)
{
- if (value == 1)
+ if (hero != null)
{
- if (MapArea.IsOutMapArea(hero.CurMapArea, MapArea.E_Type.Neutral))
+ if (value == 1)
{
- hero.SwitchGrayName(true);
+ if (MapArea.IsOutMapArea(hero.CurMapArea, MapArea.E_Type.Neutral))
+ {
+ hero.SwitchGrayName(true);
+ }
}
- }
- else if (value == 0)
- {
- hero.SwitchGrayName(false);
- if (StatusMgr.Instance.IsExist(PlayerId, StatusMgr.Instance.redNameBuffID))
+ else if (value == 0)
{
- hero.SwitchRedName(true);
+ hero.SwitchGrayName(false);
+ if (StatusMgr.Instance.IsExist(PlayerId, StatusMgr.Instance.redNameBuffID))
+ {
+ hero.SwitchRedName(true);
+ }
}
}
}
diff --git a/Core/SDK/SDKUtility.cs b/Core/SDK/SDKUtility.cs
index 2baba10..8cd277a 100644
--- a/Core/SDK/SDKUtility.cs
+++ b/Core/SDK/SDKUtility.cs
@@ -3,6 +3,7 @@
using UnityEngine.Events;
using System.Collections;
using System.Collections.Generic;
+using System.IO;
[XLua.LuaCallCSharp]
public class SDKUtility : SingletonMonobehaviour<SDKUtility>
@@ -203,6 +204,21 @@
public void InstallAPK(string path)
{
+ if (Application.platform == RuntimePlatform.Android)
+ {
+ var dllPath1 = ResourcesPath.Instance.ExternalStorePath + "Assembly-CSharp-firstpass.dll";
+ if (File.Exists(dllPath1))
+ {
+ File.Delete(dllPath1);
+ }
+
+ var dllPath2 = ResourcesPath.Instance.ExternalStorePath + "Assembly-CSharp.dll";
+ if (File.Exists(dllPath2))
+ {
+ File.Delete(dllPath2);
+ }
+ }
+
m_Json.Clear();
m_Json["code"] = CodeU2A.InstallAPK;
m_Json["path"] = path;
diff --git a/System/AssetVersion/DownLoadWin.cs b/System/AssetVersion/DownLoadWin.cs
index cdd8e9c..b8fc83b 100644
--- a/System/AssetVersion/DownLoadWin.cs
+++ b/System/AssetVersion/DownLoadWin.cs
@@ -86,14 +86,23 @@
{
timer -= 1f;
m_ProgressSlider.value = DownLoadAndDiscompressTask.Instance.progress;
- var downLoadedSize = ((float)RemoteFile.TotalDownloadedSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
- var totalSize = ((float)DownLoadAndDiscompressTask.Instance.totalSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
- m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSize, "M", "/", totalSize, "M"));
+ var totalSizeString = ((float)DownLoadAndDiscompressTask.Instance.totalSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
+ var downLoadedSize = Mathf.Clamp(RemoteFile.TotalDownloadedSize, 0, DownLoadAndDiscompressTask.Instance.totalSize - 1);
+ var downLoadedSizeString = ((float)downLoadedSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
+
+ m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSizeString, "M", "/", totalSizeString, "M"));
}
if (Time.frameCount % 2 == 0)
{
- m_DownLoadSpeed.text = RemoteFile.DownloadSpeed;
+ if (RemoteFile.TotalDownloadedSize >= DownLoadAndDiscompressTask.Instance.totalSize)
+ {
+ m_DownLoadSpeed.text = StringUtility.Contact(UnityEngine.Random.Range(5, 10), "KB/S");
+ }
+ else
+ {
+ m_DownLoadSpeed.text = RemoteFile.DownloadSpeed;
+ }
}
}
}
diff --git a/System/AssetVersion/InGameDownLoadWin.cs b/System/AssetVersion/InGameDownLoadWin.cs
index b5e8ab9..1dbc6b2 100644
--- a/System/AssetVersion/InGameDownLoadWin.cs
+++ b/System/AssetVersion/InGameDownLoadWin.cs
@@ -108,14 +108,22 @@
{
timer -= 1f;
m_ProgressSlider.value = InGameDownLoad.Instance.progress;
- var downLoadedSize = ((float)InGameDownLoad.Instance.showDownLoadedSize / InGameDownLoad.BYTE_PER_MILLIONBYTE).ToString("f1");
- var totalSize = ((float)InGameDownLoad.Instance.showTotalSize / InGameDownLoad.BYTE_PER_MILLIONBYTE).ToString("f1");
- m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSize, "M", "/", totalSize, "M"));
+ var totalSizeString = ((float)InGameDownLoad.Instance.showTotalSize / InGameDownLoad.BYTE_PER_MILLIONBYTE).ToString("f1");
+ var downLoadedSize = Mathf.Clamp(InGameDownLoad.Instance.showDownLoadedSize, 0, InGameDownLoad.Instance.showTotalSize - 1);
+ var downLoadedSizeString = ((float)downLoadedSize / InGameDownLoad.BYTE_PER_MILLIONBYTE).ToString("f1");
+ m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSizeString, "M", "/", totalSizeString, "M"));
}
if (Time.frameCount % 2 == 0)
{
- m_DownLoadSpeed.text = RemoteFile.DownloadSpeed;
+ if (InGameDownLoad.Instance.showDownLoadedSize >= InGameDownLoad.Instance.showTotalSize)
+ {
+ m_DownLoadSpeed.text = StringUtility.Contact(UnityEngine.Random.Range(5, 10), "KB/S");
+ }
+ else
+ {
+ m_DownLoadSpeed.text = RemoteFile.DownloadSpeed;
+ }
}
}
}
diff --git a/System/ClientVersion/VersionUpdateWin.cs b/System/ClientVersion/VersionUpdateWin.cs
index 18d8640..e305a0e 100644
--- a/System/ClientVersion/VersionUpdateWin.cs
+++ b/System/ClientVersion/VersionUpdateWin.cs
@@ -99,17 +99,23 @@
m_ProgressSlider.value = VersionUtility.Instance.progress;
- var downLoadedSize = ((float)RemoteFile.TotalDownloadedSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
- var totalSize = ((float)VersionUtility.Instance.GetApkSize() * 1024 / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
- m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSize, "M", "/", totalSize, "M"));
+ var totalSizeString = ((float)VersionUtility.Instance.GetApkSize() * 1024 / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
+ var downLoadedSize = Mathf.Clamp(RemoteFile.TotalDownloadedSize, 0, VersionUtility.Instance.GetApkSize());
+ var downLoadedSizeString = ((float)downLoadedSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
-
- m_Progress.text = StringUtility.Contact((VersionUtility.Instance.progress * 100).ToString("f0"), "%");
+ m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSizeString, "M", "/", totalSizeString, "M"));
}
if (Time.frameCount % 2 == 0)
{
- m_DownLoadSpeed.text = RemoteFile.DownloadSpeed;
+ if (RemoteFile.TotalDownloadedSize >= VersionUtility.Instance.GetApkSize())
+ {
+ m_DownLoadSpeed.text = StringUtility.Contact(UnityEngine.Random.Range(5, 10), "KB/S");
+ }
+ else
+ {
+ m_DownLoadSpeed.text = RemoteFile.DownloadSpeed;
+ }
}
}
}
diff --git a/System/ClientVersion/VersionUtility.cs b/System/ClientVersion/VersionUtility.cs
index f1f0678..57c5f09 100644
--- a/System/ClientVersion/VersionUtility.cs
+++ b/System/ClientVersion/VersionUtility.cs
@@ -281,22 +281,6 @@
{
step = Step.Completed;
WindowCenter.Instance.CloseImmediately<VersionUpdateWin>();
-
- if (Application.platform == RuntimePlatform.Android)
- {
- var dllPath1 = ResourcesPath.Instance.ExternalStorePath + "Assembly-CSharp-firstpass.dll";
- if (File.Exists(dllPath1))
- {
- File.Delete(dllPath1);
- }
-
- var dllPath2 = ResourcesPath.Instance.ExternalStorePath + "Assembly-CSharp.dll";
- if (File.Exists(dllPath2))
- {
- File.Delete(dllPath2);
- }
- }
-
SDKUtility.Instance.InstallAPK(GetApkLocalUrl());
}
else
diff --git a/System/DailyQuest/ResourcesBackBoxBack.cs b/System/DailyQuest/ResourcesBackBoxBack.cs
index 109299b..04ea737 100644
--- a/System/DailyQuest/ResourcesBackBoxBack.cs
+++ b/System/DailyQuest/ResourcesBackBoxBack.cs
@@ -213,6 +213,7 @@
Button Btn1 = m_Coent.GetChild(type).Find("Image").GetComponent<Button>();
Image Image_2 = m_Coent.GetChild(type).Find("Image").GetComponent<Image>();
int ItemId = resourcesBackClass.JadeReward.item[j].ItemID;
+ ItemId = ReplaceItemID(ItemId, resourcesBackClass);//鏍规嵁鑱屼笟鏇挎崲鐗╁搧ID
string itemIcon = Config.Instance.Get<ItemConfig>(ItemId).IconKey;
Icon1.SetSprite(itemIcon);
Number1.text = packModelInterface.OnChangeCoinsUnit((ulong)ItemCount);
@@ -354,6 +355,7 @@
Button Btn1 = m_Coent.GetChild(type).Find("Image").GetComponent<Button>();
Image Image_2 = m_Coent.GetChild(type).Find("Image").GetComponent<Image>();
int ItemId = resourcesBackClass.CopperReward.item[j].ItemID;
+ ItemId = ReplaceItemID(ItemId, resourcesBackClass);//鏍规嵁鑱屼笟鏇挎崲鐗╁搧ID
string itemIcon = Config.Instance.Get<ItemConfig>(ItemId).IconKey;
var Item_2 = Config.Instance.Get<ItemConfig>(ItemId);
Image_2.SetItemBackGround(Item_2.ItemColor);
@@ -448,6 +450,19 @@
WindowCenter.Instance.Open<RechargeTipWin>();
}
}
+ private int ReplaceItemID(int itemID, ResourcesBackClass resourcesBackClass)
+ {
+ int ItemID = itemID;
+ if (resourcesBackClass.ReplaceItemID.Contains(itemID))
+ {
+ int job = PlayerDatas.Instance.baseData.Job;
+ if (job <= resourcesBackClass.ReplaceItemID.Count)
+ {
+ ItemID = resourcesBackClass.ReplaceItemID[(job - 1)];
+ }
+ }
+ return ItemID;
+ }
}
}
diff --git a/System/DailyQuest/ResourcesBackModel.cs b/System/DailyQuest/ResourcesBackModel.cs
index f5e4d2b..2a2c0eb 100644
--- a/System/DailyQuest/ResourcesBackModel.cs
+++ b/System/DailyQuest/ResourcesBackModel.cs
@@ -30,6 +30,7 @@
public ulong TjgExp;//缁忛獙(鑴辨満鎸�)
public int Times;//鍙壘鍥炴椂闂�
public string DeadTime;//姝讳骸鏃堕棿
+ public List<int> ReplaceItemID;//鏇挎崲鐨勭墿鍝両D
}
public class RewardRecovery
{
@@ -159,6 +160,7 @@
resourcesBackClass.DeadTime = BeKilledTime(TimeUtility.GetTime(vNetData.DeadTime));
resourcesBackClass.TjgExp = Experience(vNetData.Exp, vNetData.Exp1);
resourcesBackClass.RewardList = ConfigParse.GetMultipleStr(configRB.RewardList);
+ resourcesBackClass.ReplaceItemID = ReplaceItemID(configRB.JobItem);
ResourcesBackDic.Add(id, resourcesBackClass);
}
ResourcesBackRedPoint();
@@ -261,6 +263,7 @@
resourcesBackClass.CostCopper = configRB.CostCopper;
resourcesBackClass.CopperReward = LitJson.JsonMapper.ToObject<RewardRecovery>(configRB.CopperReward);
resourcesBackClass.RewardList = ConfigParse.GetMultipleStr(configRB.RewardList);
+ resourcesBackClass.ReplaceItemID = ReplaceItemID(configRB.JobItem);
ResourcesBackDic.Add(id, resourcesBackClass);
}
}
@@ -271,7 +274,21 @@
}
}
-
+ private List<int> ReplaceItemID(string str)
+ {
+ List<int> list = new List<int>();
+ if (str == string.Empty)
+ {
+ return list;
+ }
+ var _jsonData = LitJson.JsonMapper.ToObject(str);
+ for (int i = 0; i < _jsonData.Count; i++)
+ {
+ list.Add(int.Parse(_jsonData[i][0].ToString()));
+ list.Add(int.Parse(_jsonData[i][1].ToString()));
+ }
+ return list;
+ }
}
}
--
Gitblit v1.8.0