From 484a707df440209770b9077471ee852f037e4ea6 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期四, 24 一月 2019 19:26:57 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/GeneralConfig/GeneralDefine.cs | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/System/GeneralConfig/GeneralDefine.cs b/System/GeneralConfig/GeneralDefine.cs
index 7dab617..4a7464f 100644
--- a/System/GeneralConfig/GeneralDefine.cs
+++ b/System/GeneralConfig/GeneralDefine.cs
@@ -138,7 +138,7 @@
public static Dictionary<int, int> fairyGrabBossMapLines { get; private set; }
public static Dictionary<int, List<int>> DropItemEffectMapID { get; private set; }
-
+ public static Dictionary<int, List<int>> itemPutInPackDict { get; private set; }
public static List<int> RebornAutoFightMapID { get; private set; }
public static string teamWorldCall;
@@ -278,6 +278,25 @@
_pos[0] = (double)_data[_key][0];
_pos[1] = (double)_data[_key][1];
NpcPosOffset.Add(_npcID, new Vector3((float)_pos[0], 0, (float)_pos[1]));
+ }
+
+ var putInItemPack = Config.Instance.Get<FuncConfigConfig>("PutInItemPack");
+ LitJson.JsonData itemPutInData = LitJson.JsonMapper.ToObject(putInItemPack.Numerical1);
+ itemPutInPackDict = new Dictionary<int, List<int>>();
+ foreach(var _key in itemPutInData.Keys)
+ {
+ var itemTypeData = itemPutInData[_key];
+ int packType = int.Parse(_key);
+ List<int> itemTypes = new List<int>();
+ itemPutInPackDict.Add(packType,itemTypes);
+ if(itemTypeData.IsArray)
+ {
+ for (i = 0; i < itemTypeData.Count; i++)
+ {
+ int itemType = int.Parse(itemTypeData[i].ToString());
+ itemTypes.Add(itemType);
+ }
+ }
}
FuncConfigConfig nxxdImg = Config.Instance.Get<FuncConfigConfig>("NXXDPicture");
@@ -689,6 +708,19 @@
}
}
+ public static PackType GetPackTypeByItemType(int itemType)
+ {
+ foreach(var key in itemPutInPackDict.Keys)
+ {
+ var types = itemPutInPackDict[key];
+ if(types.Contains(itemType))
+ {
+ return (PackType)key;
+ }
+ }
+ return PackType.rptItem;
+ }
+
private static int GetInt(string _key, int _index = 1)
{
var result = 0;
--
Gitblit v1.8.0