165 lines
6.1 KiB
Lua
165 lines
6.1 KiB
Lua
|
--文件是自动生成,请勿手动修改.来自数据文件:share
|
|||
|
local L_CompressMaxColumn = 2
|
|||
|
local L_CompressData = {
|
|||
|
574117044823829,1095188806,
|
|||
|
--10005,1,1,5,获得橙色装备,4_100;50066_5,我在《勇者荣耀》中获得一件 [F1FF00]橙色装备[-] ,快来一起和我组队刷BOSS吧!,,,
|
|||
|
574220157593366,1095319878,
|
|||
|
--10006,1,1,6,获得金色装备,4_100;50066_5,我在《勇者荣耀》中获得一件 [F1FF00]金色装备[-] ,快来一起和我组队刷BOSS吧!,,,
|
|||
|
574288910624535,1095450950,
|
|||
|
--10007,1,1,7,获得红色装备,4_100;50066_5,我在《勇者荣耀》中获得一件 [F1FF00]红色装备[-] ,快来一起和我组队刷BOSS吧!,,,
|
|||
|
574360750935684,1095582022,
|
|||
|
--20100,2,1,100,等级达到100级,4_100;50066_5,LV [F1FF00]100级[-] 达成!《勇者荣耀》等待你的加入!,,,
|
|||
|
574432825855720,1095713094,
|
|||
|
--20200,2,1,200,等级达到200级,4_100;50066_5,LV [F1FF00]200级[-] 达成!《勇者荣耀》等待你的加入!,,,
|
|||
|
574504900775756,1095844166,
|
|||
|
--20300,2,1,300,等级达到300级,4_100;50066_5,LV [F1FF00]300级[-] 达成!《勇者荣耀》等待你的加入!,,,
|
|||
|
574576975695792,1095975238,
|
|||
|
--20400,2,1,400,等级达到400级,4_100;50066_5,[F1FF00]巅峰30级[-] 达成!《勇者荣耀》等待你的加入!,,,
|
|||
|
574632307225905,1096106310,
|
|||
|
--30001,3,1,1,第一次转职,4_100;50066_5,成功转职为 [F1FF00]{0}[-] ,《勇者荣耀》多职业任意转职!36个职业等来选!,,,
|
|||
|
574701060257074,1096106310,
|
|||
|
--30002,3,1,2,第二次转职,4_100;50066_5,成功转职为 [F1FF00]{0}[-] ,《勇者荣耀》多职业任意转职!36个职业等来选!,,,
|
|||
|
574735453549875,1096106310,
|
|||
|
--30003,3,1,3,第三次转职,4_100;50066_5,成功转职为 [F1FF00]{0}[-] ,《勇者荣耀》多职业任意转职!36个职业等来选!,,,
|
|||
|
574769846842676,1096106310,
|
|||
|
--30004,3,1,4,第四次转职,4_100;50066_5,成功转职为 [F1FF00]{0}[-] ,《勇者荣耀》多职业任意转职!36个职业等来选!,,,
|
|||
|
574804089412672,1096433990,
|
|||
|
--40000,4,-1,0,获得新时装,4_100;50066_5,这是我在《勇者荣耀》中获得的新时装 [F1FF00]{0}[-] ,漂亮吗?,,,
|
|||
|
574872809161552,1096565062,
|
|||
|
--50000,5,-1,0,获得新坐骑,4_100;50066_5,这是我在《勇者荣耀》中获得的新坐骑 [F1FF00]{0}[-] ,邀请你一起来加入!,,,
|
|||
|
574941528910432,1096696134,
|
|||
|
--60000,6,-1,0,获得新翅膀,4_100;50066_5,这是我在《勇者荣耀》中获得的新翅膀 [F1FF00]{0}[-] ,炫酷吧!,,,
|
|||
|
575010231882096,1096827206,
|
|||
|
--70000,7,1,0,众神遗迹BOSS首杀,4_100;50066_5,历经坎坷,砥砺前行!终于击杀了BOSS [F1FF00]{0}[-] !等你一起来战!,,,
|
|||
|
575078951630976,1096958278,
|
|||
|
--80000,8,1,0,创世神殿副本首通,4_100;50066_5,历经坎坷,砥砺前行!终于通关 [F1FF00]创世神殿[-] !等你一起来战!,,,
|
|||
|
}
|
|||
|
local L_MainKeyDic = {
|
|||
|
[10005]=1,[10006]=2,[10007]=3,[20100]=4,[20200]=5,[20300]=6,[20400]=7,[30001]=8,[30002]=9,[30003]=10,[30004]=11,[40000]=12,[50000]=13,[60000]=14,[70000]=15,
|
|||
|
[80000]=16,}
|
|||
|
local L_NamesByNum = {
|
|||
|
Id = 1,
|
|||
|
Type = 2,
|
|||
|
Count = 3,
|
|||
|
Condition = 4,
|
|||
|
ModelId = 8,
|
|||
|
}
|
|||
|
local L_NamesByString = {
|
|||
|
Description = 5,
|
|||
|
Rewards = 6,
|
|||
|
Text = 7,
|
|||
|
}
|
|||
|
local L_ColNameIndexs = {
|
|||
|
Id = 0,
|
|||
|
Type = 1,
|
|||
|
Count = 2,
|
|||
|
Condition = 3,
|
|||
|
Description = 4,
|
|||
|
Rewards = 5,
|
|||
|
Text = 6,
|
|||
|
ModelId = 7,
|
|||
|
}
|
|||
|
--local L_ColumnUseBitCount = {18,5,2,10,16,16,16,2,}
|
|||
|
--local L_ColumnList = {1,1,1,1,1,2,2,2,}
|
|||
|
--local L_ShiftDataList = {0,18,23,25,35,0,16,32,}
|
|||
|
--local L_AndDataList = {131071,15,1,511,32767,32767,32767,1,}
|
|||
|
local L_ColumnShiftAndList = {1,0,131071,1,18,15,1,23,1,1,25,511,1,35,32767,2,0,32767,2,16,32767,2,32,1,}
|
|||
|
local L_ColNum = 8;
|
|||
|
local L_UseDataK = setmetatable({ },{ __mode = 'k'});
|
|||
|
local L_UseDataV = setmetatable({ },{ __mode = 'v'});
|
|||
|
local L_UseDataRow = setmetatable({ },{ __mode = 'v'});
|
|||
|
local L_IsCache = false;
|
|||
|
local mt = {}
|
|||
|
local function GetData(row, column)
|
|||
|
local startIndex = (column - 1) * 3
|
|||
|
local _compressData = L_CompressData[(row - 1)*L_CompressMaxColumn+L_ColumnShiftAndList[startIndex + 1]]
|
|||
|
local _tempData = _compressData >> L_ColumnShiftAndList[startIndex + 2]
|
|||
|
local _data = _tempData & L_ColumnShiftAndList[startIndex + 3]
|
|||
|
local _andSign = L_ColumnShiftAndList[startIndex + 3] + 1
|
|||
|
local _isMinus = (_andSign & _tempData) == _andSign
|
|||
|
return _isMinus and -_data or _data;
|
|||
|
end
|
|||
|
|
|||
|
mt.__index = function (t,key)
|
|||
|
local _key = L_UseDataK[t];
|
|||
|
local _row = L_MainKeyDic[_key];
|
|||
|
local _column = L_NamesByNum[key];
|
|||
|
if _column ~= nil then
|
|||
|
if L_IsCache then
|
|||
|
local _data = L_UseDataRow[_row * L_ColNum + _column]
|
|||
|
if not _data then
|
|||
|
_data = GetData(_row, _column)
|
|||
|
L_UseDataRow[_row * L_ColNum + _column] = _data
|
|||
|
end
|
|||
|
return _data
|
|||
|
else
|
|||
|
return GetData(_row, _column)
|
|||
|
end
|
|||
|
end
|
|||
|
_column = L_NamesByString[key]
|
|||
|
if _column ~= nil then
|
|||
|
return StringDefines[GetData(_row, _column)]
|
|||
|
end
|
|||
|
if string.find(key, '_') then
|
|||
|
local _newKey = string.gsub(key, '_', '')
|
|||
|
_column = L_NamesByString[_newKey]
|
|||
|
if _column ~= nil then
|
|||
|
return GetData(_row, _column)
|
|||
|
end
|
|||
|
end
|
|||
|
if key ~= '_OnCopyAfter_' then
|
|||
|
return
|
|||
|
end
|
|||
|
end
|
|||
|
|
|||
|
local M = {
|
|||
|
_CompressData_ = L_CompressData,
|
|||
|
_ColumnShiftAndList_ = L_ColumnShiftAndList,
|
|||
|
_CompressMaxColumn_ = L_CompressMaxColumn,
|
|||
|
_ColumnNameIndexs_ = L_ColNameIndexs,
|
|||
|
Count = 16
|
|||
|
}
|
|||
|
|
|||
|
function M:Foreach(func)
|
|||
|
for i=1,M.Count do
|
|||
|
local _key = GetData(i, 1)
|
|||
|
func(_key, M[_key])
|
|||
|
end
|
|||
|
end
|
|||
|
|
|||
|
function M:ForeachCanBreak(func)
|
|||
|
for i = 1,M.Count do
|
|||
|
local _key = GetData(i, 1)
|
|||
|
if func(_key, M[_key]) then
|
|||
|
break
|
|||
|
end
|
|||
|
end
|
|||
|
end
|
|||
|
|
|||
|
function M:GetByIndex(index)
|
|||
|
return M[GetData(index, 1)];
|
|||
|
end
|
|||
|
|
|||
|
function M:IsContainKey(key)
|
|||
|
return not(not L_MainKeyDic[key]);
|
|||
|
end
|
|||
|
|
|||
|
function M:SetIsCache(isCh)
|
|||
|
L_IsCache = isCh;
|
|||
|
end
|
|||
|
|
|||
|
setmetatable(M, {__index = function(t, key)
|
|||
|
if not L_MainKeyDic[key] then
|
|||
|
return;
|
|||
|
end
|
|||
|
local _t = L_UseDataV[key];
|
|||
|
if not _t then
|
|||
|
_t = setmetatable({}, mt);
|
|||
|
L_UseDataV[key] = _t;
|
|||
|
L_UseDataK[_t] = key;
|
|||
|
end
|
|||
|
return _t
|
|||
|
end})
|
|||
|
|
|||
|
return M
|