134 lines
2.8 KiB
Lua
134 lines
2.8 KiB
Lua
local DungeonBaseEntity = class("DungeonBaseEntity", BaseData)
|
||
|
||
-- 需要继承重写的部分 ***********************************************************
|
||
|
||
-- 初始化服务器数据
|
||
function DungeonBaseEntity:init(data)
|
||
end
|
||
|
||
-- 获取副本模块名,对应ModuleManager.MODULE_KEY
|
||
function DungeonBaseEntity:getModuleKey()
|
||
return nil
|
||
end
|
||
|
||
-- 获取副本开启周期(星期几)
|
||
function DungeonBaseEntity:getOpenWeekCycle()
|
||
return nil
|
||
end
|
||
|
||
function DungeonBaseEntity:getIsAllTimeOpen()
|
||
return false
|
||
end
|
||
|
||
function DungeonBaseEntity:getCloseTime()
|
||
return nil
|
||
end
|
||
|
||
-- 获取副本配置名称
|
||
function DungeonBaseEntity:getConfigName()
|
||
return nil
|
||
end
|
||
|
||
-- 获取副本标题文案
|
||
function DungeonBaseEntity:getTitleString()
|
||
return nil
|
||
end
|
||
|
||
-- 获取副本规则描述
|
||
function DungeonBaseEntity:getRuleString()
|
||
return nil
|
||
end
|
||
|
||
-- 获取副本boss抗性
|
||
function DungeonBaseEntity:getBossBuff(id)
|
||
return nil
|
||
end
|
||
|
||
-- 获取开始时间描述
|
||
function DungeonBaseEntity:getOpenWeekString()
|
||
return nil
|
||
end
|
||
|
||
-- 获取副本角标图
|
||
function DungeonBaseEntity:getIcon()
|
||
return nil
|
||
end
|
||
|
||
-- 获取副本banner图
|
||
function DungeonBaseEntity:getBanner()
|
||
return nil
|
||
end
|
||
|
||
-- 获取开启时间文本颜色
|
||
function DungeonBaseEntity:getOpenTextColor()
|
||
return nil
|
||
end
|
||
|
||
-- 获取总挑战次数
|
||
function DungeonBaseEntity:getTotalChallengeCount()
|
||
return nil
|
||
end
|
||
|
||
-- 获取今日已挑战次数
|
||
function DungeonBaseEntity:getTodayChallengeCount()
|
||
return 0
|
||
end
|
||
|
||
-- 获取已通关的最大副本id
|
||
function DungeonBaseEntity:getPassedMaxId()
|
||
return nil
|
||
end
|
||
|
||
-- 获取挑战体力消耗
|
||
function DungeonBaseEntity:getChallengeHpCost()
|
||
return nil
|
||
end
|
||
|
||
-- 获取每日最大挑战次数
|
||
function DungeonBaseEntity:getTodayMaxCount()
|
||
return 1
|
||
end
|
||
|
||
-- 获取看板展示的副本奖励(返回id list)
|
||
function DungeonBaseEntity:getBoardShowRewardId()
|
||
return nil
|
||
end
|
||
|
||
-- 获取首通奖励个数
|
||
function DungeonBaseEntity:getFirstRewardNum()
|
||
return 0
|
||
end
|
||
|
||
-- 获取通关奖励个数
|
||
function DungeonBaseEntity:getPassRewardNum()
|
||
return 0
|
||
end
|
||
|
||
function DungeonBaseEntity:isNoTotalLimit()
|
||
return false
|
||
end
|
||
|
||
function DungeonBaseEntity:isNotShowLimitCount()
|
||
return false
|
||
end
|
||
|
||
function DungeonBaseEntity:onClickFight()
|
||
UIManager:showUI("app/ui/dungeon/dungeon_difficulty_ui", {module = self:getModuleKey()})
|
||
end
|
||
|
||
-- 常规逻辑 *********************************************************************
|
||
|
||
-- 获取今日剩余挑战次数
|
||
function DungeonBaseEntity:getTodayRemainLimitCount()
|
||
if self:isNoTotalLimit() then
|
||
return 1
|
||
end
|
||
return self:getTodayMaxCount() - self:getTodayChallengeCount()
|
||
end
|
||
|
||
-- 获取副本配置
|
||
function DungeonBaseEntity:getConfig()
|
||
return ConfigManager:getConfig(self:getConfigName())
|
||
end
|
||
|
||
return DungeonBaseEntity |