miduo_client/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptManager.lua

43 lines
1.5 KiB
Lua
Raw Normal View History

2020-08-18 19:33:31 +08:00
GuildTranscriptManager = {};
local this = GuildTranscriptManager
2020-08-19 17:28:17 +08:00
local guildCheckpointConfig = ConfigManager.GetConfig(ConfigName.GuildCheckpointConfig)
local allChapterConfigData = {}
local curBoss = 1--当前bossId
local blood = 0--剩余血量万分比
local canSweep = 0--是否能扫荡今天是否挑战过这个boss
2020-08-18 19:33:31 +08:00
function this.Initialize()
2020-08-19 17:28:17 +08:00
for _, configInfo in ConfigPairs(guildCheckpointConfig) do
table.insert(allChapterConfigData,configInfo)
end
end
function this.GetAllConFigData()
return allChapterConfigData
end
--请求当前副本章节
function this.GetGuildChallengeInfoRequest(fun)
NetManager.GetGuildChallengeInfoRequest(function (msg)
curBoss = msg.curBoss
blood = msg.blood
canSweep = msg.canSweep
LogPink("curBoss "..curBoss.." blood "..blood.." canSweep "..canSweep)
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
end)
end
--请求战斗
function this.GuildChallengeRequest(attackType,callBack)
LogPink("this.GetCurBoss() "..this.GetCurBoss().." attackType "..attackType)
NetManager.GuildChallengeRequest(this.GetCurBoss(),attackType,function (msg)
local fightData = BattleManager.GetBattleServerData(msg)
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.GuildTranscript, callBack)
end)
end
function this.GetCurBoss()
return curBoss
end
function this.GetBlood()
return blood
end
function this.GetCanSweep()
return canSweep
2020-08-18 19:33:31 +08:00
end
return this