114 lines
5.2 KiB
Plaintext
114 lines
5.2 KiB
Plaintext
local Util = require("Util")
|
|
local LuaUtils = require("LuaUtil")
|
|
require("LuaItemBase")
|
|
LuaActivityBtn = LuaItemBase:new()
|
|
|
|
-- public enum CHANGETYPE
|
|
-- {
|
|
-- TELEPORT = 0, //传送石
|
|
-- WORLDMAP = 1, //世界地图
|
|
-- TRAIL = 2, //追杀功能
|
|
-- POINT = 3, //具体点传送
|
|
-- FLYSHOES = 4, //飞鞋传送
|
|
-- }
|
|
|
|
-- local UnityEngine = CS.UnityEngine
|
|
|
|
-- local _ActivityButton
|
|
-- local _ActivityImage--Icon
|
|
-- local isShowInfoPanel = 0
|
|
|
|
function LuaActivityBtn.Awake( )
|
|
|
|
-- _ActivityButton = _ActivityBtn:GetComponent("Button")
|
|
-- _ActivityImage = _ActivityIcon:GetComponent("Image")
|
|
|
|
-- _ActivityButton.onClick:RemoveAllListeners()
|
|
-- _ActivityButton.onClick:AddListener(LuaActivityBtn.onClickbtn)
|
|
|
|
|
|
end
|
|
|
|
-- function LuaActivityBtn.onClickActivityBtn()
|
|
-- --ELog('*****请求进入紫禁之巅******')
|
|
-- require("LuaDistributesReqEnterForbiddenTop")
|
|
-- local reqInfo = {Flag = 1}
|
|
-- LuaDistributesReqEnterForbiddenTop.SendPacket(reqInfo)
|
|
-- -- if CS.UnityEngine.GameObject.Find("ActivityController(Clone)") ~= nil then
|
|
-- -- CS.UnityEngine.GameObject.Find("ActivityController(Clone)").gameObject:SetActive(false)
|
|
-- -- CS.UIManager.CloseUI(CS.UIInfo.MessageBox)
|
|
-- -- end
|
|
-- CS.UIManager.CloseUI(CS.UIInfo.Activity)
|
|
-- CS.UIManager.CloseUI(CS.UIInfo.MessageBox)
|
|
-- isShowInfoPanel = 0
|
|
-- end
|
|
-- local isTransboundaryEscort = 0
|
|
function LuaActivityBtn.Update( )
|
|
--local uiObj = CS.LuaUIManager.Instance:GetUIInstance("ZiJinTopCopyInfo")
|
|
if CS.GameManager.gameManager.m_RunningScene == 658 then
|
|
CS.LuaUIManager.Instance:ShowLuaUIType("ZiJinTopCopyInfo",CS.LuaUIManager.UIContainerType.Base)
|
|
-- ELog("***************************************************")
|
|
-- if isShowInfoPanel == 0 then
|
|
-- isShowInfoPanel = 1
|
|
-- end
|
|
end
|
|
|
|
end
|
|
-- --跨服护送
|
|
-- function LuaActivityBtn.TransboundaryEscort( )
|
|
-- CS.MessageBoxLogic.OpenOKCancelBox(CS.GCGame.Table.StrDictionary.GetClientDictionaryString("#{79502}"),nil,function()
|
|
-- CS.SceneData.RequestChangeScene(1, 0, 590, -1, 0, 0)
|
|
-- isTransboundaryEscort = 0
|
|
-- CS.UIManager.CloseUI(CS.UIInfo.MessageBox)
|
|
-- end,nil)
|
|
-- end
|
|
-- function LuaActivityBtn.onClickbtn( )
|
|
|
|
-- for k,v in pairs(CS.GCGame.Table.TableManager.GetActivityBase()) do
|
|
-- if v.Id == 37 then
|
|
-- if _ActivityImage.sprite.name == v.Icon or _ActivityImage.sprite.name == v.ActivityIcon or _ActivityImage.sprite.name == v.StartTipImage then
|
|
|
|
-- isShowInfoPanel = 0
|
|
-- if CS.UnityEngine.GameObject.Find("MessageHelpRoot(Clone)") == nil then
|
|
-- -- CS.MessageBoxLogic.OpenOKCancelBox(CS.GCGame.Table.StrDictionary.GetClientDictionaryString("#{79509}"),nil,LuaActivityBtn.onClickActivityBtn,nil)
|
|
-- end
|
|
-- else
|
|
|
|
-- if CS.UnityEngine.GameObject.Find("ActivityController(Clone)") ~= nil and CS.GameManager.gameManager.m_RunningScene == 658 then
|
|
-- _CSItemInfoId = self.transform:GetComponent("ActivityItem").m_ItemInfoId
|
|
-- -- ELog("活动ID。。。 ".._CSItemInfoId)
|
|
-- local activityBase = CS.GCGame.Table.TableManager.GetActivityBaseByID(_CSItemInfoId, 0)
|
|
-- local m_ParamType = activityBase.ParameterType
|
|
-- if CS.GameManager.gameManager.m_RunningScene == 658 and m_ParamType ~= 3 and _CSItemInfoId ~= 17 and _CSItemInfoId ~= 21 and _CSItemInfoId ~= 23 and _CSItemInfoId ~= 26 and _CSItemInfoId ~= 28 and _CSItemInfoId ~= 1 then
|
|
-- CS.MessageBoxLogic.OpenOKCancelBox(CS.GCGame.Table.StrDictionary.GetClientDictionaryString("#{79502}"),nil,function()
|
|
-- CS.ActivityController.ClickActive(_CSItemInfoId)
|
|
-- -- if CS.UnityEngine.GameObject.Find("MessageBoxRoot(Clone)") ~= nil then
|
|
-- -- CS.UnityEngine.GameObject.Find("MessageBoxRoot(Clone)").gameObject:SetActive(false)
|
|
-- -- end
|
|
-- CS.UIManager.CloseUI(CS.UIInfo.MessageBox)
|
|
-- end,nil)
|
|
-- end
|
|
-- -- 跨服护送 二次确认
|
|
-- if _CSItemInfoId == 26 or _CSItemInfoId == 29 or _CSItemInfoId == 30 then
|
|
-- if CS.UnityEngine.GameObject.Find("MessageBoxRoot(Clone)") ~= nil then
|
|
-- local _BtnOK = CS.UnityEngine.GameObject.Find("MessageBoxRoot(Clone)/Btns/BtnOK"):GetComponent("Button")
|
|
-- if isTransboundaryEscort == 0 then
|
|
-- isTransboundaryEscort = 1
|
|
-- _BtnOK.onClick:RemoveAllListeners()
|
|
-- _BtnOK.onClick:AddListener(LuaActivityBtn.TransboundaryEscort)
|
|
-- end
|
|
|
|
-- end
|
|
-- end
|
|
|
|
-- end
|
|
-- end
|
|
-- end
|
|
-- end
|
|
|
|
|
|
-- end
|
|
|
|
-- function LuaActivityBtn.TwiceBox()
|
|
-- CS.ActivityController.ClickActive(31)
|
|
-- end |