miduo_client/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua

411 lines
20 KiB
Lua
Raw Normal View History

2020-08-06 17:37:07 +08:00
require("Base/BasePanel")
2020-05-09 13:31:21 +08:00
GMPanel = Inherit(BasePanel)
local this = MainPanel
local chooseID
2020-07-29 19:35:29 +08:00
-- local heroList = { "4#10003#12", "4#10006#12", "4#10008#12", "4#10009#12", "4#10013#12", "4#10014#12",
-- "4#10003#11", "4#10006#11", "4#10008#11", "4#10009#11", "4#10013#11", "4#10014#11",
-- "4#10003#9", "4#10006#9", "4#10008#9", "4#10009#9", "4#10013#9", "4#10014#9",
-- "4#10003#8", "4#10006#8", "4#10008#8", "4#10009#8", "4#10013#8", "4#10014#8",
-- "4#10003#7", "4#10006#7", "4#10008#7", "4#10009#7", "4#10013#7", "4#10014#7",
-- "4#10003#6", "4#10006#6", "4#10008#6", "4#10009#6", "4#10013#6", "4#10014#6",
-- "4#10003#5", "4#10006#5", "4#10008#5", "4#10009#5", "4#10013#5", "4#10014#5",
-- "4#10003#4", "4#10006#4", "4#10008#4", "4#10009#4", "4#10013#4", "4#10014#4"}
local heroList = {
2020-08-12 14:13:28 +08:00
"4#10023#10", "4#10022#10", "4#10034#10", "4#10002#10", "4#10014#10","4#10002#10","4#10003#10"
2020-07-29 19:35:29 +08:00
}
2020-05-09 13:31:21 +08:00
local moneyList = {"1#3#999999999", "1#4#999999999", "1#5#999999999", "1#14#999999999", "1#15#999999999", "1#16#999999999"}
local mapId = {
[0] = 100,
[1] = 101,
[2] = 102,
[3] = 103,
2020-07-28 16:54:38 +08:00
[4] = 104,
2020-05-09 13:31:21 +08:00
[5] = 105,
[6] = 106,
[7] = 107,
[8] = 108,
[9] = 109,
[10] = 110,
}
--初始化组件(用于子类重写)
function GMPanel:InitComponent()
this.BtnBack = Util.GetGameObject(self.transform, "btnBack")
this.btnSureChange = Util.GetGameObject(self.transform, "TimeCtrl/Button")
--this.sureButton = Util.GetGameObject(self.transform, "sureButton")
-- 根节点
this.resourceRoot = Util.GetGameObject(self.gameObject, "ResourceCtrl")
this.processRoot = Util.GetGameObject(self.gameObject, "ProcessCtrl")
-- 资源控制
this.btnGenRole = Util.GetGameObject(self.gameObject, "ProcessCtrl/Generate")
this.strMsg = Util.GetGameObject(self.gameObject, "ProcessCtrl/InputField/Text"):GetComponent("Text")
this.GenerateHero = Util.GetGameObject(self.gameObject, "ProcessCtrl/GenerateHero")
this.GenerateTalisman = Util.GetGameObject(self.gameObject, "ProcessCtrl/GenerateTalisman")
this.passLevel = Util.GetGameObject(self.gameObject, "ProcessCtrl/passLevel")
this.GenerateFiveHero = Util.GetGameObject(self.gameObject, "ProcessCtrl/GenerateFiveHero")
this.sendMailBtn = Util.GetGameObject(self.gameObject, "ProcessCtrl/sendMailBtn")
this.strInputFieldHeroMsg = Util.GetGameObject(self.gameObject, "ProcessCtrl/InputFieldHero/Text"):GetComponent("Text")
this.InputFieldTalisman = Util.GetGameObject(self.gameObject, "ProcessCtrl/InputFieldTalisman/Text"):GetComponent("Text")
this.InputFieldpassLevel = Util.GetGameObject(self.gameObject, "ProcessCtrl/InputFieldpassLevel/Text"):GetComponent("Text")
this.strInputMailMsg = Util.GetGameObject(self.gameObject, "ProcessCtrl/InputMailField/Text"):GetComponent("Text")
this.allItemBtn = Util.GetGameObject(self.gameObject, "ProcessCtrl/allItemBtn")
this.diffMonsterBtn = Util.GetGameObject(self.gameObject, "ProcessCtrl/diffMonsterBtn")
-- 临时代码
this.MapFightText = Util.GetGameObject(self.gameObject, "MapFight/Text"):GetComponent("Text")
this.btnGo = Util.GetGameObject(self.gameObject, "MapFight/Go")
this.btnGoText = Util.GetGameObject(self.gameObject, "MapFight/Go/Text"):GetComponent("Text")
this.MonsterIdText = Util.GetGameObject(self.gameObject, "TestBattle/MapId"):GetComponent("Text")
this.btnBattleGo = Util.GetGameObject(self.gameObject, "TestBattle/Go")
this.btnTestBattle = Util.GetGameObject(self.gameObject, "TestBattle/Go2")
this.searchMap = Util.GetGameObject(self.gameObject, "ProcessCtrl/searchMap")
this.searchMapInputField = Util.GetGameObject(self.gameObject, "ProcessCtrl/searchMapInputField/Text"):GetComponent("Text")
this.GuideInputText = Util.GetGameObject(self.gameObject, "Guide/GuideJump/GuideId"):GetComponent("Text")
this.btnGuideGo = Util.GetGameObject(self.gameObject, "Guide/GuideJump/Go")
this.serverNowTimeText = Util.GetGameObject(self.gameObject, "TimeCtrl/Text (1)"):GetComponent("Text")
this.serverOpenTimeText = Util.GetGameObject(self.gameObject, "TimeCtrl/Text (3)"):GetComponent("Text")
this.serverCreateRoleTimeText = Util.GetGameObject(self.gameObject, "TimeCtrl/Text (5)"):GetComponent("Text")
this.updateServerNowTimeText = Util.GetGameObject(self.gameObject, "TimeCtrl/InputField/Text"):GetComponent("Text")
this.fullLevel = Util.GetGameObject(self.gameObject, "ProcessCtrl/fullLevel")
this.Placeholder = Util.GetGameObject(self.gameObject, "ProcessCtrl/levelInputField/Text"):GetComponent("Text")
--vipLevel
this.setVipLevel = Util.GetGameObject(self.gameObject, "ProcessCtrl/setVipLevel")
this.vipLevelInputField = Util.GetGameObject(self.gameObject, "ProcessCtrl/vipLevelInputField/Text"):GetComponent("Text")
--recharge
this.confirmRecharge = Util.GetGameObject(self.gameObject, "ProcessCtrl/confirmRecharge")
this.rechargeValueInputField = Util.GetGameObject(self.gameObject, "ProcessCtrl/rechargeValueInputField/Text"):GetComponent("Text")
this.btnPassFight = Util.GetGameObject(self.gameObject, "ProcessCtrl/fightPass")
this.passText = Util.GetGameObject(this.btnPassFight, "Text"):GetComponent("Text")
2020-06-23 18:36:24 +08:00
this.passText.text = Language[11152]
2020-05-09 13:31:21 +08:00
this.btnMaxLv = Util.GetGameObject(self.gameObject, "ProcessCtrl/maxLv")
-- 测试跳过序章
this.btnPassMap = Util.GetGameObject(self.gameObject, "ProcessCtrl/passMap")
--修改名字
this.updateNameBtn=Util.GetGameObject(self.gameObject, "updateName/Button")
--输入的名字
this.inputNameText = Util.GetGameObject(self.gameObject, "updateName/InputField/Text"):GetComponent("Text")
2020-05-25 19:16:23 +08:00
--解锁外敌
2020-05-09 13:31:21 +08:00
this.unlockAlianInvasion = Util.GetGameObject(self.gameObject, "unlockAlianInvasionPanel/Button")
this.unlockAlianInvasionText= Util.GetGameObject(self.gameObject, "unlockAlianInvasionPanel/InputField/Text"):GetComponent("Text")
-- 试炼选层
this.levelText = Util.GetGameObject(self.gameObject, "trialLevelJump/InputField/Text"):GetComponent("Text")
this.btnJumpLevel = Util.GetGameObject(self.gameObject, "trialLevelJump/Button")
--孙龙宝藏积分
this.setTreasureScore = Util.GetGameObject(self.gameObject, "ProcessCtrl/setTreasureScore")
this.treasureScoreInputField = Util.GetGameObject(self.gameObject, "ProcessCtrl/treasureScoreInputField/Text"):GetComponent("Text")
-- 兽潮设定波次
this.btnMonsterWave = Util.GetGameObject(self.gameObject, "WaveSet/Button")
this.waveText = Util.GetGameObject(self.gameObject, "WaveSet/InputField/Text"):GetComponent("Text")
-- 任务状态完成
this.setTaskIdFinished = Util.GetGameObject(self.gameObject, "ProcessCtrl/setTaskIdFinished")
this.taskIdInputField = Util.GetGameObject(self.gameObject, "ProcessCtrl/taskIdInputField/Text"):GetComponent("Text")
-- 一键生成很多钱钱
this.btnGetMoney = Util.GetGameObject(self.gameObject, "btnGetMoney")
-- 一键上阵英雄全满级
this.btnHeroEnd = Util.GetGameObject(self.gameObject, "btnHeroEnd")
-- 科技树
this.btnTecTree = Util.GetGameObject(self.gameObject, "btnTecTree")
2020-05-25 19:16:23 +08:00
--天宫秘宝积分
this.setScoreOfHeaven = Util.GetGameObject(self.gameObject, "scoreOfHeaven/Button")
this.scoreOfHeavenInputField = Util.GetGameObject(self.gameObject, "scoreOfHeaven/InputField/Text"):GetComponent("Text")
-- 跳转测试
this.btnJump = Util.GetGameObject(self.gameObject, "jump/Button")
this.jumpId = Util.GetGameObject(self.gameObject, "jump/InputField/Text"):GetComponent("Text")
2020-06-30 18:59:44 +08:00
-- 添加圣物
this.btnAddHoly = Util.GetGameObject(self.gameObject, "HolyItem/Button")
this.HolyId = Util.GetGameObject(self.gameObject, "HolyItem/InputField/Text"):GetComponent("Text")
2020-05-09 13:31:21 +08:00
end
--绑定事件(用于子类重写)
function GMPanel:BindEvent()
Util.AddClick(this.setTaskIdFinished, function()
NetManager.GMEvent("20#0#" .. this.taskIdInputField.text, function()
end)
end)
Util.AddClick(this.setTreasureScore, function()
NetManager.GMEvent("15#" .. this.treasureScoreInputField.text .. "#0", function()
TreasureOfSomebodyManagerV2.SetCurrentLevel(tonumber(this.treasureScoreInputField.text))
end)
end)
Util.AddClick(this.unlockAlianInvasion, function()
NetManager.GMEvent("13#"..this.unlockAlianInvasionText.text.."#" .. this.unlockAlianInvasionText.text)
end)
Util.AddClick(this.setVipLevel, function()
NetManager.GMEvent("11#" .. this.vipLevelInputField.text .. "#" .. this.vipLevelInputField.text, function()
VipManager.SetVipLevel(tonumber(this.vipLevelInputField.text))
end)
end)
Util.AddClick(this.confirmRecharge, function()
end)
Util.AddClick(this.BtnBack, function()
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
self:ClosePanel()
end)
Util.AddClick(this.btnSureChange, function()
NetManager.GMEvent("10#4#" .. this.updateServerNowTimeText.text)
end)
Util.AddClick(this.updateNameBtn, function()
NetManager.GMEvent("12#0#" .. this.inputNameText.text)
end)
-- 测试跳过序章
Util.AddClick(this.btnPassMap, function ()
NetManager.MapInfoRequest(1, function ()
2020-05-09 13:31:21 +08:00
NetManager.MapOutRequest(0, function ()
2020-06-23 18:36:24 +08:00
PopupTipPanel.ShowTip(Language[11153])
2020-05-09 13:31:21 +08:00
end)
end)
end)
Util.AddClick(this.fullLevel, function()
NetManager.GMEvent("7#" .. this.Placeholder.text .. "#0")
end)
Util.AddClick(this.btnPassFight, function()
NetManager.GMEvent("8#1#1")
2020-06-23 18:36:24 +08:00
this.passText.text = Language[11154]
2020-05-09 13:31:21 +08:00
end)
Util.AddClick(this.btnMaxLv, function()
NetManager.GMEvent("7#100#0")
end)
Util.AddClick(this.searchMap, function()
2020-06-23 18:36:24 +08:00
Log(Language[11155] .. "5#" .. this.searchMapInputField.text .. "#0")
2020-05-09 13:31:21 +08:00
NetManager.GMEvent("5#" .. this.searchMapInputField.text .. "#0")
end)
chooseID = 1
Util.AddClick(this.btnGenRole, function()
if not this.strMsg.text or this.strMsg.text == "" then
2020-07-11 16:21:15 +08:00
for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.EquipConfig)) do
local str=chooseID.."#"..v.Id.."#"..5
2020-07-11 16:21:15 +08:00
LogBlue(str)
NetManager.GMEvent(str)
end
for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.JewelConfig)) do
local str=chooseID.."#"..v.Id.."#"..5
2020-07-11 16:21:15 +08:00
LogBlue(str)
NetManager.GMEvent(str)
end
2020-05-09 13:31:21 +08:00
return
end
local str = chooseID .. "#" .. this.strMsg.text
Log(str)
NetManager.GMEvent(str)
2020-07-11 16:21:15 +08:00
2020-05-09 13:31:21 +08:00
end)
Util.AddClick(this.GenerateHero, function()
2020-08-12 14:13:28 +08:00
if not this.strInputFieldHeroMsg.text or this.strInputFieldHeroMsg.text == "" then
for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.HeroConfig)) do
local str= 4 .. "#" .. v.Id .. "#" ..v.MaxRank
2020-08-12 14:13:28 +08:00
LogBlue(str)
NetManager.GMEvent(str)
end
return
end
2020-05-09 13:31:21 +08:00
Log(this.strInputFieldHeroMsg.text)
NetManager.GMEvent(this.strInputFieldHeroMsg.text)
end)
Util.AddClick(this.GenerateTalisman, function()
local InputFieldTalismanStr = "19#"..this.InputFieldTalisman.text
Log(InputFieldTalismanStr)
NetManager.GMEvent(InputFieldTalismanStr)
end)
Util.AddClick(this.passLevel, function()
local InputFieldpassLevelStr = "9#"..this.InputFieldpassLevel.text.."#"..this.InputFieldpassLevel.text
Log(InputFieldpassLevelStr)
NetManager.GMEvent(InputFieldpassLevelStr)
end)
Util.AddClick(this.sendMailBtn, function()
NetManager.GMEvent(this.strInputMailMsg.text)
end)
Util.AddClick(this.allItemBtn, function()
NetManager.GMEvent("6#0#0")
end)
Util.AddClick(this.diffMonsterBtn, function()
NetManager.GMEvent("22#0#0")
end)
Util.AddClick(this.GenerateFiveHero, function()
for i=1, #heroList do
NetManager.GMEvent(heroList[i])
end
end)
Util.AddClick(this.btnGo, function()
if RoomManager.IsMatch == 0 then
--请求匹配房间
RoomManager.RoomMatchRequest(1, function ()
2020-06-23 18:36:24 +08:00
this.btnGoText.text = Language[11156]
2020-05-09 13:31:21 +08:00
end)
else
RoomManager.RoomCancelMatchRequest(1, function ()
2020-06-23 18:36:24 +08:00
this.btnGoText.text = Language[11157]
2020-05-09 13:31:21 +08:00
end)
end
end)
local monsterId = 10101
Util.AddClick(this.btnBattleGo, function()
2020-06-03 19:09:01 +08:00
if this.MonsterIdText.text == "" then
2020-07-08 21:19:34 +08:00
local data = {enemyData={{{camp=1,element=3,passivity={},position=1,professionId=2,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10085,skill={1131,0.05,0,1,{230002,{1,0.6,2}}},star=5,superSkill={1132,0.8,0,1,{200212,{2,2.12,2}},{400001,{101,1}}},type=1},{camp=1,element=2,passivity={},position=2,professionId=3,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10022,skill={1151,0.05,0,1,{220000,{1,0.44,2}}},star=5,superSkill={1152,0.05,0,1,{220000,{2,1.55,2},{3,0.45,1,1}}},type=1},{camp=1,element=2,passivity={},position=3,professionId=1,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10010,skill={1171,0.05,0,1,{400000,{1,0.9,1}}},star=5,superSkill={1172,0.35,0,1,{210003,{2,1.55,1}},{110003,{104,0.2,1}}},type=1},{camp=1,element=2,passivity={},position=4,professionId=4,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10089,skill={1181,0.05,0,1,{400000,{1,0.9,2}}},star=5,superSkill={1182,0.8,0,1,{230002,{2,2.12,2}},{300000,{100,1,1}}},type=1},{camp=1,element=2,passivity={},position=5,professionId=2,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10015,skill={1201,0.05,0,1,{400000,{1,0.9,1}}},star=5,superSkill={1202,0.01,0.5,3,{400000,{1,3.15,1}},{300000,{100,1,1}}},type=1},{camp=1,element=2,passivity={},position=6,professionId=2,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10086,skill={1261,0.05,0,1,{400000,{1,0.9,1}}},star=5,superSkill={1262,0.3,0,1,{230002,{2,2.12,1}},{400001,{101,1}}},type=1},teamPassive={},teamSkill={}}},playerData={{camp=0,element=3,passivity={},position=1,professionId=4,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10008,skill={1021,0.05,0,1,{210003,{1,0.47,1}}},star=5,superSkill={1022,1.2,0,1,{210003,{2,1.63,1}},{100000,{100,1,1}}},type=1},{camp=0,element=3,passivity={},position=2,professionId=4,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10006,skill={1041,0.05,0,1,{220801,{1,0.95,2}}},star=5,superSkill={1042,0.1,0.8,3,{220801,{1,3.33,2}},{300000,{100,1,1}}},type=1},{camp=0,element=3,passivity={},position=3,professionId=4,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10018,skill={1051,0.05,0,1,{100111,{24,1,1.03}}},star=5,superSkill={1052,0.05,0,1,{100113,{24,1,1.75}}},type=1},{camp=0,element=3,passivity={},position=4,professionId=3,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10005,skill={1071,0.05,0,1,{400000,{1,0.95,0.4}}},star=5,superSkill={1072,0.3,0,1,{210003,{2,1.63,2},{3,0.4,2,1}}},type=1},{camp=0,element=3,passivity={},position=5,professionId=3,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10020,skill={1081,0.05,0,1,{400000,{1,0.95,1}}},star=5,superSkill={1082,0.3,0,1,{230002,{2,2.23,1},{3,0.4,1,1}}},type=1},{camp=0,element=2,passivity={},position=6,professionId=2,property={100,100000,100000,100,0,0,0,0,0,1,0,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=5,roleId=10012,skill={1121,0.05,0,1,{400000,{1,0.95,2}}},star=5,superSkill={1122,0.05,0,1,{400000,{103,3.33,2,0.3}}},type=1},teamPassive={},teamSkill={}}}
2020-06-03 19:09:01 +08:00
local testFightData = {
fightData = data,
fightSeed = 1589533697,
fightType = 0,
maxRound = 20
}
UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test)
return
end
monsterId = tonumber(this.MonsterIdText.text)
if #FormationManager.formationList[FormationManager.curFormationIndex].teamHeroInfos == 0 then
2020-06-23 18:36:24 +08:00
PopupTipPanel.ShowTip(Language[10702])
2020-06-03 19:09:01 +08:00
else
local MonsterGroup = ConfigManager.GetConfig(ConfigName.MonsterGroup)
if not MonsterGroup[monsterId] then
2020-06-23 18:36:24 +08:00
PopupTipPanel.ShowTip(Language[10706] .. monsterId .. Language[10707])
2020-06-03 19:09:01 +08:00
else
UIManager.OpenPanel(UIName.BattlePanel, BattleManager.GetBattleData(1, monsterId), nil, nil, nil, monsterId, nil)
end
end
2020-05-09 13:31:21 +08:00
end)
Util.AddClick(this.btnTestBattle, function()
UIManager.OpenPanel(UIName.BattleTestPanel)
end)
Util.AddClick(this.btnGuideGo, function()
if this.GuideInputText.text ~= "" then
local strs = string.split(this.GuideInputText.text, "#")
NetManager.SaveGuideDataRequest(tonumber(strs[1]), tonumber(strs[2]))
end
end)
-- 试炼副本跳层
Util.AddClick(this.btnJumpLevel, function ()
local str = this.levelText.text
2020-06-23 18:36:24 +08:00
if tonumber(str) <= 1 then Log(Language[11158]) return end
2020-05-09 13:31:21 +08:00
str = "14#" .. tonumber(str) .. "#0"
NetManager.GMEvent(str, function ()
2020-06-23 18:36:24 +08:00
PopupTipPanel.ShowTip(Language[11159])
2020-05-09 13:31:21 +08:00
end)
end)
-- 兽潮选定波次
Util.AddClick(this.btnMonsterWave, function ()
local str = tostring(this.waveText.text)
if not str or str == "" then
2020-06-23 18:36:24 +08:00
PopupTipPanel.ShowTip(Language[11160]) return end
2020-05-09 13:31:21 +08:00
str = string.format("16#%s#0", str)
NetManager.GMEvent(str, function ()
2020-06-23 18:36:24 +08:00
PopupTipPanel.ShowTip(Language[11159])
2020-05-09 13:31:21 +08:00
end)
end)
-- 生成很多钱
Util.AddClick(this.btnGetMoney, function ()
local index = 1
local time = Timer.New(function ()
NetManager.GMEvent(moneyList[index])
index = index + 1
end, 1, 6, true)
time:Start()
end)
-- 一键上阵英雄全满级
Util.AddClick(this.btnHeroEnd, function ()
NetManager.GMEvent("21#21#21", function ()
2020-06-23 18:36:24 +08:00
PopupTipPanel.ShowTip(Language[11159])
2020-05-09 13:31:21 +08:00
end)
end)
Util.AddClick(this.btnTecTree, function ()
NetManager.GMEvent("21#0#0", function ()
2020-06-23 18:36:24 +08:00
PopupTipPanel.ShowTip(Language[11161])
2020-05-09 13:31:21 +08:00
end)
end)
2020-05-25 19:16:23 +08:00
--增加天宫秘宝积分
Util.AddClick(this.setScoreOfHeaven, function()
2020-06-03 19:09:01 +08:00
local score = "23#0#0"..this.scoreOfHeavenInputField.text
NetManager.GMEvent(score)
2020-06-23 18:36:24 +08:00
Log(Language[11162]..this.scoreOfHeavenInputField.text)
2020-05-25 19:16:23 +08:00
end)
--增加天宫秘宝积分
Util.AddClick(this.btnJump, function()
JumpManager.GoJump(tonumber(this.jumpId.text))
end)
2020-06-30 18:59:44 +08:00
--增加圣物
Util.AddClick(this.btnAddHoly, function()
if this.HolyId.text == "" then
2020-07-10 19:13:29 +08:00
PopupTipPanel.ShowTip(Language[12199])
2020-06-30 18:59:44 +08:00
return
end
local command = "//addholy %s %s"
command = string.format(command, PlayerManager.uid, this.HolyId.text)
ChatManager.RequestGMCommand(command)
-- local score = "23#0#0"..this.HolyId.text
-- NetManager.GMEvent(score)
end)
2020-05-09 13:31:21 +08:00
end
--添加事件监听(用于子类重写)
function GMPanel:AddListener()
end
--移除事件监听(用于子类重写)
function GMPanel:RemoveListener()
end
--界面打开时调用(用于子类重写)
function GMPanel:OnOpen(...)
NetManager.GMEvent("10#1#0", function(msg)
this.serverNowTimeText.text = msg.info
end)
NetManager.GMEvent("10#2#0", function(msg)
this.serverOpenTimeText.text = msg.info
end)
NetManager.GMEvent("10#3#0", function(msg)
this.serverCreateRoleTimeText.text = msg.info
end)
2020-06-23 18:36:24 +08:00
this.btnGoText.text = RoomManager.IsMatch == 1 and Language[11156] or Language[11157]
2020-05-09 13:31:21 +08:00
end
--界面关闭时调用(用于子类重写)
function GMPanel:OnClose()
end
--界面销毁时调用(用于子类重写)
function GMPanel:OnDestroy()
end
2020-06-23 18:36:24 +08:00
return GMPanel