From 7b3b4dffa1dabbc40631578ecfdc8a2f1c9fb31c Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期一, 06 五月 2019 21:35:21 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs | 11 ++
System/RolePromote/RolePromoteModel.cs | 2
System/WindowJump/WindowJumpMgr.cs | 2
Utility/EnumHelper.cs | 7 +
Utility/RuntimeLogUtility.cs | 29 ++++++
Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs | 1
Fight/Actor/Skill/AttackHandler.cs | 74 ++++++++++++++++--
System/EquipTrain/EquipTrainWin.cs | 8 +-
System/MainInterfacePanel/MainRedDot.cs | 4
Fight/Actor/Status/StatusMgr.cs | 53 ++++++++++++
System/EquipTrain/EquipTrainCandidateBehaviour.cs | 4
11 files changed, 166 insertions(+), 29 deletions(-)
diff --git a/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs b/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
index 286eb17..a8fcefe 100644
--- a/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
+++ b/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
@@ -533,6 +533,7 @@
ExcuteBuildGraphic();
ExcuteBuildUI();
ExcuteBuildBuiltIn();
+ ExcuteBuildLua();
AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs b/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs
index 038e47c..2e5cd7c 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs
@@ -3,12 +3,14 @@
using System;
using Snxxz.UI;
-//01 09 服务器准备就绪#tagServerPrepareOK
+//01 09 锟斤拷锟斤拷锟斤拷准锟斤拷锟斤拷锟斤拷#tagServerPrepareOK
public class DTC0109_tagServerPrepareOK : DtcBasic
{
+ // 鍦ㄧ櫥闄�, 鍒囧浘鍚�, 鏈嶅姟绔噯澶囧畬鎴愬悗瑙﹀彂
+ public static UnityEngine.Events.UnityAction OnServerPrepareOk;
LoginModel loginModel { get { return ModelCenter.Instance.GetModel<LoginModel>(); } }
@@ -24,9 +26,14 @@
}
StageLoadTimeOutCatcher.RecordProtocol(vNetData.socketType, "0109", DateTime.Now);
- //修改技能快捷设置发包顺序
+ //锟睫改硷拷锟杰匡拷锟斤拷锟斤拷梅锟斤拷锟剿筹拷锟�
PlayerDatas.Instance.skill.CheckQuickSet();
StageLoad.Instance.UpdateServerFlag(vNetData.socketType, true);
+
+ if (OnServerPrepareOk != null)
+ {
+ OnServerPrepareOk();
+ }
}
}
diff --git a/Fight/Actor/Skill/AttackHandler.cs b/Fight/Actor/Skill/AttackHandler.cs
index b85ad16..c33d71c 100644
--- a/Fight/Actor/Skill/AttackHandler.cs
+++ b/Fight/Actor/Skill/AttackHandler.cs
@@ -337,6 +337,7 @@
bool _isMiss = false;
bool _isCrit = false;
+ bool _isZhongJi = false;
bool _isLucky = false;
bool _isZhuxianHit = false;
@@ -488,6 +489,12 @@
_aFinalHurtPer = PlayerDatas.Instance.extersion.FunalHurtPer;
_aDamagePVE = PlayerDatas.Instance.extersion.DamagePVE;
_aRealmLv = PlayerDatas.Instance.baseData.realmLevel;
+
+ if (attacker.ServerInstID == PlayerDatas.Instance.PlayerId)
+ {
+ _isZhongJi = IsZhongji(target);
+ }
+
}
else if (attacker.ActorType == GameObjType.gotNPC)
{
@@ -535,13 +542,14 @@
}
}
-
-
_isMiss = IsMiss(_hitRate, _missRate);
_isCrit = IsCrit(_aSuperHitRate);
_isLucky = IsLucky(_aLuckyHitRate);
_isZhuxianHit = IsZhuXianHit(_aZhuXianHitRate);
-
+ if (_isZhongJi)
+ {
+ _isCrit = true;
+ }
// 4014 蹇呭畾瑙﹀彂 鎸変綅閰嶇疆 1涓哄繀鍛戒腑锛�2涓哄繀鏆村嚮锛�4涓哄繀浼氬績涓�鍑�
if (skill.skillInfo.effectValue.TryGetValue(4014, out _effectValue))
{
@@ -589,7 +597,13 @@
_aLuckyHit = _isLucky ? _luckyHit : 0;
_aSuperHit = _isCrit ? _superHit : 0;
-
+ if (_isZhongJi)
+ {
+ _aSuperHit *= 2;
+#if UNITY_EDITOR
+ Debug.LogFormat("鎶�鑳�: {0} 璁$畻浼ゅ鐨勬椂鍊欏彂鐢熼噸鍑�, 鏆村嚮浼ゅ缈诲��: {1}", skill.id, _aSuperHit);
+#endif
+ }
// 4051 褰撳彂鐢熶細蹇冧激瀹虫椂, 澧炲姞浼氬績涓�鍑讳激瀹�
if (_isLucky
@@ -678,13 +692,9 @@
{
attackType = (byte)HurtAttackType.ZhuXianAtk;
}
- else if (_isLucky
-#if UNITY_EDITOR
- || RuntimeLogUtility.s_ForceLuckHit
-#endif
- )
+ else if (_isZhongJi)
{
- attackType = (byte)HurtAttackType.LuckyHit;
+ attackType = (byte)HurtAttackType.ThumpHit;
}
else if (_isCrit
#if UNITY_EDITOR
@@ -693,6 +703,14 @@
)
{
attackType = (byte)HurtAttackType.SuperHit;
+ }
+ else if (_isLucky
+#if UNITY_EDITOR
+ || RuntimeLogUtility.s_ForceLuckHit
+#endif
+ )
+ {
+ attackType = (byte)HurtAttackType.LuckyHit;
}
else
{
@@ -705,6 +723,42 @@
return hit * 1f / (hit + miss) - Random.Range(0f, 1f) < 0;
}
+ private static bool IsZhongji(GActorFight target)
+ {
+ var _hero = PlayerDatas.Instance.hero;
+ if (_hero == null
+ || target == null)
+ {
+ return false;
+ }
+
+ int _rate = 0;
+ var _dict = StatusMgr.Instance.ZhongJiDict;
+ foreach (var _info in _dict.Values)
+ {
+ if (_info.onlyFirstTarget)
+ {
+ if (_hero.SelectTarget.ServerInstID == target.ServerInstID)
+ {
+ _rate += _info.rate;
+ }
+ }
+ else
+ {
+ _rate += _info.rate;
+ }
+ }
+
+#if UNITY_EDITOR
+ var _random = Random.Range(0, 10000);
+ var _result = _random < _rate;
+ // Debug.LogFormat("鏀诲嚮鐩爣: {3}, 閲嶅嚮姒傜巼涓�: {0}, 闅忔満涓�: {1}, 鏄惁鍙互閲嶅嚮: {2}", _rate, _random, _result, target.ServerInstID);
+ return _result;
+#else
+ return Random.Range(0, 10000) < _rate;
+#endif
+ }
+
private static bool IsCrit(int superHitRate)
{
return Random.Range(0, 10000) < superHitRate;
diff --git a/Fight/Actor/Status/StatusMgr.cs b/Fight/Actor/Status/StatusMgr.cs
index 02c1065..c718a26 100644
--- a/Fight/Actor/Status/StatusMgr.cs
+++ b/Fight/Actor/Status/StatusMgr.cs
@@ -1,4 +1,5 @@
-锘縰sing System.Collections.Generic;
+锘縰sing System;
+using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
@@ -6,10 +7,18 @@
[XLua.LuaCallCSharp]
public class StatusMgr : SingletonMonobehaviour<StatusMgr>
{
+ public struct ZhongJiInfo
+ {
+ public int rate;
+ public bool onlyFirstTarget;
+ }
+
public static event UnityAction<int> OnGainStatus;
public static event UnityAction<float> OnGainCantCastSkillStatus;
public static event UnityAction OnReleaseCantCastSkillStatus;
public static event UnityAction<int> onReceiveStatus;
+
+ public Dictionary<int, ZhongJiInfo> ZhongJiDict = new Dictionary<int, ZhongJiInfo>();
private Dictionary<uint, List<Status_Base>> m_StatusDict = null;
private List<Status_Base> m_AllStatus = null;
@@ -21,9 +30,12 @@
public int redNameBuffID;
[HideInInspector]
public int yellowNameBuffID;
+ public int ZhongJiRate;
public void Init()
{
+ DTC0109_tagServerPrepareOK.OnServerPrepareOk += OnServerPrepareOk;
+
if (m_StatusDict == null)
{
m_StatusDict = new Dictionary<uint, List<Status_Base>>();
@@ -68,6 +80,12 @@
}
}
+ private void OnServerPrepareOk()
+ {
+ ReleaseActor(PlayerDatas.Instance.baseData.PlayerID);
+ ZhongJiDict.Clear();
+ }
+
public void Request(H0605_tagObjAddBuff h0605)
{
// 淇敼鐩爣鐘舵��
@@ -86,6 +104,8 @@
_actor.ActorInfo.status4012[(byte)_effectValue.value1] = _count;
}
}
+
+ AddZjInfoIfExist(h0605.SkillID);
Status_Base _status = Get(h0605.ObjID, h0605.SkillID);
@@ -253,6 +273,11 @@
}
_actor.ActorInfo.status4012[(byte)_effectValue.value1] = _count;
}
+ }
+
+ if (ZhongJiDict.ContainsKey(h0606.SkillID))
+ {
+ ZhongJiDict.Remove(h0606.SkillID);
}
Status_Base _status = Get(h0606.ObjID, h0606.SkillID);
@@ -553,7 +578,7 @@
private bool IsMockingBuff(int id)
{
- SkillConfig _config = SkillConfig.Get(id);
+ var _config = SkillConfig.Get(id);
if (_config != null
&& ((_config.Effect1 == 4012 && _config.EffectValue11 == 6)
@@ -569,6 +594,30 @@
return false;
}
+ private void AddZjInfoIfExist(int id)
+ {
+ var _info = SkillHelper.Instance.Get(id);
+ if (_info == null)
+ {
+ return;
+ }
+
+ if (_info.effectValue.ContainsKey(4526))
+ {
+ var _zjInfo = new ZhongJiInfo
+ {
+ rate = _info.effectValue[4526].value1,
+ onlyFirstTarget = _info.effectValue[4526].value2 == 1
+ };
+
+ ZhongJiDict[id] = _zjInfo;
+
+ // #if UNITY_EDITOR
+ // Debug.LogFormat("鏀跺埌涓�涓鍔犻噸鍑绘鐜囩殑BUFF: {0}, 澧炲姞: {1}鐨勬鐜�", id, _zjInfo.rate);
+ // #endif
+ }
+ }
+
private bool IsPolymorch(int id)
{
SkillConfig _config = SkillConfig.Get(id);
diff --git a/System/EquipTrain/EquipTrainCandidateBehaviour.cs b/System/EquipTrain/EquipTrainCandidateBehaviour.cs
index 1b8dd72..0cf1cce 100644
--- a/System/EquipTrain/EquipTrainCandidateBehaviour.cs
+++ b/System/EquipTrain/EquipTrainCandidateBehaviour.cs
@@ -68,7 +68,7 @@
m_ItemCell.button.enabled = false;
m_Description1.text = item.config.ItemName;
m_Description1.color = UIHelper.GetUIColor(item.config.ItemColor, true);
- m_Description2.text = string.Format("娲楃粌绛夌骇锛歿0}绾�", this.candidate.trainLevel.Fetch());
+ m_Description2.text = string.Format("娲楃偧绛夌骇锛歿0}绾�", this.candidate.trainLevel.Fetch());
m_Description2.color = UIHelper.GetUIColor(TextColType.NavyBrown, true);
var starLevel = this.candidate.starLevel.Fetch();
@@ -90,7 +90,7 @@
var trainLevel = this.candidate.trainLevel.Fetch();
if (!string.IsNullOrEmpty(this.candidate.equipGuid.value))
{
- m_Description2.text = string.Format("娲楃粌绛夌骇锛歿0}绾�", trainLevel);
+ m_Description2.text = string.Format("娲楃偧绛夌骇锛歿0}绾�", trainLevel);
m_Description2.color = UIHelper.GetUIColor(TextColType.NavyBrown, true);
}
}
diff --git a/System/EquipTrain/EquipTrainWin.cs b/System/EquipTrain/EquipTrainWin.cs
index 0dcc92d..a90f7ad 100644
--- a/System/EquipTrain/EquipTrainWin.cs
+++ b/System/EquipTrain/EquipTrainWin.cs
@@ -170,7 +170,7 @@
if (force || model.equipTrainLevel.dirty)
{
var trainLevel = model.equipTrainLevel.Fetch();
- m_TrainLevel.text = string.Format("{0}绾ф礂缁�", trainLevel);
+ m_TrainLevel.text = string.Format("{0}绾ф礂鐐�", trainLevel);
}
if (force || model.equipTrainMaxLevel.dirty)
@@ -180,16 +180,16 @@
if (maxTrain < 0)
{
- m_MaxTrainLevel.text = "绌挎埓瑁呭鍙礂缁�";
+ m_MaxTrainLevel.text = "绌挎埓瑁呭鍙礂鐐�";
}
else if (maxTrain > 0)
{
var star = starModel.GetEquipStarLevel(equipPosition);
- m_MaxTrainLevel.text = string.Format("{0}鏄熻澶囨渶楂樺彲娲楃粌鑷硔1}绾�", star, maxTrain);
+ m_MaxTrainLevel.text = string.Format("{0}鏄熻澶囨渶楂樺彲娲楃偧鑷硔1}绾�", star, maxTrain);
}
else
{
- m_MaxTrainLevel.text = "鎻愬崌瑁呭鏄熺骇鍙礂缁�";
+ m_MaxTrainLevel.text = "鎻愬崌瑁呭鏄熺骇鍙礂鐐�";
}
}
diff --git a/System/MainInterfacePanel/MainRedDot.cs b/System/MainInterfacePanel/MainRedDot.cs
index b33cc49..3543b7b 100644
--- a/System/MainInterfacePanel/MainRedDot.cs
+++ b/System/MainInterfacePanel/MainRedDot.cs
@@ -12,7 +12,7 @@
[XLua.LuaCallCSharp]
public class MainRedDot : Singleton<MainRedDot> {
-
+
public const int RedPoint_key = 1;
public const int FAIRY_REDPOINT_KEY1 = 107;
@@ -56,7 +56,7 @@
public Redpoint redPointDepotFunc = new Redpoint(RedPoint_MainPackKey, RedPoint_DepotFuncKey);
#endregion
- #region 娲楃粌绾㈢偣
+ #region 娲楃偧绾㈢偣
public const int RedPoint_WashFuncKey = 10605;
public Redpoint redPointWashFunc = new Redpoint(RedPoint_key1,RedPoint_WashFuncKey);
#endregion
diff --git a/System/RolePromote/RolePromoteModel.cs b/System/RolePromote/RolePromoteModel.cs
index 9b800e8..ba824cc 100644
--- a/System/RolePromote/RolePromoteModel.cs
+++ b/System/RolePromote/RolePromoteModel.cs
@@ -355,7 +355,7 @@
}
#endregion
- #region 娲楃粌
+ #region 娲楃偧
#endregion
diff --git a/System/WindowJump/WindowJumpMgr.cs b/System/WindowJump/WindowJumpMgr.cs
index 715b6ba..b9b8d1d 100644
--- a/System/WindowJump/WindowJumpMgr.cs
+++ b/System/WindowJump/WindowJumpMgr.cs
@@ -1401,7 +1401,7 @@
StrengthFunc4 = 15,//娲楃偧
EquipLowSuit = 241, //鏅�氬瑁呯晫闈�
StrengthFunc5 = 16,
- EquipWashType2 = 239, //瑁呭娲楃粌鐣岄潰
+ EquipWashType2 = 239, //瑁呭娲楃偧鐣岄潰
ComposeFunc1 = 17,
ComposeFunc2 = 18,
ComposeFunc3 = 19,
diff --git a/Utility/EnumHelper.cs b/Utility/EnumHelper.cs
index f89f0bf..6941549 100644
--- a/Utility/EnumHelper.cs
+++ b/Utility/EnumHelper.cs
@@ -1095,7 +1095,7 @@
Stone,//瀹濈煶
Suit,//濂楄
Wing,//缈呰唨
- Wash,//娲楃粌
+ Wash,//娲楃偧
Pet,//鐏靛疇
Horse,//鍧愰獞
Prestige,//澧冪晫
@@ -1196,7 +1196,8 @@
/** 缁堟瀬鏂╂潃 */
FinalKill,
/*鑷村懡涓�鍑�*/
- DeadlyHit
+ DeadlyHit,
+ ThumpHit,// 閲嶅嚮
}
public enum DungeonTargetType
@@ -1375,7 +1376,7 @@
strength, //寮哄寲
inlay, //闀跺祵
- train,//娲楃粌
+ train,//娲楃偧
star,//鍗囨槦
}
diff --git a/Utility/RuntimeLogUtility.cs b/Utility/RuntimeLogUtility.cs
index a8fa1a6..0081df4 100644
--- a/Utility/RuntimeLogUtility.cs
+++ b/Utility/RuntimeLogUtility.cs
@@ -193,7 +193,8 @@
private Vector2 _end;
private Vector3 _start3;
private Vector3 _end3;
- private int _triggerID = 8;
+ private int _triggerID = 11204008;
+ private int _clientNpcSID;
public override void OnInspectorGUI()
{
@@ -205,6 +206,11 @@
{
// ClientSceneManager.Instance.TriggerTest(_triggerID);
// GA_NpcFunc.SetNpcFuncVisible(10104003, true);
+ Vector3 ppp;
+ if (ClientSceneManager.Instance.AAA(PlayerDatas.Instance.hero.Pos, new Vector3(6, 0, 39.5f), out ppp))
+ {
+ Debug.Log("鏈�缁�....PPP: " + ppp);
+ }
}
EditorGUILayout.EndHorizontal();
@@ -215,7 +221,8 @@
{
// Debug.Log(PathFinder.WalkAble(_start3, _end3));
// MapTransferUtility.Instance.MoveToNPC(10904012);
- MapTransferUtility.Instance.MoveToLocalMapPosition(new Vector2(_end3.x, _end3.z));
+ // MapTransferUtility.Instance.MoveToLocalMapPosition(new Vector2(_end3.x, _end3.z));
+ MapTransferUtility.Instance.MoveToNPC(_triggerID);
}
EditorGUILayout.LabelField("Log瀛樺偍璺緞", RuntimeLogUtility.s_LogPath);
@@ -298,6 +305,24 @@
// AdventureStage.Instance.Exit();
ClientSceneManager.Instance.ExitClientFightMode();
}
+ EditorGUILayout.BeginHorizontal();
+ _clientNpcSID = EditorGUILayout.IntField("NPC SID", _clientNpcSID);
+
+ if (GUILayout.Button("鏄剧ずNPC淇℃伅"))
+ {
+ var _npc = GAMgr.Instance.GetBySID((uint)_clientNpcSID) as GActorNpcFight;
+ if (_npc != null)
+ {
+ Debug.LogFormat("{0} => 琛�閲�: {1}/{2}, 鏀诲嚮: {3}-{4}, 闃插尽: {5}",
+ _clientNpcSID,
+ _npc.ActorInfo.RealHp,
+ _npc.ActorInfo.RealMaxHp,
+ _npc.NpcConfig.MinAtk,
+ _npc.NpcConfig.MaxAtk,
+ _npc.NpcConfig.Def);
+ }
+ }
+ EditorGUILayout.EndHorizontal();
_navChkPos = EditorGUILayout.Vector3Field("妫�娴嬬偣", _navChkPos);
--
Gitblit v1.8.0