From bc7abe111d69d8a26b06be583ca4deb39bf08c67 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 11 一月 2019 11:25:00 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/CrossServerBoss/CrossServerBossModel.cs | 4 +-
Fight/GameActor/GA_Player.cs | 35 ++++++++++++++---
UI/Common/UI3DShowHero.cs | 23 ++++++-----
System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs | 20 ++++++++++
Core/GameEngine/Login/Launch.cs | 18 +++++----
System/Team/TeamModel.cs | 10 ++++-
Core/GameEngine/Login/LaunchPostProcess.cs | 2
Fight/GameActor/GActorPlayerBase.cs | 4 ++
8 files changed, 86 insertions(+), 30 deletions(-)
diff --git a/Core/GameEngine/Login/Launch.cs b/Core/GameEngine/Login/Launch.cs
index ea7af74..ac50e21 100644
--- a/Core/GameEngine/Login/Launch.cs
+++ b/Core/GameEngine/Login/Launch.cs
@@ -164,9 +164,16 @@
IEnumerator Co_Lanuch()
{
+ var startTime = Time.time;
+ var progressBuf = progress;
+ var timer = 0f;
+ var duration = 1f;
+
#if !UNITY_EDITOR
while (!SDKUtility.Instance.InitFinished)
{
+ timer += Time.deltaTime;
+ progress = Mathf.Clamp(progressBuf + timer / duration * 0.1f, progressBuf, progressBuf + 0.1f);
yield return null;
}
#endif
@@ -178,15 +185,10 @@
DebugEx.LogFormat("鑾峰緱鏈哄櫒淇℃伅锛歝pu {0}----鍐呭瓨 {1}", cpu, memory);
- var startTime = Time.time;
OperationLogCollect.Instance.RecordLauchEvent(1);
OperationLogCollect.Instance.RecordEvent(1);
SystemSetting.Instance.LetFPSUnLimit();
Config.Instance.RegisterGlobalEvent();
-
- var progressBuf = progress;
- var timer = 0f;
- var duration = 1f;
PackageRegedit.Init();
GameNotice.OpenGameNotice();
@@ -199,7 +201,7 @@
case InstalledAsset.IngoreDownLoad:
progressBuf = progress;
timer = 0f;
- duration = 100f;
+ duration = 30f;
if (!SDKUtility.Instance.AssetCopyFinished)
{
@@ -208,7 +210,7 @@
while (!SDKUtility.Instance.AssetCopyFinished)
{
timer += Time.deltaTime;
- progress = Mathf.Clamp(progressBuf + timer / duration * 0.6f, progressBuf, progressBuf + 0.6f);
+ progress = Mathf.Clamp(progressBuf + timer / duration * 0.7f, progressBuf, progressBuf + 0.7f);
yield return null;
}
}
@@ -219,7 +221,7 @@
var decompressProgress = AssetDeCompressTask.DecompressAync(ResourcesPath.Instance.ExternalStorePath);
while (!decompressProgress.done)
{
- progress = progressBuf + decompressProgress.progress * 0.3f;
+ progress = progressBuf + decompressProgress.progress * 0.2f;
yield return null;
}
diff --git a/Core/GameEngine/Login/LaunchPostProcess.cs b/Core/GameEngine/Login/LaunchPostProcess.cs
index d0f43f4..4baacf4 100644
--- a/Core/GameEngine/Login/LaunchPostProcess.cs
+++ b/Core/GameEngine/Login/LaunchPostProcess.cs
@@ -11,7 +11,7 @@
bool m_Completed = false;
public bool completed { get { return m_Completed; } set { m_Completed = value; } }
- public float progress { get { return Config.Instance.GetProgress(); } }
+ public float progress { get { return Mathf.Clamp01((Time.time - startTime) * 0.1f + Config.Instance.GetProgress() * 0.7f); } }
float startTime = 0f;
diff --git a/Fight/GameActor/GA_Player.cs b/Fight/GameActor/GA_Player.cs
index 04ce262..4b22b7d 100644
--- a/Fight/GameActor/GA_Player.cs
+++ b/Fight/GameActor/GA_Player.cs
@@ -70,15 +70,22 @@
itemID = _equipInfo.ItemID
};
- _userDataDict = ConfigParse.Analysis(_equipInfo.UserData);
- if (_userDataDict.ContainsKey(25))
+ if (_equipInfo.UserDataLen > 2)
{
- _info.suitLV_1 = (byte)_userDataDict[25][0];
- _info.suitLV_2 = (byte)_userDataDict[25][1];
+ _userDataDict = ConfigParse.Analysis(_equipInfo.UserData);
+ if (_userDataDict != null && _userDataDict.ContainsKey(25))
+ {
+ _info.suitLV_1 = (byte)_userDataDict[25][0];
+ _info.suitLV_2 = (byte)_userDataDict[25][1];
+ }
}
m_EquipDict[_equipInfo.Place] = _info;
- if (_equipInfo.Place == (byte)RoleEquipType.retClothes)
+ if (_equipInfo.Place == (byte)RoleEquipType.retFashionClothes)
+ {
+ SwitchClothes(_equipInfo.ItemID, _equipInfo.Place);
+ }
+ else if (_equipInfo.Place == (byte)RoleEquipType.retClothes)
{
SwitchClothes(_equipInfo.ItemID);
}
@@ -94,15 +101,29 @@
for (int i = 0; i < m_H0434.EquipCount; ++i)
{
_equipInfo = m_H0434.EquipInfo[i];
- if (_equipInfo.Place == (int)RoleEquipType.retWeapon)
+ if (_equipInfo.Place == (int)RoleEquipType.retFashionWeapon)
+ {
+ SwitchWeapon(_equipInfo.ItemID, _equipInfo.Place);
+ continue;
+ }
+ else if (_equipInfo.Place == (int)RoleEquipType.retWeapon)
{
SwitchWeapon(_equipInfo.ItemID);
+ continue;
+ }
+
+ if (_equipInfo.Place == (int)RoleEquipType.retFashionWeapon2)
+ {
+ SwitchSecondary(_equipInfo.ItemID, _equipInfo.Place);
+ continue;
}
else if (_equipInfo.Place == (int)RoleEquipType.retWeapon2)
{
SwitchSecondary(_equipInfo.ItemID);
+ continue;
}
- else if (_equipInfo.Place == (int)RoleEquipType.retWing)
+
+ if (_equipInfo.Place == (int)RoleEquipType.retWing)
{
SwitchWing(_equipInfo.ItemID);
}
diff --git a/Fight/GameActor/GActorPlayerBase.cs b/Fight/GameActor/GActorPlayerBase.cs
index c739b94..a4dd02e 100644
--- a/Fight/GameActor/GActorPlayerBase.cs
+++ b/Fight/GameActor/GActorPlayerBase.cs
@@ -641,6 +641,10 @@
}
int _resID = JobSetup.BaseEquip[2];
+ if(JobSetup.Job == 1)
+ {
+ _resID = JobSetup.BaseEquip[0] + 2900;
+ }
EquipInfo _equipInfo;
diff --git a/System/CrossServerBoss/CrossServerBossModel.cs b/System/CrossServerBoss/CrossServerBossModel.cs
index 0a0c5d1..1413279 100644
--- a/System/CrossServerBoss/CrossServerBossModel.cs
+++ b/System/CrossServerBoss/CrossServerBossModel.cs
@@ -399,7 +399,7 @@
private void OnFunctionStateChange(int id)
{
- if (id == 160)
+ if (id == 162)
{
UpdateRedpoint();
}
@@ -407,7 +407,7 @@
private void UpdateRedpoint()
{
- if (!FuncOpen.Instance.IsFuncOpen(160))
+ if (!FuncOpen.Instance.IsFuncOpen(162))
{
redpoint.count = 0;
}
diff --git a/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs b/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
index daf61d6..83bd4f2 100644
--- a/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
+++ b/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
@@ -36,6 +36,7 @@
public DateTime roundEndTime { get; private set; }
StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
public string LocalSaveThirdTypeKey = string.Empty;
+ private int recordDataMapId;
public override void Init()
{
IsMatching = false;
@@ -45,6 +46,7 @@
public void OnBeforePlayerDataInitialize()
{
+ StageManager.Instance.onStageLoadFinish -= OnLoadMapFinish;
storeModel.RefreshBuyShopLimitEvent -= UpdateBuyShop;
TimeUtility.OnServerOpenDayRefresh -= UpdateServerOpenDay;
PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= UpdatePlayerData;
@@ -72,6 +74,7 @@
public void OnPlayerLoginOk()
{
+ StageManager.Instance.onStageLoadFinish += OnLoadMapFinish;
storeModel.RefreshBuyShopLimitEvent += UpdateBuyShop;
TimeUtility.OnServerOpenDayRefresh += UpdateServerOpenDay;
PlayerDatas.Instance.PlayerDataRefreshInfoEvent += UpdatePlayerData;
@@ -81,6 +84,7 @@
rewardModel.CrossRealmPKAwardStateUpdate += UpdateDayAwardState;
CrossServerOneVsOnePlayerInfo.Instance.UpdatePlayerInfoEvent += UpdateDayAwardState;
dungeonModel.updateMissionEvent += UpdateFBHelp;
+ recordDataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
UpdateServerOpenDay();
UpdateDayAwardState();
if(IsMatching && CrossServerOneVsOnePKSeason.Instance.InOpenTime())
@@ -106,6 +110,22 @@
oneVsOneHistoryDict.Clear();
}
+
+ private void OnLoadMapFinish()
+ {
+ var dataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
+ if(recordDataMapId == CrossServerDataMapId
+ && dataMapId != CrossServerDataMapId)
+ {
+ var pkSeason = CrossServerOneVsOnePKSeason.Instance;
+ if(pkSeason.IsEnterCrossServer())
+ {
+ WindowCenter.Instance.Open<CrossServerWin>();
+ }
+ }
+ recordDataMapId = dataMapId;
+ }
+
private void UpdateMinute()
{
UpdateCrossMatchRedpoint();
diff --git a/System/Team/TeamModel.cs b/System/Team/TeamModel.cs
index 2aa8b48..7bd49fa 100644
--- a/System/Team/TeamModel.cs
+++ b/System/Team/TeamModel.cs
@@ -553,6 +553,12 @@
public void RequestAutoMatchTeam(TeamMission _mission)
{
+ if (CrossServerUtility.IsCrossServer())
+ {
+ SysNotifyMgr.Instance.ShowTip("CrossMatching3");
+ return;
+ }
+
if (myTeam.inTeam && !myTeam.iamCaptainer)
{
SysNotifyMgr.Instance.ShowTip("DungeonGroupAutoOnlyLeader");
@@ -765,7 +771,7 @@
public void OnTeamClear(H0905_tagTeamClear _serverInfo)
{
- if (_serverInfo.socketType==GameNetSystem.SocketType.CrossSever)
+ if (_serverInfo.socketType == GameNetSystem.SocketType.CrossSever)
{
return;
}
@@ -789,7 +795,7 @@
public void OnTeammateLeave(H0906_tagPlayerLeaveTeamMsg _leaveTeam)
{
- if (_leaveTeam.socketType==GameNetSystem.SocketType.CrossSever)
+ if (_leaveTeam.socketType == GameNetSystem.SocketType.CrossSever)
{
return;
}
diff --git a/UI/Common/UI3DShowHero.cs b/UI/Common/UI3DShowHero.cs
index 561da56..842aea6 100644
--- a/UI/Common/UI3DShowHero.cs
+++ b/UI/Common/UI3DShowHero.cs
@@ -73,13 +73,16 @@
var secondaryResId = 0;
if (secondaryId == 0)
{
- if (this.job == 1)
+ if (data.fashionClothesId < 0)
{
- secondaryResId = this.clothesId + 2900;
- }
- else
- {
- secondaryResId = jobConfig.BaseEquip[2];
+ if (this.job == 1)
+ {
+ secondaryResId = this.clothesId + 2900;
+ }
+ else
+ {
+ secondaryResId = jobConfig.BaseEquip[2];
+ }
}
}
else
@@ -91,7 +94,7 @@
PutOnSecondary(job, secondaryResId);
var extraSecondaryId = 0;
- if (data.job == 1 && data.fashionSecondaryId > 0)
+ if (data.job == 1 && data.fashionSecondaryId > 0 && data.fashionClothesId == 0)
{
if (data.clothesId == 0)
{
@@ -429,7 +432,7 @@
private void PutOnExtraSecondary(int job, int extraSecondaryId)
{
- var oldSecondary = extraSecondaryId;
+ var oldSecondary = this.extraSecondaryId;
if (oldSecondary == extraSecondaryId)
{
return;
@@ -459,10 +462,10 @@
if (prefab)
{
pool = GameObjectPoolManager.Instance.RequestPool(prefab);
- secondaryModel = pool.Request();
+ extraSecondaryModel = pool.Request();
var parent = this.clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[this.job - 1]);
- secondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
+ extraSecondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
}
}
--
Gitblit v1.8.0