Update - 2.1.0.147
EN: 2.1.0.147 CN: 2.1.0.147 JP: 2.1.0.149 KR: 2.1.0.154
This commit is contained in:
@@ -272,6 +272,9 @@ function DormContactBtnListCtrl:ExitCharActive()
|
||||
NovaAPI.DispatchEventWithData("DORM_LUA_INTERACTIVE_WITH_ACTOR_CALLBACK", nil, {0})
|
||||
end
|
||||
function DormContactBtnListCtrl:CheckHasBtn()
|
||||
if self.mapCurCharInfo ~= nil then
|
||||
return false
|
||||
end
|
||||
if next(self.mapListBtn) ~= nil then
|
||||
return true
|
||||
end
|
||||
@@ -336,12 +339,6 @@ function DormContactBtnListCtrl:OnBtnClick_Interactive1()
|
||||
}, callback)
|
||||
end
|
||||
function DormContactBtnListCtrl:OnBtnClick_Interactive2()
|
||||
local nDayCount = PlayerData.PlayerDormData:GetCharGiftCountDay(self.mapCurCharInfo.nDataId)
|
||||
if nDayCount < 1 then
|
||||
local tips = ConfigTable.GetUIText("Dorm_GiftCountMaxHint")
|
||||
EventManager.Hit(EventId.OpenMessageBox, tips)
|
||||
return
|
||||
end
|
||||
self._mapNode.rtGiftRoot.gameObject:SetActive(true)
|
||||
self._mapNode.rtCharInteractiveHide:SetActive(false)
|
||||
self._mapNode.rtGiftRoot:OpenGiftChoose(self.mapCurCharInfo.nDataId, self)
|
||||
|
||||
@@ -72,6 +72,7 @@ function DormInteractiveGiftCtrl:OpenGiftChoose(nCharId, parent)
|
||||
self.curFavourLevel = affinityData.Level
|
||||
self.curFavourExp = affinityData.Exp
|
||||
self.nMaxSendGiftCount = PlayerData.PlayerDormData:GetCharGiftCountDay(nCharId)
|
||||
self.nMaxSendGiftCfgCount = tonumber(ConfigTable.GetConfigNumber("AffinityGiftSendCount"))
|
||||
local mapCharDesc = ConfigTable.GetData("CharacterDes", self.nCharId)
|
||||
if mapCharDesc ~= nil then
|
||||
self.PreferenceData = {
|
||||
@@ -146,7 +147,7 @@ function DormInteractiveGiftCtrl:RefreshItemGrid(grid)
|
||||
local imgAffinityLevel = grid.transform:Find("btnGrid/AnimRoot/tc_item_02/imgAffinityGiftLevel"):GetComponent("Image")
|
||||
local level = mapItem.favourLevel
|
||||
self:SetAtlasSprite(imgAffinityLevel, "11_ico", "zs_present_heart_" .. level)
|
||||
if self.tbChooseItem ~= nil and self.tbChooseItem.nIdx == nIndex then
|
||||
if self.tbChooseItem ~= nil and self.tbChooseItem[nIndex] ~= nil then
|
||||
self.tbGridCtrl[nInstanceID]:SetMultiSelected_Blue(true)
|
||||
end
|
||||
end
|
||||
@@ -267,7 +268,7 @@ function DormInteractiveGiftCtrl:GetGiftFavourLevel(tags)
|
||||
return 2
|
||||
end
|
||||
function DormInteractiveGiftCtrl:SetDaySendCount()
|
||||
local nCount = 0
|
||||
local nCount = self.nMaxSendGiftCfgCount - self.nMaxSendGiftCount
|
||||
if self.tbChooseItem ~= nil then
|
||||
for nIndex, v in pairs(self.tbChooseItem) do
|
||||
if v ~= nil then
|
||||
@@ -275,7 +276,7 @@ function DormInteractiveGiftCtrl:SetDaySendCount()
|
||||
end
|
||||
end
|
||||
end
|
||||
NovaAPI.SetTMPText(self._mapNode.txtGiftCount, orderedFormat(ConfigTable.GetUIText("Phone_Gift_Send_Day_Count_1"), nCount, self.nMaxSendGiftCount))
|
||||
NovaAPI.SetTMPText(self._mapNode.txtGiftCount, orderedFormat(ConfigTable.GetUIText("Phone_Gift_Send_Day_Count_1"), nCount, self.nMaxSendGiftCfgCount))
|
||||
end
|
||||
function DormInteractiveGiftCtrl:Exit()
|
||||
if self.tbGridCtrl then
|
||||
|
||||
@@ -36,7 +36,11 @@ DormCtrl._mapNodeConfig = {
|
||||
sComponentName = "TMP_Text",
|
||||
sLanguageId = "MainView_ShowUI"
|
||||
},
|
||||
rtMenu = {}
|
||||
rtMenu = {},
|
||||
rtMenuCanvasGroup = {
|
||||
sNodeName = "rtMenu",
|
||||
sComponentName = "CanvasGroup"
|
||||
}
|
||||
}
|
||||
DormCtrl._mapEventConfig = {
|
||||
[EventId.UIBackConfirm] = "OnEvent_Back",
|
||||
@@ -61,6 +65,7 @@ DormCtrl._mapEventConfig = {
|
||||
DormBackHome = "OnEvent_BackHome",
|
||||
DormNewRoomUnlock = "OnEvent_DormNewRoomUnlock",
|
||||
DormElevatorHideUI = "OnEvent_DormElevatorHideUI",
|
||||
DormShowInteractiveBtns = "OnEvent_DormShowInteractiveBtns",
|
||||
[EventId.OpenPanel] = "OnEvent_DormGlobalOpenPanel",
|
||||
[EventId.ClosePanel] = "OnEvent_DormGlobalClosePanel"
|
||||
}
|
||||
@@ -235,12 +240,14 @@ function DormCtrl:OnEnable()
|
||||
self.bNeedSwitchModeAfterLoad = true
|
||||
self.bHide = false
|
||||
self._mapNode.btnShowMenu.gameObject:SetActive(false)
|
||||
NovaAPI.DispatchEventWithData("DORM_LUA_SET_UI_HIDDEN", nil, {0})
|
||||
DormGuideUI.Bind(self)
|
||||
end
|
||||
function DormCtrl:OnDisable()
|
||||
DormGuideUI.Unbind(self)
|
||||
self._panel._tbParam[1] = self._panel.nCurRoom
|
||||
GamepadUIManager.SetVirtualMouseStickEnable(true)
|
||||
NovaAPI.DispatchEventWithData("DORM_LUA_SET_UI_HIDDEN", nil, {61})
|
||||
end
|
||||
function DormCtrl:SwitchRoom(nRoomId)
|
||||
local nNextRoom = nRoomId
|
||||
@@ -493,6 +500,9 @@ function DormCtrl:OnEvent_Home(nPanelId)
|
||||
end
|
||||
self:BtnClick_Home(nPanelId)
|
||||
end
|
||||
function DormCtrl:OnEvent_DormShowInteractiveBtns(bShow)
|
||||
NovaAPI.SetCanvasGroupBlocksRaycasts(self._mapNode.rtMenuCanvasGroup, bShow)
|
||||
end
|
||||
function DormCtrl:BtnClick_Back(nPanelId)
|
||||
if self._panel.nCurMode == 2 then
|
||||
self:OnEvent_InteractiveMode()
|
||||
|
||||
@@ -157,7 +157,7 @@ function DormHandbookCtrl:OnEnable()
|
||||
local nAchievementIdx = 0
|
||||
for idx, nId in ipairs(self.tbAchievement) do
|
||||
local nState = self.mapAchievementState[nId] or 0
|
||||
if nState == 2 then
|
||||
if nState ~= 0 then
|
||||
nAchievementIdx = idx
|
||||
break
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user