164 lines
6.7 KiB
Lua
164 lines
6.7 KiB
Lua
--文件是自动生成,请勿手动修改.来自数据文件:boss_FirstBlood
|
|
local L_CompressMaxColumn = 3
|
|
local L_CompressData = {
|
|
151096040620387265,540476094608868916,9493,
|
|
--1,11102,1,12_1000,0_81061_1_0;1_81062_1_0;2_81061_1_0;3_81062_1_0,0_81071_1_1;0_3_100000_1;1_81072_1_1;1_3_100000_1;2_81071_1_1;2_3_100000_1;3_81072_1_1;3_3_100000_1,1212000,80,0,30,世界首领,,
|
|
151096040620387298,44139324409396,9493,
|
|
--2,11103,1,12_1000,0_81061_1_0;1_81062_1_0;2_81061_1_0;3_81062_1_0,0_81071_1_1;0_3_100000_1;1_81072_1_1;1_3_100000_1;2_81071_1_1;2_3_100000_1;3_81072_1_1;3_3_100000_1,1212000,80,0,0,世界首领,,
|
|
151096040620387331,38641766270516,9493,
|
|
--3,11104,1,12_1000,0_81061_1_0;1_81062_1_0;2_81061_1_0;3_81062_1_0,0_81071_1_1;0_3_100000_1;1_81072_1_1;1_3_100000_1;2_81071_1_1;2_3_100000_1;3_81072_1_1;3_3_100000_1,1212000,70,0,0,世界首领,,
|
|
151104836713409604,49636882548278,9493,
|
|
--4,11106,1,12_1000,0_81063_1_0;1_81064_1_0;2_81063_1_0;3_81064_1_0,0_81073_1_1;0_3_100000_1;1_81074_1_1;1_3_100000_1;2_81073_1_1;2_3_100000_1;3_81074_1_1;3_3_100000_1,1212000,90,0,0,世界首领,,
|
|
151104836713409637,44139324409398,9493,
|
|
--5,11107,1,12_1000,0_81063_1_0;1_81064_1_0;2_81063_1_0;3_81064_1_0,0_81073_1_1;0_3_100000_1;1_81074_1_1;1_3_100000_1;2_81073_1_1;2_3_100000_1;3_81074_1_1;3_3_100000_1,1212000,80,0,0,世界首领,,
|
|
151104836713409670,2053685569405355574,9493,
|
|
--6,11108,1,12_1000,0_81063_1_0;1_81064_1_0;2_81063_1_0;3_81064_1_0,0_81073_1_1;0_3_100000_1;1_81074_1_1;1_3_100000_1;2_81073_1_1;2_3_100000_1;3_81074_1_1;3_3_100000_1,1212000,80,0,-50,世界首领,,
|
|
151113632806434919,1080897054777050680,9493,
|
|
--7,11203,1,12_1000,0_81065_1_0;1_81066_1_0;2_81065_1_0;3_81066_1_0,0_81075_1_1;0_3_300000_1;1_81076_1_1;1_3_300000_1;2_81075_1_1;2_3_300000_1;3_81076_1_1;3_3_300000_1,1212000,60,0,60,世界首领,,
|
|
151113632806434952,71627115103800,9493,
|
|
--8,11204,1,12_1000,0_81065_1_0;1_81066_1_0;2_81065_1_0;3_81066_1_0,0_81075_1_1;0_3_300000_1;1_81076_1_1;1_3_300000_1;2_81075_1_1;2_3_300000_1;3_81076_1_1;3_3_300000_1,1212000,130,0,0,世界首领,,
|
|
151113632812742505,5673638989694520,8977,
|
|
--9,11707,4,12_1000,0_81065_1_0;1_81066_1_0;2_81065_1_0;3_81066_1_0,0_81075_1_1;0_3_300000_1;1_81076_1_1;1_3_300000_1;2_81075_1_1;2_3_300000_1;3_81076_1_1;3_3_300000_1,1213000,80,20,0,VIP首领,,
|
|
151113632810795658,5690139266287160,9494,
|
|
--10,16404,3,12_1000,0_81065_1_0;1_81066_1_0;2_81065_1_0;3_81066_1_0,0_81075_1_1;0_3_300000_1;1_81076_1_1;1_3_300000_1;2_81075_1_1;2_3_300000_1;3_81076_1_1;3_3_300000_1,1271000,110,20,0,神兽首领,,
|
|
151122428899457291,2924859789182522,9493,
|
|
--11,11208,1,12_1000,0_81067_1_0;1_81068_1_0;2_81067_1_0;3_81068_1_0,0_81077_1_1;0_3_400000_1;1_81078_1_1;1_3_400000_1;2_81077_1_1;2_3_400000_1;3_81078_1_1;3_3_400000_1,1212000,200,10,0,世界首领,,
|
|
151122428905764748,2897372129560122,8977,
|
|
--12,11708,4,12_1000,0_81067_1_0;1_81068_1_0;2_81067_1_0;3_81068_1_0,0_81077_1_1;0_3_400000_1;1_81078_1_1;1_3_400000_1;2_81077_1_1;2_3_400000_1;3_81078_1_1;3_3_400000_1,1213000,150,10,0,VIP首领,,
|
|
151122428903817997,5668149033731642,9494,
|
|
--13,16408,3,12_1000,0_81067_1_0;1_81068_1_0;2_81067_1_0;3_81068_1_0,0_81077_1_1;0_3_400000_1;1_81078_1_1;1_3_400000_1;2_81077_1_1;2_3_400000_1;3_81078_1_1;3_3_400000_1,1271000,70,20,0,神兽首领,,
|
|
}
|
|
local L_MainKeyDic = {
|
|
[1]=1,[2]=2,[3]=3,[4]=4,[5]=5,[6]=6,[7]=7,[8]=8,[9]=9,[10]=10,[11]=11,[12]=12,[13]=13,}
|
|
local L_NamesByNum = {
|
|
ID = 1,
|
|
MonsterId = 2,
|
|
BossType = 3,
|
|
FunctionID = 7,
|
|
Size = 8,
|
|
ModelRotat = 9,
|
|
ModelYPos = 10,
|
|
}
|
|
local L_NamesByString = {
|
|
FirstBloodCash = 4,
|
|
FirstBloodReward = 5,
|
|
PersonalReward = 6,
|
|
ShowCloneName = 11,
|
|
}
|
|
local L_ColNameIndexs = {
|
|
ID = 0,
|
|
MonsterId = 1,
|
|
BossType = 2,
|
|
FirstBloodCash = 3,
|
|
FirstBloodReward = 4,
|
|
PersonalReward = 5,
|
|
FunctionID = 6,
|
|
Size = 7,
|
|
ModelRotat = 8,
|
|
ModelYPos = 9,
|
|
ShowCloneName = 10,
|
|
}
|
|
--local L_ColumnUseBitCount = {5,16,4,17,17,17,22,9,6,7,15,}
|
|
--local L_ColumnList = {1,1,1,1,1,2,2,2,2,2,3,}
|
|
--local L_ShiftDataList = {0,5,21,25,42,0,17,39,48,54,0,}
|
|
--local L_AndDataList = {15,32767,7,65535,65535,65535,2097151,255,31,63,16383,}
|
|
local L_ColumnShiftAndList = {1,0,15,1,5,32767,1,21,7,1,25,65535,1,42,65535,2,0,65535,2,17,2097151,2,39,255,2,48,31,2,54,63,3,0,16383,}
|
|
local L_ColNum = 11;
|
|
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 = 13
|
|
}
|
|
|
|
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
|