From e43df5edfae9d2f6e53df1f9c2cd88469cbf35d8 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期三, 05 十二月 2018 15:22:46 +0800
Subject: [PATCH] 5224 子 【1.3.100】游戏帧数优化(一) / 【1.3.100】【前端】游戏帧数优化(一)
---
System/GeneralConfig/GeneralDefine.cs | 28 ++
Fight/GameActor/GAMgr.cs | 68 ++++++++
Fight/GameActor/GA_Player.cs | 10
Fight/GameActor/GActorNpcFight.cs | 8
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0434_tagAreaPlayerAppearEx.cs | 5
Fight/GameActor/BattleEffectPlayRule.cs | 131 ++++++++++++----
Fight/GameActor/GA_Pet.cs | 21 ++
Lua/Gen/BattleEffectPlayRuleWrap.cs | 140 +++++++++++++++--
Lua/Gen/BattleEffectPlayRuleWrap.cs.meta | 2
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0405_tagPlayerDisappear.cs | 5
Fight/GameActor/GActorPlayerBase.cs | 39 +++-
11 files changed, 367 insertions(+), 90 deletions(-)
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0405_tagPlayerDisappear.cs b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0405_tagPlayerDisappear.cs
index 4d70954..7ba66d9 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0405_tagPlayerDisappear.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0405_tagPlayerDisappear.cs
@@ -24,10 +24,7 @@
for (int i = 0; i < vNetData.Players.Length; ++i)
{
- if (BattleEffectPlayRule.Instance.sortPlayerList.Contains(vNetData.Players[i]))
- {
- BattleEffectPlayRule.Instance.sortPlayerList.Remove(vNetData.Players[i]);
- }
+ BattleEffectPlayRule.Instance.RemovePlayer(vNetData.Players[i]);
_actor = GAMgr.Instance.GetBySID(vNetData.Players[i]);
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0434_tagAreaPlayerAppearEx.cs b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0434_tagAreaPlayerAppearEx.cs
index 5d3dabd..3a48b55 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0434_tagAreaPlayerAppearEx.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0434_tagAreaPlayerAppearEx.cs
@@ -25,10 +25,7 @@
// 寮傚父
}
- if (!BattleEffectPlayRule.Instance.sortPlayerList.Contains(vNetData.PlayerID))
- {
- BattleEffectPlayRule.Instance.sortPlayerList.Add(vNetData.PlayerID);
- }
+ BattleEffectPlayRule.Instance.AddPlayer(vNetData.PlayerID);
// 绂荤嚎鐜╁
if (vNetData.State == 1)
diff --git a/Fight/GameActor/BattleEffectPlayRule.cs b/Fight/GameActor/BattleEffectPlayRule.cs
index c3321b5..ce36ecf 100644
--- a/Fight/GameActor/BattleEffectPlayRule.cs
+++ b/Fight/GameActor/BattleEffectPlayRule.cs
@@ -3,9 +3,27 @@
[XLua.LuaCallCSharp]
public class BattleEffectPlayRule : Singleton<BattleEffectPlayRule>
-
{
- public List<uint> sortPlayerList = new List<uint>();
+ public readonly List<uint> sortPlayerList = new List<uint>();
+
+ public void AddPlayer(uint id)
+ {
+ if (sortPlayerList.Contains(id))
+ {
+ return;
+ }
+ sortPlayerList.Add(id);
+ SortList();
+ }
+
+ public void RemovePlayer(uint id)
+ {
+ if (sortPlayerList.Contains(id))
+ {
+ sortPlayerList.Remove(id);
+ }
+ SortList();
+ }
private int limit
{
@@ -13,54 +31,101 @@
{
if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.High)
{
- return GeneralDefine.highQualityCount;
+ return GeneralDefine.highQualityEffectCount;
}
else if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.Medium)
{
- return GeneralDefine.medQualityCount;
+ return GeneralDefine.medQualityEffectCount;
}
else
{
- return GeneralDefine.lowQualityCount;
+ return GeneralDefine.lowQualityEffectCount;
+ }
+ }
+ }
+
+ public int petLimit
+ {
+ get
+ {
+ if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.High)
+ {
+ return GeneralDefine.highQualityPetCount;
+ }
+ else if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.Medium)
+ {
+ return GeneralDefine.medQualityPetCount;
+ }
+ else
+ {
+ return GeneralDefine.lowQualityPetCount;
+ }
+ }
+ }
+
+ public int guardLimit
+ {
+ get
+ {
+ if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.High)
+ {
+ return GeneralDefine.highQualityGuardCount;
+ }
+ else if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.Medium)
+ {
+ return GeneralDefine.medQualityGuardCount;
+ }
+ else
+ {
+ return GeneralDefine.lowQualityGuardCount;
}
}
}
public float timeEscape;
+ private void SortList()
+ {
+ GA_Hero _hero = PlayerDatas.Instance.hero;
+ if (_hero == null)
+ {
+ return;
+ }
+
+ sortPlayerList.Sort((id1, id2) =>
+ {
+ GActor _actor1 = GAMgr.Instance.GetBySID(id1);
+ GActor _actor2 = GAMgr.Instance.GetBySID(id2);
+
+ float _dis1 = 0f;
+ float _dis2 = 0f;
+
+ if (_actor1 != null)
+ {
+ _dis1 = MathUtility.DistanceSqrtXZ(_hero.Pos, _actor1.Pos);
+ }
+
+ if (_actor2 != null)
+ {
+ _dis2 = MathUtility.DistanceSqrtXZ(_hero.Pos, _actor2.Pos);
+ }
+
+ return _dis2 > _dis1 ? -1 : 1;
+ });
+ }
+
public void Update()
{
if (Time.realtimeSinceStartup - timeEscape > .5f)
{
- GA_Hero _hero = PlayerDatas.Instance.hero;
- if (_hero == null)
- {
- return;
- }
-
- sortPlayerList.Sort((id1, id2) =>
- {
- GActor _actor1 = GAMgr.Instance.GetBySID(id1);
- GActor _actor2 = GAMgr.Instance.GetBySID(id2);
-
- float _dis1 = 0f;
- float _dis2 = 0f;
-
- if (_actor1 != null)
- {
- _dis1 = MathUtility.DistanceSqrtXZ(_hero.Pos, _actor1.Pos);
- }
-
- if (_actor2 != null)
- {
- _dis2 = MathUtility.DistanceSqrtXZ(_hero.Pos, _actor2.Pos);
- }
-
- return _dis2 > _dis1 ? -1 : 1;
- });
-
+ SortList();
timeEscape = Time.realtimeSinceStartup;
}
+ }
+
+ public int GetIndex(uint sid)
+ {
+ return sortPlayerList.IndexOf(sid);
}
public bool CanPlay(uint sid)
@@ -71,7 +136,7 @@
return false;
}
- if(_hero.ServerInstID == sid)
+ if (_hero.ServerInstID == sid)
{
return true;
}
diff --git a/Fight/GameActor/GAMgr.cs b/Fight/GameActor/GAMgr.cs
index ffbc0e4..a4dc4fe 100644
--- a/Fight/GameActor/GAMgr.cs
+++ b/Fight/GameActor/GAMgr.cs
@@ -96,6 +96,74 @@
SystemSetting.Instance.playerSyncCountChangeEvent += OnPlayerSyncCountChange;
SystemSetting.Instance.OnSettingChanged += OnSettingChanged;
+ SystemSetting.Instance.qualityLevelChangeEvent += OnQualityLevelChange;
+ }
+ }
+
+ private void OnQualityLevelChange()
+ {
+ List<GActor> _list = GetTypeList(E_ActorClassType.Pet);
+
+ if (_list == null || _list.Count == 0)
+ {
+ return;
+ }
+
+ //Debug.LogFormat("鍏辨湁: {0} 鍙疇鐗�", _petList.Count);
+ GA_Player _player = null;
+ foreach (var _pet in _list)
+ {
+ var _parentID = _pet.ActorInfo.ownerSID;
+ if (_parentID == PlayerDatas.Instance.PlayerId)
+ {
+ continue;
+ }
+
+ _player = GetBySID(_parentID) as GA_Player;
+ if (_player == null || !_player.ShowOrHide)
+ {
+ _pet.ShowOrHideModel(false);
+ //Debug.LogFormat("瀹犵墿: {0} 鐨勬嫢鏈夎��: {1} 涓嶅彲瑙�, 杩欓噷闅愯棌.", _pet.ServerInstID, _parentID);
+ continue;
+ }
+
+ var _index = BattleEffectPlayRule.Instance.GetIndex(_parentID);
+ if (_index != -1 && _index < BattleEffectPlayRule.Instance.petLimit)
+ {
+ _pet.ShowOrHideModel(true);
+ //Debug.LogFormat("瀹犵墿: {0} 鐨勬嫢鏈夎��: {1} 鍦ㄥ垪琛ㄤ腑涓斾綅浜�: {2}, 灏忎簬闄愬埗鏁伴噺: {3}", _pet.ServerInstID, _parentID, _index, BattleEffectPlayRule.Instance.petLimit);
+ }
+ else
+ {
+ _pet.ShowOrHideModel(false);
+ //Debug.LogFormat("瀹犵墿: {0} 鐨勬嫢鏈夎��: {1} 鍦ㄥ垪琛ㄤ腑涓斾綅浜�: {2}, 澶т簬闄愬埗鏁伴噺: {3}", _pet.ServerInstID, _parentID, _index, BattleEffectPlayRule.Instance.petLimit);
+ }
+ }
+
+ _list = GetTypeList(E_ActorClassType.Player);
+
+ //Debug.LogFormat("鍏辨湁: {0} 鍙畧鎶�", _list.Count);
+ foreach (var _chkPlayer in _list)
+ {
+ _player = _chkPlayer as GA_Player;
+ if (_chkPlayer == null || !_chkPlayer.ShowOrHide)
+ {
+ _player.SwitchGuard(0);
+ //Debug.LogFormat("_list: {0} 鐨勬嫢鏈夎��: {1} 涓嶅彲瑙�, 杩欓噷闅愯棌.", _chkPlayer.ServerInstID, _player.ServerInstID);
+ continue;
+ }
+
+ var _index = BattleEffectPlayRule.Instance.GetIndex(_player.ServerInstID);
+ if (_index != -1 && _index < BattleEffectPlayRule.Instance.petLimit)
+ {
+ _player.SwitchGuard((uint)_player.serverGuardId);
+ //Debug.LogFormat("_list: {0} 鐨勬嫢鏈夎��: {1} 鍦ㄥ垪琛ㄤ腑涓斾綅浜�: {2}, 灏忎簬闄愬埗鏁伴噺: {3}", _chkPlayer.ServerInstID, _player.ServerInstID, _index, BattleEffectPlayRule.Instance.petLimit);
+ }
+ else
+ {
+ _player.SwitchGuard(0);
+ //Debug.LogFormat("_list: {0} 鐨勬嫢鏈夎��: {1} 鍦ㄥ垪琛ㄤ腑涓斾綅浜�: {2}, 澶т簬闄愬埗鏁伴噺: {3}", _chkPlayer.ServerInstID, _player.ServerInstID, _index, BattleEffectPlayRule.Instance.petLimit);
+ }
}
}
diff --git a/Fight/GameActor/GA_Pet.cs b/Fight/GameActor/GA_Pet.cs
index 0e3e13f..8aa555e 100644
--- a/Fight/GameActor/GA_Pet.cs
+++ b/Fight/GameActor/GA_Pet.cs
@@ -39,13 +39,28 @@
if (_parentSID != PlayerDatas.Instance.PlayerId)
{
GA_Player _player = GAMgr.Instance.GetBySID(_parentSID) as GA_Player;
- if (_player != null)
+
+ bool _showOrHide = true;
+ int _index = -999;
+
+ if (_player == null)
{
- if (!_player.ShowOrHide)
+ _showOrHide = false;
+ }
+ else
+ {
+ _showOrHide = _player.ShowOrHide;
+ if (_showOrHide)
{
- ShowOrHideModel(false);
+ _index = BattleEffectPlayRule.Instance.GetIndex(_parentSID);
+ _showOrHide = _index != -1 && _index < BattleEffectPlayRule.Instance.petLimit;
}
}
+
+ if (!_showOrHide)
+ {
+ ShowOrHideModel(_showOrHide);
+ }
}
}
diff --git a/Fight/GameActor/GA_Player.cs b/Fight/GameActor/GA_Player.cs
index 37a16c3..f3181a6 100644
--- a/Fight/GameActor/GA_Player.cs
+++ b/Fight/GameActor/GA_Player.cs
@@ -110,7 +110,11 @@
}
else if (_equipInfo.Place == (int)RoleEquipType.retSpiritAnimal)
{
- SwitchGuard(_equipInfo.ItemID);
+ var _index = BattleEffectPlayRule.Instance.GetIndex(ServerInstID);
+ if (_index != -1 && _index < BattleEffectPlayRule.Instance.petLimit)
+ {
+ SwitchGuard(_equipInfo.ItemID);
+ }
serverGuardId = (int)_equipInfo.ItemID;
}
else if (_equipInfo.Place == (int)RoleEquipType.mount)
@@ -185,9 +189,9 @@
public override void ChangeEquip(EquipInfo equipInfo)
{
// 浼犲叆ID涓�0浠h〃鑴变笅浜嗚澶�
- if(equipInfo.itemID == 0 && equipInfo.place != 0)
+ if (equipInfo.itemID == 0 && equipInfo.place != 0)
{
- if(m_EquipDict.ContainsKey(equipInfo.place))
+ if (m_EquipDict.ContainsKey(equipInfo.place))
{
m_EquipDict.Remove(equipInfo.place);
}
diff --git a/Fight/GameActor/GActorNpcFight.cs b/Fight/GameActor/GActorNpcFight.cs
index ad2c38d..1c6b5c4 100644
--- a/Fight/GameActor/GActorNpcFight.cs
+++ b/Fight/GameActor/GActorNpcFight.cs
@@ -566,7 +566,7 @@
m_Model.transform.localScale = Vector3.one;
GA_Hero _hero = PlayerDatas.Instance.hero;
- if(_hero.SelectTarget == this)
+ if (_hero.SelectTarget == this)
{
RequestName();
RequestLifeBar();
@@ -617,17 +617,17 @@
}
else
{
- if (MP_Name != m_Model.transform)
+ if (MP_Name && MP_Name != m_Model.transform)
{
MP_Name.SetParent(Root);
}
- if (MP_Hit != m_Model.transform)
+ if (MP_Hit && MP_Hit != m_Model.transform)
{
MP_Hit.SetParent(Root);
}
- if (MP_Stun != m_Model.transform)
+ if (MP_Stun && MP_Stun != m_Model.transform)
{
MP_Stun.SetParent(Root);
}
diff --git a/Fight/GameActor/GActorPlayerBase.cs b/Fight/GameActor/GActorPlayerBase.cs
index ab7c68d..c9775ad 100644
--- a/Fight/GameActor/GActorPlayerBase.cs
+++ b/Fight/GameActor/GActorPlayerBase.cs
@@ -1096,6 +1096,7 @@
if (ShowOrHide)
{
m_Guard = GAMgr.Instance.RequestNpcNoFight<GA_Guard>(ServerInstID * 100 + 1, (uint)config.npcId, Group, null);
+ m_Guard.ActorInfo.ownerSID = ServerInstID;
m_Guard.itemID = (int)guardID;
m_Guard.InitBase();
m_Guard.IsStateActive = true;
@@ -2133,27 +2134,39 @@
ReleaseShadow();
}
- GA_Pet _pet = GAMgr.Instance.GetBySID(ServerInstID * 10 + 1) as GA_Pet;
- if (_pet != null)
+ GA_Player _player = this as GA_Player;
+ if (_player != null)
{
- _pet.ShowOrHideModel(showOrHide);
- }
-
- ShowOrHide = showOrHide;
-
- if (this is GA_Player)
- {
- var _player = this as GA_Player;
-
- if (ShowOrHide)
+ GA_Pet _pet = GAMgr.Instance.GetBySID(ServerInstID * 10 + 1) as GA_Pet;
+ var _index = BattleEffectPlayRule.Instance.GetIndex(ServerInstID);
+ if (_index != -1 && _index < BattleEffectPlayRule.Instance.petLimit)
{
- if (_player.serverGuardId != 0)
+ if (_pet != null)
+ {
+ _pet.ShowOrHideModel(true);
+ }
+
+ if (m_Guard == null)
{
SwitchGuard((uint)_player.serverGuardId);
}
}
+ else
+ {
+ if (_pet != null)
+ {
+ _pet.ShowOrHideModel(false);
+ }
+
+ if (m_Guard != null)
+ {
+ SwitchGuard(0);
+ }
+ }
}
+ ShowOrHide = showOrHide;
+
}
/// <summary>
diff --git a/Lua/Gen/BattleEffectPlayRuleWrap.cs b/Lua/Gen/BattleEffectPlayRuleWrap.cs
index c209262..97fa773 100644
--- a/Lua/Gen/BattleEffectPlayRuleWrap.cs
+++ b/Lua/Gen/BattleEffectPlayRuleWrap.cs
@@ -21,17 +21,21 @@
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(BattleEffectPlayRule);
- Utils.BeginObjectRegister(type, L, translator, 0, 2, 2, 2);
+ Utils.BeginObjectRegister(type, L, translator, 0, 5, 4, 1);
+ Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddPlayer", _m_AddPlayer);
+ Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemovePlayer", _m_RemovePlayer);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Update", _m_Update);
+ Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIndex", _m_GetIndex);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CanPlay", _m_CanPlay);
- Utils.RegisterFunc(L, Utils.GETTER_IDX, "sortPlayerList", _g_get_sortPlayerList);
+ Utils.RegisterFunc(L, Utils.GETTER_IDX, "petLimit", _g_get_petLimit);
+ Utils.RegisterFunc(L, Utils.GETTER_IDX, "guardLimit", _g_get_guardLimit);
+ Utils.RegisterFunc(L, Utils.GETTER_IDX, "sortPlayerList", _g_get_sortPlayerList);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "timeEscape", _g_get_timeEscape);
- Utils.RegisterFunc(L, Utils.SETTER_IDX, "sortPlayerList", _s_set_sortPlayerList);
- Utils.RegisterFunc(L, Utils.SETTER_IDX, "timeEscape", _s_set_timeEscape);
+ Utils.RegisterFunc(L, Utils.SETTER_IDX, "timeEscape", _s_set_timeEscape);
Utils.EndObjectRegister(type, L, translator, null, null,
@@ -78,6 +82,62 @@
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
+ static int _m_AddPlayer(RealStatePtr L)
+ {
+ try {
+
+ ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
+
+
+ BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
+
+
+
+ {
+ uint _id = LuaAPI.xlua_touint(L, 2);
+
+ gen_to_be_invoked.AddPlayer( _id );
+
+
+
+ return 0;
+ }
+
+ } catch(System.Exception gen_e) {
+ return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
+ }
+
+ }
+
+ [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
+ static int _m_RemovePlayer(RealStatePtr L)
+ {
+ try {
+
+ ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
+
+
+ BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
+
+
+
+ {
+ uint _id = LuaAPI.xlua_touint(L, 2);
+
+ gen_to_be_invoked.RemovePlayer( _id );
+
+
+
+ return 0;
+ }
+
+ } catch(System.Exception gen_e) {
+ return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
+ }
+
+ }
+
+ [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Update(RealStatePtr L)
{
try {
@@ -96,6 +156,35 @@
return 0;
+ }
+
+ } catch(System.Exception gen_e) {
+ return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
+ }
+
+ }
+
+ [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
+ static int _m_GetIndex(RealStatePtr L)
+ {
+ try {
+
+ ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
+
+
+ BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
+
+
+
+ {
+ uint _sid = LuaAPI.xlua_touint(L, 2);
+
+ int gen_ret = gen_to_be_invoked.GetIndex( _sid );
+ LuaAPI.xlua_pushinteger(L, gen_ret);
+
+
+
+ return 1;
}
} catch(System.Exception gen_e) {
@@ -137,6 +226,34 @@
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
+ static int _g_get_petLimit(RealStatePtr L)
+ {
+ try {
+ ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
+
+ BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
+ LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.petLimit);
+ } catch(System.Exception gen_e) {
+ return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
+ }
+ return 1;
+ }
+
+ [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
+ static int _g_get_guardLimit(RealStatePtr L)
+ {
+ try {
+ ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
+
+ BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
+ LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.guardLimit);
+ } catch(System.Exception gen_e) {
+ return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
+ }
+ return 1;
+ }
+
+ [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_sortPlayerList(RealStatePtr L)
{
try {
@@ -165,21 +282,6 @@
}
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _s_set_sortPlayerList(RealStatePtr L)
- {
- try {
- ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
-
- BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
- gen_to_be_invoked.sortPlayerList = (System.Collections.Generic.List<uint>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<uint>));
-
- } catch(System.Exception gen_e) {
- return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
- }
- return 0;
- }
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_timeEscape(RealStatePtr L)
diff --git a/Lua/Gen/BattleEffectPlayRuleWrap.cs.meta b/Lua/Gen/BattleEffectPlayRuleWrap.cs.meta
index 16896a0..cb89f72 100644
--- a/Lua/Gen/BattleEffectPlayRuleWrap.cs.meta
+++ b/Lua/Gen/BattleEffectPlayRuleWrap.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 9af4f8cb7bea139439969d8767ea1d39
-timeCreated: 1543808664
+timeCreated: 1543992918
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/System/GeneralConfig/GeneralDefine.cs b/System/GeneralConfig/GeneralDefine.cs
index 28ace32..9c0f0dc 100644
--- a/System/GeneralConfig/GeneralDefine.cs
+++ b/System/GeneralConfig/GeneralDefine.cs
@@ -146,9 +146,15 @@
public static List<Item> ancientKingAwards = new List<Item>();
- public static int lowQualityCount { get; private set; }
- public static int medQualityCount { get; private set; }
- public static int highQualityCount { get; private set; }
+ public static int lowQualityEffectCount { get; private set; }
+ public static int medQualityEffectCount { get; private set; }
+ public static int highQualityEffectCount { get; private set; }
+ public static int lowQualityPetCount { get; private set; }
+ public static int medQualityPetCount { get; private set; }
+ public static int highQualityPetCount { get; private set; }
+ public static int lowQualityGuardCount { get; private set; }
+ public static int medQualityGuardCount { get; private set; }
+ public static int highQualityGuardCount { get; private set; }
public static int fairyLandBuffCondition { get; private set; }
public static int fairyLandBuffId { get; private set; }
@@ -524,9 +530,19 @@
}
func = Config.Instance.Get<FuncConfigConfig>("QualityEffectConfig");
- lowQualityCount = int.Parse(func.Numerical1);
- medQualityCount = int.Parse(func.Numerical2);
- highQualityCount = int.Parse(func.Numerical3);
+ lowQualityEffectCount = int.Parse(func.Numerical1);
+ medQualityEffectCount = int.Parse(func.Numerical2);
+ highQualityEffectCount = int.Parse(func.Numerical3);
+
+ func = Config.Instance.Get<FuncConfigConfig>("QualityPetCountConfig");
+ lowQualityPetCount = int.Parse(func.Numerical1);
+ medQualityPetCount = int.Parse(func.Numerical2);
+ highQualityPetCount = int.Parse(func.Numerical3);
+
+ func = Config.Instance.Get<FuncConfigConfig>("QualityGuardCountConfig");
+ lowQualityGuardCount = int.Parse(func.Numerical1);
+ medQualityGuardCount = int.Parse(func.Numerical2);
+ highQualityGuardCount = int.Parse(func.Numerical3);
fairyLandBuffCondition = GetInt("XjmjAddHarm", 1);
fairyLandBuffId = GetInt("XjmjAddHarm", 2);
--
Gitblit v1.8.0