This commit is contained in:
chenxi 2023-04-20 22:39:43 +08:00
parent c4f034e13e
commit e7c01c9c5d
5 changed files with 93 additions and 76 deletions

View File

@ -10,6 +10,13 @@ local chapter = {
1, 1,
5 5
}, },
["involved_skill"]={
{
200200,
29,
20
}
},
["not_involved_skill"]={ ["not_involved_skill"]={
4, 4,
5, 5,

View File

@ -9,18 +9,78 @@ local chapter_board = {
1, 1,
0 0
}, },
{
0,
3
},
{ {
0, 0,
2 2
}, },
{
0,
2
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{ {
0, 0,
4 4
}, },
{
0,
3
},
{
0,
3
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
1,
0
},
{
0,
3
},
{ {
0, 0,
2 2
}, },
{
0,
4
},
{
1,
0
},
{ {
1, 1,
0 0
@ -45,14 +105,6 @@ local chapter_board = {
0, 0,
3 3
}, },
{
0,
2
},
{
0,
4
},
{ {
1, 1,
0 0
@ -61,26 +113,6 @@ local chapter_board = {
1, 1,
0 0
}, },
{
0,
3
},
{
0,
3
},
{
0,
4
},
{
0,
3
},
{
0,
3
},
{ {
1, 1,
0 0
@ -89,30 +121,6 @@ local chapter_board = {
1, 1,
0 0
}, },
{
0,
4
},
{
0,
4
},
{
0,
2
},
{
0,
2
},
{
0,
4
},
{
1,
0
},
{ {
1, 1,
0 0
@ -122,16 +130,8 @@ local chapter_board = {
0 0
}, },
{ {
0, 1,
2 0
},
{
0,
3
},
{
0,
3
}, },
{ {
1, 1,
@ -199,16 +199,18 @@ local chapter_board = {
} }
}, },
["control_element"]={ ["control_element"]={
2,
3,
3,
2,
2, 2,
2, 2,
2, 2,
4, 4,
2, 2,
4,
2, 2,
2, 2,
2, 3
2
} }
}, },
[2]={ [2]={

View File

@ -653,6 +653,7 @@ local skill_rogue = {
[200100]={ [200100]={
["limit_times"]=1, ["limit_times"]=1,
["weight"]=30000, ["weight"]=30000,
["qlt"]=4,
["type"]=6, ["type"]=6,
["skill_position"]=3, ["skill_position"]=3,
["icon"]="55" ["icon"]="55"

View File

@ -3,8 +3,7 @@ local ServerChapterData = class("ServerChapterData", ServerBaseData)
local MIN_CHAPTER_ID = 1 local MIN_CHAPTER_ID = 1
function ServerChapterData:init(data) function ServerChapterData:init(data)
self.data.chapterId = data and data.chapterId or MIN_CHAPTER_ID self.data.maxChapterId = data and data.maxChapterId or (MIN_CHAPTER_ID - 1)
self.data.maxChapterId = data and data.maxChapterId or (self.data.chapterId - 1)
self.data.chapterBoxInfo = data and data.chapterBoxInfo or {} self.data.chapterBoxInfo = data and data.chapterBoxInfo or {}
self.data.chapterFightInfo = data and data.chapterFightInfo or {} self.data.chapterFightInfo = data and data.chapterFightInfo or {}
end end

View File

@ -18,10 +18,10 @@ function ChapterData:clear()
end end
function ChapterData:init(data, notChangeChapterId) function ChapterData:init(data, notChangeChapterId)
self.data.maxChapterId = data and data.maxChapterId or MIN_CHAPTER_ID - 1
if not notChangeChapterId then if not notChangeChapterId then
self.data.chapterId = data and data.chapterId or MIN_CHAPTER_ID self.data.chapterId = self:getNextChapter(self.data.maxChapterId)
end end
self.data.maxChapterId = data and data.maxChapterId or self.data.chapterId - 1
self.data.chapterBoxInfo = data and data.chapterBoxInfo or {} self.data.chapterBoxInfo = data and data.chapterBoxInfo or {}
self.data.chapterFightInfo = data and data.chapterFightInfo or {} self.data.chapterFightInfo = data and data.chapterFightInfo or {}
end end
@ -54,16 +54,24 @@ function ChapterData:setChapterId(chapterId)
self.data.chapterId = chapterId self.data.chapterId = chapterId
end end
function ChapterData:goNextChapter() function ChapterData:getNextChapter(chapterId)
local chapterInfo = self:getChapterCfg()[self.data.chapterId] local chapterInfo = self:getChapterCfg()[chapterId]
if chapterInfo == nil then if chapterInfo == nil then
return false return chapterId
end end
local chapterId = chapterInfo.next_chapter if chapterInfo.next_chapter == nil then
if chapterId == nil then return chapterId
return false end
return chapterInfo.next_chapter
end
function ChapterData:goNextChapter()
local chapterId = self:getNextChapter(self.data.chapterId)
if self.data.chapterId == chapterId then
return false
else
self.data.chapterId = chapterId
end end
self.data.chapterId = chapterId
return true return true
end end