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

43 lines
1.5 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

GuildTranscriptManager = {};
local this = GuildTranscriptManager
local guildCheckpointConfig = ConfigManager.GetConfig(ConfigName.GuildCheckpointConfig)
local allChapterConfigData = {}
local curBoss = 1--当前bossId
local blood = 0--剩余血量万分比
local canSweep = 0--是否能扫荡今天是否挑战过这个boss
function this.Initialize()
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
end
return this