Update - 1.12.0.120
EN: 1.12.0.120 CN: 1.12.0.120 JP: 1.12.0.124 KR: 1.12.0.124
This commit is contained in:
@@ -43,8 +43,8 @@ function AddressBookItemCtrl:RefreshChatContent(nChatId)
|
||||
end
|
||||
self.chatData = chatData
|
||||
local nProcess = 1
|
||||
if self.chatData.nStatus == AllEnum.PhoneChatState.Complete then
|
||||
nProcess = #self.chatData.avgMsg
|
||||
if self.chatData.nStatus == AllEnum.PhoneChatState.Complete and PlayerData.Phone:EnsureChatAvgLoaded(self.chatData) then
|
||||
nProcess = self.chatData.nAllProcess
|
||||
end
|
||||
local chatMsg = PlayerData.Phone:GetChatMsg(self.chatData, nProcess)
|
||||
local sContent = ""
|
||||
|
||||
@@ -119,6 +119,9 @@ function PhoneChatCtrl:RefreshChatContent(nSelectChatId, bReset, bRestart, bCoun
|
||||
self:OpenHistoryList()
|
||||
end
|
||||
if nil ~= self.chatData then
|
||||
if not PlayerData.Phone:EnsureChatAvgLoaded(self.chatData) then
|
||||
return
|
||||
end
|
||||
if bRestart and self.chatData.nStatus ~= AllEnum.PhoneChatState.Complete then
|
||||
self.nChatProcess = 0
|
||||
self.nInitProcess = 0
|
||||
@@ -138,6 +141,7 @@ function PhoneChatCtrl:RefreshChatContent(nSelectChatId, bReset, bRestart, bCoun
|
||||
self:ResetPhone()
|
||||
self._mapNode.goPhone:_SetAutoPlayState(false)
|
||||
if self.nChatProcess > 1 then
|
||||
PlayerData.Phone:EnsureChatHistoryParsed(self.chatData)
|
||||
self:RevertHistoryList()
|
||||
else
|
||||
self:RefreshContent()
|
||||
@@ -185,8 +189,8 @@ function PhoneChatCtrl:CheckNextMessage(nCurProcess, index)
|
||||
end
|
||||
end
|
||||
function PhoneChatCtrl:RevertHistoryList()
|
||||
local selectionData = PlayerData.Phone:GetHistoryPhoneSelectionData(self.nSelectChatId)
|
||||
local historyData = PlayerData.Phone:GetHistoryPhoneMsgData(self.nSelectChatId)
|
||||
local selectionData = PlayerData.Phone:GetHistoryPhoneSelectionData(self.nSelectChatId, self.chatData)
|
||||
local historyData = PlayerData.Phone:GetHistoryPhoneMsgData(self.nSelectChatId, self.chatData)
|
||||
if historyData ~= nil then
|
||||
self._mapNode.goPhone:SetHistoryPhoneMsg(historyData, selectionData)
|
||||
end
|
||||
@@ -314,6 +318,7 @@ function PhoneChatCtrl:OnDisable()
|
||||
self.nInitProcess = 0
|
||||
self.tbSelection = {}
|
||||
self.nSelectChatId = nil
|
||||
self.receiveRewardCb = nil
|
||||
end
|
||||
function PhoneChatCtrl:OnDestroy()
|
||||
end
|
||||
@@ -380,6 +385,9 @@ function PhoneChatCtrl:OnEvent_RecordChatProcessSuccess(mapChangeInfo)
|
||||
if self.chatData.tbSelection ~= nil then
|
||||
self.tbSelection = self.chatData.tbSelection
|
||||
end
|
||||
if self.receiveRewardCb ~= nil then
|
||||
return
|
||||
end
|
||||
if self.chatData.nStatus == AllEnum.PhoneChatState.Complete then
|
||||
local tbPlot = CacheTable.GetData("_PlotChat", self.nSelectChatId)
|
||||
local bPlotLock = true
|
||||
|
||||
@@ -165,20 +165,21 @@ function DatingGiftCtrl:RefreshSendGift()
|
||||
end
|
||||
function DatingGiftCtrl:RefreshItemList()
|
||||
self.tbItemData = {}
|
||||
local tbAllItem = {}
|
||||
local listCount = 0
|
||||
local foreachAffinityGift = function(mapData)
|
||||
local count = PlayerData.Item:GetItemCountByID(mapData.Id)
|
||||
if 0 < count then
|
||||
for i = 1, count do
|
||||
listCount = listCount + 1
|
||||
local itemData = ConfigTable.GetData_Item(mapData.Id)
|
||||
table.insert(self.tbItemData, {
|
||||
local nCount = PlayerData.Item:GetItemCountByID(mapData.Id)
|
||||
if 0 < nCount then
|
||||
local itemData = ConfigTable.GetData_Item(mapData.Id)
|
||||
if itemData ~= nil then
|
||||
table.insert(tbAllItem, {
|
||||
nTid = itemData.Id,
|
||||
nRarity = itemData.Rarity,
|
||||
nCount = 1,
|
||||
nCount = nCount,
|
||||
nExpire = itemData.ExpireType,
|
||||
favourLevel = self:GetGiftFavourLevelById(itemData.Id)
|
||||
})
|
||||
listCount = listCount + nCount
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -190,7 +191,7 @@ function DatingGiftCtrl:RefreshItemList()
|
||||
self:UnbindCtrlByNode(objCtrl)
|
||||
self.tbGridCtrl[nInstanceId] = nil
|
||||
end
|
||||
table.sort(self.tbItemData, function(a, b)
|
||||
table.sort(tbAllItem, function(a, b)
|
||||
if a.favourLevel == b.favourLevel then
|
||||
if a.nRarity == b.nRarity then
|
||||
return a.nTid < b.nTid
|
||||
@@ -199,6 +200,17 @@ function DatingGiftCtrl:RefreshItemList()
|
||||
end
|
||||
return a.favourLevel < b.favourLevel
|
||||
end)
|
||||
for _, v in ipairs(tbAllItem) do
|
||||
for i = 1, v.nCount do
|
||||
table.insert(self.tbItemData, {
|
||||
nTid = v.nTid,
|
||||
nRarity = v.nRarity,
|
||||
nCount = 1,
|
||||
nExpire = v.nExpire,
|
||||
favourLevel = v.favourLevel
|
||||
})
|
||||
end
|
||||
end
|
||||
self._mapNode.loopsvGiftList:Init(listCount, self, self.RefreshItemGrid, self.OnBtn_ClickItemGrid)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -531,7 +531,7 @@ function PhoneCtrl:Awake()
|
||||
if nil ~= tbParam[2] and self._panel.nSelectCharId == nil then
|
||||
self._panel.nSelectCharId = tbParam[2]
|
||||
end
|
||||
if self._panel.nSelectCharId == nil then
|
||||
if nil ~= tbParam[3] and self.bSetGridPos == nil then
|
||||
self.bSetGridPos = tbParam[3]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user