Update - 1.9.0.107
EN: 1.9.0.107 CN: 1.9.0.108 JP: 1.9.0.112 KR: 1.9.0.112
This commit is contained in:
@@ -168,16 +168,20 @@ function PhoneChatCtrl:RefreshContent()
|
||||
end
|
||||
end
|
||||
function PhoneChatCtrl:CheckNextMessage(nCurProcess, index)
|
||||
local data = self.chatData.avgMsg[nCurProcess + index]
|
||||
if data == nil then
|
||||
return
|
||||
end
|
||||
local state = self._mapNode.goPhone:GetNextDataState(data)
|
||||
if state < 0 then
|
||||
self._mapNode.goPhone:ShowNextInputingPhoneMsg(state)
|
||||
elseif state == 0 then
|
||||
index = index + 1
|
||||
self:CheckNextMessage(nCurProcess, index)
|
||||
while true do
|
||||
local data = self.chatData.avgMsg[nCurProcess + index]
|
||||
if data == nil then
|
||||
return
|
||||
end
|
||||
local state = self._mapNode.goPhone:GetNextDataState(data)
|
||||
if state < 0 then
|
||||
self._mapNode.goPhone:ShowNextInputingPhoneMsg(state)
|
||||
return
|
||||
elseif state == 0 then
|
||||
index = index + 1
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
function PhoneChatCtrl:RevertHistoryList()
|
||||
@@ -329,6 +333,9 @@ function PhoneChatCtrl:OnEvent_ReceiveChatReward()
|
||||
end
|
||||
end
|
||||
function PhoneChatCtrl:OnEvent_AvgShowNextPhoneMessage()
|
||||
if self.chatData == nil then
|
||||
return
|
||||
end
|
||||
if self.chatData.nStatus ~= AllEnum.PhoneChatState.Complete then
|
||||
self.nChatProcess = self.nChatProcess + 1
|
||||
self:RefreshContent()
|
||||
@@ -337,6 +344,9 @@ function PhoneChatCtrl:OnEvent_AvgShowNextPhoneMessage()
|
||||
end
|
||||
end
|
||||
function PhoneChatCtrl:OnEvent_AvgSelectPhoneMsgChoice(groupID, choiceIndex)
|
||||
if self.nSelectChatId == nil then
|
||||
return
|
||||
end
|
||||
local nEndCmdId = PlayerData.Phone:SetPhoneMsgChoiceJumpTo(self.nSelectChatId, groupID, choiceIndex)
|
||||
local nStartCmdId = PlayerData.Phone:GetAvgStartCmdId(self.nSelectChatId)
|
||||
self.nChatProcess = nEndCmdId - nStartCmdId + 1
|
||||
@@ -346,6 +356,9 @@ function PhoneChatCtrl:OnEvent_AvgSelectPhoneMsgChoice(groupID, choiceIndex)
|
||||
self:CheckChatComplete()
|
||||
end
|
||||
function PhoneChatCtrl:OnEvent_AvgSetToPhoneMsgChoiceEnd(groupID, bAuto)
|
||||
if self.nSelectChatId == nil then
|
||||
return
|
||||
end
|
||||
local nEndCmdId = PlayerData.Phone:SetPhoneMsgChoiceEnd(self.nSelectChatId, groupID)
|
||||
local nStartCmdId = PlayerData.Phone:GetAvgStartCmdId(self.nSelectChatId)
|
||||
self.nChatProcess = nEndCmdId - nStartCmdId
|
||||
|
||||
@@ -216,7 +216,6 @@ end
|
||||
local mapCharEmoji = {}
|
||||
local tbCharEmoji = {}
|
||||
local nLayerIndex = 0
|
||||
local timerEmoji
|
||||
local LoadPresetEmoji = function()
|
||||
local sPath = "Game.UI.Avg.AvgPreset"
|
||||
local AvgPreset = require(sPath)
|
||||
@@ -232,6 +231,9 @@ local LoadPresetEmoji = function()
|
||||
nLayerIndex = CS.UnityEngine.LayerMask.NameToLayer("Cam_Layer_4")
|
||||
end
|
||||
function DatingCtrl:SetEmoji(sEmoji)
|
||||
if sEmoji == nil or sEmoji == "" then
|
||||
return
|
||||
end
|
||||
local mapCharCfg = ConfigTable.GetData_Character(self._panel.nCharId)
|
||||
if mapCharCfg == nil then
|
||||
return
|
||||
@@ -247,8 +249,8 @@ function DatingCtrl:SetEmoji(sEmoji)
|
||||
local s, x, y = objOffset:GetEmojiData(self:GetOffsetPanelId(), indexOfPose(sPose), table.indexof(tbCharEmoji, sEmoji), nX, nY)
|
||||
local v3OffsetPos = Vector3(x, y, 0)
|
||||
local v3OffsetScale = Vector3(s, math.abs(s), 1)
|
||||
if timerEmoji ~= nil then
|
||||
timerEmoji:Cancel(true)
|
||||
if self.timerEmoji ~= nil then
|
||||
self.timerEmoji:Cancel(true)
|
||||
end
|
||||
local sEmojiFullPath = string.format("UI/Avg/AnimEmoji/%s.prefab", sEmoji)
|
||||
local goEmojiIns = self:CreatePrefabInstance(sEmojiFullPath, self._mapNode.trEmoji)
|
||||
@@ -263,9 +265,9 @@ function DatingCtrl:SetEmoji(sEmoji)
|
||||
if sEmojiSoundName ~= nil then
|
||||
CS.WwiseAudioManager.Instance:PlaySound(sEmojiSoundName)
|
||||
end
|
||||
timerEmoji = TimerManager.Add(1, 3, Actor2DManager, function()
|
||||
self.timerEmoji = TimerManager.Add(1, 3, Actor2DManager, function()
|
||||
destroy(goEmojiIns)
|
||||
timerEmoji = nil
|
||||
self.timerEmoji = nil
|
||||
end, true, true, true, nil)
|
||||
end
|
||||
function DatingCtrl:SetBubble(sContent, nDuration)
|
||||
@@ -613,7 +615,7 @@ function DatingCtrl:OnEvent_DatingOptionSelected(nOptionIndex)
|
||||
if nBranchBId ~= 0 then
|
||||
table.insert(tbNewEvents, {
|
||||
nId = nBranchBId,
|
||||
nType = GameEnum.DatingEventType.BranchA
|
||||
nType = GameEnum.DatingEventType.BranchB
|
||||
})
|
||||
end
|
||||
self.tbBranchOptionIds = msgData.BranchBOptionIds
|
||||
|
||||
@@ -116,8 +116,8 @@ function DatingEventCtrl:SetEventList(tbEvent, tbEventId)
|
||||
self._mapNode.goEventEndItem.gameObject:SetActive(false)
|
||||
self._mapNode.imgSpeed1.gameObject:SetActive(not self.bSpeed)
|
||||
self._mapNode.imgSpeed2.gameObject:SetActive(self.bSpeed)
|
||||
self._mapNode.imgSpeed1.gameObject:SetActive(not self.bAuto)
|
||||
self._mapNode.imgSpeed2.gameObject:SetActive(self.bAuto)
|
||||
self._mapNode.imgAutoPlay1.gameObject:SetActive(not self.bAuto)
|
||||
self._mapNode.imgAutoPlay2.gameObject:SetActive(self.bAuto)
|
||||
self.nCurIndex = 1
|
||||
if self.nEventId == nil then
|
||||
self.nEventId = 1
|
||||
|
||||
@@ -84,9 +84,18 @@ function DatingEventOptionItemCtrl:SkipTimer()
|
||||
self:SelectDefault()
|
||||
end
|
||||
function DatingEventOptionItemCtrl:Awake()
|
||||
end
|
||||
function DatingEventOptionItemCtrl:OnEnable()
|
||||
self.bSelected = false
|
||||
self.animator = self.gameObject:GetComponent("Animator")
|
||||
end
|
||||
function DatingEventOptionItemCtrl:OnDisable()
|
||||
if self.tbBtnCtrl ~= nil then
|
||||
for k, v in pairs(self.tbBtnCtrl) do
|
||||
v.onClick:RemoveAllListeners()
|
||||
v = nil
|
||||
end
|
||||
self.tbBtnCtrl = nil
|
||||
end
|
||||
end
|
||||
return DatingEventOptionItemCtrl
|
||||
|
||||
@@ -401,6 +401,10 @@ function DatingGiftCtrl:OnBtnClick_Present()
|
||||
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("Gift_Send_Item_Empty"))
|
||||
return
|
||||
end
|
||||
if self.tbChooseItem == nil or next(self.tbChooseItem) == nil then
|
||||
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("Gift_Send_Not_Select"))
|
||||
return
|
||||
end
|
||||
local tbItems = {}
|
||||
local tbSendItems = {}
|
||||
for nIndex, v in pairs(self.tbChooseItem) do
|
||||
|
||||
@@ -99,6 +99,9 @@ function DatingLandmarkCtrl:OnBtnClick_Goto(btn, nIndex)
|
||||
end
|
||||
self.nLandmarkId = self.tbLandmark[nIndex].Id
|
||||
PlayerData.Dating:SendDatingLandmarkSelectMsg(self.nCharId, self.nLandmarkId, callback)
|
||||
for k, v in pairs(self._mapNode.btnGoto) do
|
||||
v.interactable = false
|
||||
end
|
||||
end
|
||||
function DatingLandmarkCtrl:OnBtnClick_Back()
|
||||
EventManager.Hit(EventId.ClosePanel, PanelId.DatingLandmark)
|
||||
|
||||
@@ -77,6 +77,8 @@ function GiftCharItemCtrl:RefreshGiftLevel()
|
||||
else
|
||||
NovaAPI.SetTMPText(self._mapNode.txtProgress, string.format("%d/%d", curFavourExp, data.NeedExp))
|
||||
end
|
||||
local nCurLevel = curFavourLevel >= maxAffinityLevel and maxAffinityLevel or curFavourLevel
|
||||
data = CacheTable.GetData("_AffinityLevel", templateId)[nCurLevel]
|
||||
self:SetPngSprite(self._mapNode.imgAffinityLv, data.AffinityLevelIcon .. "_s")
|
||||
self._mapNode.rectProgress.gameObject:SetActive(0 < curFavourExp or curFavourLevel >= maxAffinityLevel)
|
||||
end
|
||||
|
||||
@@ -210,7 +210,7 @@ function PhoneCtrl:PlayTogAnim()
|
||||
elseif self._panel.nCurTog == tog_Dating then
|
||||
sAnim = "PhonePanel_goDating_in"
|
||||
end
|
||||
local nAnimeLen = NovaAPI.GetAnimClipLength(self._mapNode.animContent, {"sAnim"})
|
||||
local nAnimeLen = NovaAPI.GetAnimClipLength(self._mapNode.animContent, {sAnim})
|
||||
self._mapNode.animContent:Play(sAnim)
|
||||
return nAnimeLen
|
||||
end
|
||||
@@ -230,7 +230,7 @@ function PhoneCtrl:RefreshTogInfo(bResetChar)
|
||||
end
|
||||
NovaAPI.SetTMPText(self._mapNode.txtPhoneTitle, ConfigTable.GetUIText("Phone_Tog_Chat"))
|
||||
self.tbAddressBookList = PlayerData.Phone:GetAddressBookList()
|
||||
self:RefreshAddressBookList(false)
|
||||
self:RefreshAddressBookList(false, false)
|
||||
self:RefreshSelectChat()
|
||||
for _, v in pairs(self.tbAddressGridCtrl) do
|
||||
v:RefreshRedDotShow()
|
||||
@@ -280,7 +280,7 @@ function PhoneCtrl:ChangeTog(bInit)
|
||||
self._mapNode.togGift:SetDefault(self._panel.nCurTog == tog_Gift)
|
||||
self._mapNode.togDating:SetDefault(self._panel.nCurTog == tog_Dating)
|
||||
end
|
||||
function PhoneCtrl:RefreshAddressBookList(bSetTop)
|
||||
function PhoneCtrl:RefreshAddressBookList(bSetTop, bTrackPos)
|
||||
for nInstanceId, objCtrl in pairs(self.tbAddressGridCtrl) do
|
||||
self:UnbindCtrlByNode(objCtrl)
|
||||
self.tbAddressGridCtrl[nInstanceId] = nil
|
||||
@@ -299,6 +299,9 @@ function PhoneCtrl:RefreshAddressBookList(bSetTop)
|
||||
end
|
||||
local bKeepPos = self.nSelectIndex ~= 1 or bSetTop
|
||||
self._mapNode.addressBookListLSV:Init(#self.tbAddressBookList, self, self.OnAddressGridRefresh, self.OnAddressGridBtnClick, bKeepPos)
|
||||
if bTrackPos then
|
||||
self._mapNode.addressBookListLSV:SetScrollGridPos(self.nSelectIndex - 1, 0.5)
|
||||
end
|
||||
end
|
||||
function PhoneCtrl:RefreshSelectChat()
|
||||
local mapAddressData = self.tbAddressBookList[self.nSelectIndex]
|
||||
@@ -362,7 +365,7 @@ function PhoneCtrl:RefreshCharList(bMax)
|
||||
end
|
||||
return a.affinityData.Level > b.affinityData.Level
|
||||
end)
|
||||
if self._panel.nSelectCharId == nil then
|
||||
if self._panel.nSelectCharId == nil and #self.mapCharList > 0 then
|
||||
self._panel.nSelectCharId = self.mapCharList[1].nCharId
|
||||
end
|
||||
for k, v in ipairs(self.mapCharList) do
|
||||
@@ -440,7 +443,7 @@ function PhoneCtrl:RefreshDatingCharList()
|
||||
self:UnbindCtrlByNode(objCtrl)
|
||||
self.tbDatingGridCtrl[nInstanceId] = nil
|
||||
end
|
||||
if self._panel.nSelectCharId == nil then
|
||||
if self._panel.nSelectCharId == nil and #self.mapCharList > 0 then
|
||||
self._panel.nSelectCharId = self.mapCharList[1].nCharId
|
||||
end
|
||||
for k, v in ipairs(self.mapCharList) do
|
||||
@@ -623,6 +626,9 @@ function PhoneCtrl:OnEvent_RefreshPhoneAddress(nChatId, bRefreshContent)
|
||||
if bRefreshContent == true then
|
||||
self._mapNode.goChat:RefreshChatContent(nChatId, true)
|
||||
end
|
||||
if self.nSelectIndex == nil then
|
||||
return
|
||||
end
|
||||
local goSelect = self._mapNode.trAddressLSV:Find("Viewport/Content/" .. self.nSelectIndex - 1)
|
||||
if goSelect then
|
||||
self.tbAddressGridCtrl[goSelect.gameObject:GetInstanceID()]:RefreshChatContent(nChatId)
|
||||
@@ -651,8 +657,7 @@ function PhoneCtrl:OnEvent_NewChatTrigger(nAddressId, nChatId)
|
||||
end
|
||||
self.nSelectAddressId = nAddressId
|
||||
self.tbAddressBookList = tbNewAddress
|
||||
self.nSelectAddressId = nAddressId
|
||||
self:RefreshAddressBookList(false)
|
||||
self:RefreshAddressBookList(false, true)
|
||||
self._mapNode.goChat:SetChatContent(newAddressData, nChatId)
|
||||
self:OnEvent_RefreshPhoneAddress(nChatId, false)
|
||||
WwiseAudioMgr:PostEvent("ui_cellphone_message_pop")
|
||||
@@ -680,9 +685,9 @@ end
|
||||
function PhoneCtrl:OnEvent_ChangePhoneListTopStatus(nAddressId, bTop)
|
||||
PlayerData.Phone:SetPhoneTopStatus(nAddressId, bTop)
|
||||
self.tbAddressBookList = PlayerData.Phone:GetAddressBookList()
|
||||
self:RefreshAddressBookList(true)
|
||||
self:RefreshAddressBookList(true, false)
|
||||
for nIdx, v in ipairs(self.tbAddressBookList) do
|
||||
if v.nAddressId == nAddressId then
|
||||
if v.nAddressId == nAddressId and bTop == true then
|
||||
self._mapNode.addressBookListLSV:SetScrollGridPos(nIdx - 1, 0.5)
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user