添加示例项目
This commit is contained in:
11
示例项目/黄金品级调整箱/Proj.ifo
Normal file
11
示例项目/黄金品级调整箱/Proj.ifo
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"ProjectName": "黄金品级调整箱",
|
||||
"ProjectDescribe": "将一个品级调整箱替换为黄金品级调整箱",
|
||||
"ProjectAuthor": "凌众",
|
||||
"ProjectVersion": 1.1,
|
||||
"ProjectConfig": "黄金品级调整箱_Lenheart.json",
|
||||
"ProjectFiles": [
|
||||
"黄金品级调整箱.nut"
|
||||
],
|
||||
"ProjectRunFunc": "_Dps_SetEquinherit_Main_"
|
||||
}
|
||||
29
示例项目/黄金品级调整箱/黄金品级调整箱.nut
Normal file
29
示例项目/黄金品级调整箱/黄金品级调整箱.nut
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
function _Dps_SetEquinherit_Main_() {
|
||||
Cb_ModItemattr_Enter_Func.addinfoMax <- function(args) {
|
||||
//print("触发回调");
|
||||
local Config = GlobalConfig.Get("黄金品级调整箱_Lenheart.json");
|
||||
local SUser = User(args[1]);
|
||||
local pack = NativePointer(args[2]);
|
||||
local a = NativePointer(pack.add(20).readPointer());
|
||||
local itemSold = a.add(13).add(6).readShort();
|
||||
local equSold = a.add(13).add(0).readShort();
|
||||
local InvenObj = SUser.GetInven();
|
||||
print("InvenObj = " + InvenObj);
|
||||
if (InvenObj) {
|
||||
local ItemObj = InvenObj.GetSlot(1, itemSold);
|
||||
local equObj = InvenObj.GetSlot(1, equSold);
|
||||
//print("ItemObj = " + ItemObj);
|
||||
//print("equObj = " + equObj);
|
||||
//print("ItemObj.GetIndex() = " + ItemObj.GetIndex());
|
||||
if (ItemObj.GetIndex() == Config["黄金品级调整箱id"]) {
|
||||
Timer.SetTimeOut(function() {
|
||||
equObj.SetAdd_Info(999999998);
|
||||
equObj.Flush();
|
||||
SUser.SendUpdateItemList(1, 0, equSold);
|
||||
//print("调整成功");
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
4
示例项目/黄金品级调整箱/黄金品级调整箱_Lenheart.json
Normal file
4
示例项目/黄金品级调整箱/黄金品级调整箱_Lenheart.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"黄金品级调整箱id": 897
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user