local Dialogue_Model = {} -- Dialogue_Model.DialogueType = -- { -- None = 0, -- Normal = 1, -- Light = 2, -- TipYellow = 3, -- TipBlue = 4, -- TipBottom = 5, -- BubbleOrder = 6, -- BubbleRandom = 7, -- } Dialogue_Model.DialogueType = LuaConst.EDialogueType function Dialogue_Model.GetDialogueListByID(id) local list = {} for i,v in DataSheetManager.DialogueData:GetDataByTaskDialoID_SubID(id) do table.insert(list, v) end return list end function Dialogue_Model.GetDialogueIndex(id,random) local length = DataSheetManager.DialogueData:GetDataLengthByTaskDialoID_SubID(id) if random then local index = math.random(1,length) return index,index else return 1,length end end function Dialogue_Model.GetDialogueDetail(id,index) local data = DataSheetManager.DialogueData:GetDataByFirstKeyAndIndex(id,index) return data.Text,data.Duration end function Dialogue_Model.GetDialogueTypeByID(id) local data = DataSheetManager.DialogueData:GetDataByFirstKeyAndIndex(id,1) return data and data.DialogueType or nil end function Dialogue_Model.CheckDialogueUniqueByID(id) local data = DataSheetManager.DialogueData:GetDataByFirstKeyAndIndex(id,1) if data then return data.KeepUnique end end return Dialogue_Model