36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
LuaHandleRetSpecailNote = {}
|
|
|
|
function LuaHandleRetSpecailNote.HandlePacket(mem)
|
|
require "LuaDistributesRetSpecailNote"
|
|
require "SpecialNoticeMgr"
|
|
local packet = LuaDistributesRetSpecailNote.ExtraPacket(mem)
|
|
-- print(packet)
|
|
-- Util.Print(packet)
|
|
local text = packet.strDictText
|
|
-- 特殊场景不接收消息
|
|
local curScene = CS.UnityEngine.SceneManagement.SceneManager.GetActiveScene()
|
|
-- print("-----------sceneindex--------------------"..tostring(curScene.buildIndex))
|
|
if curScene.buildIndex == 0 or
|
|
curScene.buildIndex == 49
|
|
then
|
|
-- print("-----------sceneindex--000------------------"..tostring(curScene.buildIndex))
|
|
return
|
|
end
|
|
|
|
local uiObj = CS.LuaUIManager.Instance:GetUIInstance("SpecialNotice")
|
|
if uiObj == nil then
|
|
-- print("uiObj is nil")
|
|
local noticeStr = CS.GCGame.Table.StrDictionary.GetServerDictionaryFormatString(text)
|
|
-- print("--------------------------------AddMsg first"..noticeStr)
|
|
SpecialNoticeMgr.GetInstance():AddMsg(noticeStr)
|
|
CS.LuaUIManager.Instance:ShowLuaUIType("SpecialNotice",CS.LuaUIManager.UIContainerType.Tip)
|
|
return
|
|
end
|
|
|
|
uiObj:GetComponent("LuaUIBehaviour"):CallScriptFuncAtPath("UISpecialNotice.OnNotice", text)
|
|
|
|
|
|
end
|
|
|
|
|