53 lines
1.6 KiB
Plaintext
53 lines
1.6 KiB
Plaintext
/*
|
|
文件名:露露定制内容.nut
|
|
路径:_DPS_/_BuiltProject/露露定制内容/露露定制内容.nut
|
|
创建日期:2026-03-23 11:05
|
|
文件用途:
|
|
*/
|
|
|
|
class LuluCustomizedSystemC {
|
|
Data = null;
|
|
|
|
constructor() {
|
|
InitPvf();
|
|
|
|
ClientSocketPackFuncMap.rawset(21016001, function(SUser, Jso) {
|
|
SUser.DropItem(Jso.id, Jso.posX, Jso.posY);
|
|
}.bindenv(this));
|
|
|
|
ClientSocketPackFuncMap.rawset(21016003, function(SUser, Jso) {
|
|
if (Data.rawin(Jso.rarity)) {
|
|
local Index = MathClass.Rand(0, Data[Jso.rarity].len());
|
|
local ItemId = Data[Jso.rarity][Index];
|
|
SUser.DropItem(ItemId, Jso.posX, Jso.posY);
|
|
}
|
|
}.bindenv(this));
|
|
}
|
|
|
|
function InitPvf() {
|
|
// getroottable()._Script_Data_Init_ <- false;
|
|
Script();
|
|
Data = {};
|
|
ScriptData.GetFileData("etc/uniquehellpartydroptable.etc", function(_n, DataA) {
|
|
while (!DataA.Eof()) {
|
|
local Fragment = DataA.Get();
|
|
if (Fragment.find("[") >= 0 && Fragment.find("/") == null) {
|
|
local key = Fragment.slice(1, -1);
|
|
Data[key] <- [];
|
|
while (true) {
|
|
local Id = DataA.Get();
|
|
if (typeof Id == "string" && Id.find("[/") != null) {
|
|
break;
|
|
}
|
|
Data[key].push(Id);
|
|
}
|
|
}
|
|
}
|
|
}.bindenv(this));
|
|
print(Data);
|
|
}
|
|
}
|
|
|
|
Timer.SetTimeOut(function() {
|
|
getroottable()._LuluCustomizedSystemC_ <- LuluCustomizedSystemC();
|
|
}, 1); |