699 lines
31 KiB
Lua
699 lines
31 KiB
Lua
require("Base/BasePanel")
|
||
GMPanel = Inherit(BasePanel)
|
||
local this = MainPanel
|
||
local chooseID
|
||
local heroList = { "4#10003#11", "4#10006#11", "4#10008#11", "4#10009#11", "4#10013#11", "4#10014#11"}
|
||
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,
|
||
[4] = 104,
|
||
[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")
|
||
this.passText.text = "通关所有关卡"
|
||
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")
|
||
|
||
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")
|
||
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(100, 1, function ()
|
||
NetManager.MapOutRequest(0, function ()
|
||
PopupTipPanel.ShowTip("已经跳过,请重启!")
|
||
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")
|
||
this.passText.text = "请重新登陆!"
|
||
end)
|
||
|
||
Util.AddClick(this.btnMaxLv, function()
|
||
NetManager.GMEvent("7#100#0")
|
||
end)
|
||
|
||
Util.AddClick(this.searchMap, function()
|
||
Log("副本通关 " .. "5#" .. this.searchMapInputField.text .. "#0")
|
||
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
|
||
return
|
||
end
|
||
local str = chooseID .. "#" .. this.strMsg.text
|
||
Log(str)
|
||
NetManager.GMEvent(str)
|
||
end)
|
||
Util.AddClick(this.GenerateHero, function()
|
||
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 ()
|
||
this.btnGoText.text = "取消匹配"
|
||
end)
|
||
else
|
||
RoomManager.RoomCancelMatchRequest(1, function ()
|
||
this.btnGoText.text = "开始匹配"
|
||
end)
|
||
end
|
||
end)
|
||
|
||
local monsterId = 10101
|
||
Util.AddClick(this.btnBattleGo, function()
|
||
-- if this.MonsterIdText.text ~= "" then
|
||
-- monsterId = tonumber(this.MonsterIdText.text)
|
||
-- end
|
||
-- if #FormationManager.formationList[FormationManager.curFormationIndex].teamHeroInfos == 0 then
|
||
-- PopupTipPanel.ShowTip("编队没人,请先上人!")
|
||
-- else
|
||
-- local MonsterGroup = ConfigManager.GetConfig(ConfigName.MonsterGroup)
|
||
-- if not MonsterGroup[monsterId] then
|
||
-- PopupTipPanel.ShowTip("怪物表id :" .. monsterId .. "不存在!")
|
||
-- else
|
||
-- UIManager.OpenPanel(UIName.BattlePanel, BattleManager.GetBattleData(1, monsterId), nil, nil, nil, monsterId, nil)
|
||
-- end
|
||
|
||
-- local testFightData = {
|
||
-- enemyData={
|
||
-- {
|
||
-- {
|
||
-- camp=1,
|
||
-- element=3,
|
||
-- passivity={
|
||
-- {62,0.5,1,3.6,8},
|
||
-- {16,0.1,2,0.15,1,5}
|
||
-- },
|
||
-- professionId=1,
|
||
-- property={200,122508,122508,10831,10230,9117,3467,0,0,0,1,0.02,1.5,0.02,1,1,0.006,0.013,0,0,0,0,0,0,0},
|
||
-- quality=0,
|
||
-- roleId=10001,
|
||
-- skill={
|
||
-- 0,
|
||
-- {400001,0.4,{1,3.6,1}},
|
||
-- {200000,0.4,{3,0.8,3,10}}
|
||
-- },
|
||
-- type=1
|
||
-- },
|
||
-- {
|
||
-- camp=1,
|
||
-- element=2,
|
||
-- passivity={
|
||
-- {14,0.4,1,0.2,2,8,1}
|
||
-- },
|
||
-- professionId=1,
|
||
-- property={200,117682,117682,10316,10528,8206,4960,0,0,0,1,0.02,1.5,0.02,1,1,0.006,0.013,0,0,0,0,0,0,0},
|
||
-- quality=0,
|
||
-- roleId=10002,
|
||
-- skill={0,{200803,0.4,{81,3.6,1,1,2.3,5}},{200803,0.4,{3,0.6,3,10}}},
|
||
-- superSkill={45000,{400001,0.4,{1,4.3,1}},{300001,0.4,{82,0.5,6},{4,6,0.4,6,1}}},
|
||
-- type=1
|
||
-- },{
|
||
-- camp=1,
|
||
-- roleId=10010,
|
||
-- element=3,
|
||
-- professionId=2,
|
||
-- quality=0,
|
||
-- passivity={{14,0.4,1,0.2,3,8,2}},
|
||
-- property={200,126912,126912,12892,10134,7700,3843,0,0,0,1,0.1,1.5,0.02,1,1,0.006,0.013,0,0,0,0,0,0,0},
|
||
-- skill={0,{400001,0.4,{71,2,2,1.9,1,0.2,1,3,1}}},
|
||
-- superSkill={45000,{400001,0.8,{98,4,4,1.7,1,0.2,1,3,1}}},
|
||
-- type=1
|
||
-- },
|
||
-- {
|
||
-- camp=1,element=3,passivity={{63,1,0.13,12},{14,0.4,1,0.2,2,8,1}},professionId=5,property={180,97921,97921,8702,6715,7561,3864,0,0,0,1,0.02,1.5,0.02,1,1,0.006,0.013,0,0,0,0,0,0,0},quality=0,roleId=10007,skill={0,{400001,0.4,{1,3.6,2}},{300001,0.4,{9,1,2.5,10,0}}},type=1},
|
||
-- {
|
||
-- camp=1,element=2,passivity={{65,2.4,2,3,0.4},{34,1000}},professionId=4,property={180,94826,94826,9005,7517,7499,3923,0,0,0,1,0.02,1.5,0.02,1,1,0.006,0.013,0,0,0,0,0,0,0},quality=0,roleId=10019,
|
||
-- skill={0,{200000,0.4,{2,1.8,1},{4,1,0.2,5,4}}},type=1},
|
||
-- {
|
||
-- camp=1,element=2,passivity={{65,2.4,2,3,0.4},{34,1000}},professionId=4,property={180,94826,94826,9005,7517,7499,3923,0,0,0,1,0.02,1.5,0.02,1,1,0.006,0.013,0,0,0,0,0,0,0},quality=0,roleId=10019,
|
||
-- skill={0,{200000,0.4,{2,1.8,1},{4,1,0.2,5,4}}},type=1
|
||
|
||
-- },
|
||
|
||
|
||
-- teamPassive={},
|
||
|
||
-- teamSkill={
|
||
-- {201,{200000,0.4,{26,26000}},{100000,0.4,{43,20000}}},
|
||
-- {702,{200000,0.4,{26,50000}},{100000,0.4,{4,9,0.1,6,1},{4,7,0.5,6,1}}},
|
||
-- {303,{200000,0.4,{26,20000}},{200002,0.4,{3,0.5,1,6}}}
|
||
-- }
|
||
-- }
|
||
-- },
|
||
-- playerData={{camp=0,element=3,passivity={{63,1,0.15,12},{14,0.4,1,0.15,2,6,1}},professionId=5,property={200,94328,105291,8970,8381,9468,4354,0,0.1,0,1,0.02,1.5,0.02,1.02,1,0.006,0.006,0,0,0,0,0,0,0},quality=0,roleId=10007,skill={0,{400001,0.4,{1,3.6,2}},{300001,0.4,{9,1,2.5,10,0}}},type=1},{camp=0,element=3,passivity={{63,1,0.15,12},{14,0.4,1,0.15,2,6,1}},professionId=5,property={200,94328,105291,8970,8381,9468,4354,0,0.1,0,1,0.02,1.5,0.02,1.02,1,0.006,0.006,0,0,0,0,0,0,0},quality=0,roleId=10007,skill={0,{400001,0.4,{1,3.6,2}},{300001,0.4,{9,1,2.5,10,0}}},type=1},{camp=0,element=4,passivity={{29,0.2,0.4},{34,900}},professionId=3,property={200,40972,111356,11499,7803,10064,3745,0,0.1,0,1,0.02,1.5,0.02,1.02,1,0.006,0.006,0,0,0,0,0,0,0},quality=0,roleId=10011,skill={0,{200211,0.4,{90,4.9,2,1}}},type=1},{camp=0,element=6,passivity={{34,1000}},professionId=3,property={200,35375,122073,13507,7894,10762,4070,0,0.1,0.1,1,0.1,1.5,0.02,1.02,1.1,0.006,0.006,0,0,0,0,0,0,0},quality=0,roleId=10014,skill={0,{400001,0.4,{63,3.8,2,1}},{30001,0.4,{4,1,0.1,0,2},{4,9,0.05,0,1},{42,0.7,0.25,10}}},superSkill={45000,{200000,0.4,{64,2.9,2,0.1}}},type=1},{camp=0,element=2,passivity={{14,0.4,1,0.2,3,8,2}},professionId=1,property={220,132449,135840,10879,13173,10812,5566,0,0.1,0,1,0.02,1.5,0.02,1.02,1,0.006,0.006,0,0,0,0,0,0,0},quality=0,roleId=10002,skill={0,{200803,0.4,{81,4.3,1,1,2.7,5}},{200803,0.4,{3,0.6,3,10}}},superSkill={45000,{400001,0.4,{1,4.3,1}},{300001,0.4,{82,0.5,6},{4,6,0.4,6,1}}},type=1},{camp=0,element=1,passivity={{34,900}},professionId=3,property={200,96395,99878,10991,7267,9456,3959,0,0.1,0,1,0.02,1.5,0.02,1.02,1,0.006,0.006,0,0,0,0,0,0,0},quality=0,roleId=10006,skill={0,{400001,0.4,{91,1,1,0.2,2,10,5},{1,2,2},{25,1,0.1,10}}},superSkill={45000,{200003,0.4,{91,1,1,0.3,2,10,5},{1,3,2},{25,1,0.25,10}}},type=1},teamPassive={{{76,2,1,0.1,2}},{{78,12,0.1,0}}},teamSkill={{201,{200000,0.4,{26,26000}},{100000,0.4,{43,24000}}},{402,{200000,0.4,{26,10000}},{100000,0.4,{4,4,0.3,4,2}}},{303,{200000,0.4,{26,24000}},{200002,0.4,{3,0.5,1,6}}}}}}
|
||
|
||
|
||
local testFightData ={enemyData=
|
||
{
|
||
{
|
||
{camp=1,element=3,passivity=
|
||
{
|
||
{114,1}
|
||
}
|
||
,position=1,professionId=2,property=
|
||
{0,10000,10000,1000,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0}
|
||
,quality=5,roleId=10023,skill=
|
||
{1141,
|
||
{230002,0.2,
|
||
{1,0.6,1}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1142,
|
||
{230002,0.6,
|
||
{1,2.12,1}
|
||
}
|
||
,
|
||
{300000,0.6,
|
||
{112,5,0.1,7,1}
|
||
}
|
||
}
|
||
,type=1}
|
||
,
|
||
{camp=1,element=6,passivity=
|
||
{}
|
||
,position=2,professionId=1,property=
|
||
{0,100000,100000,1000,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0}
|
||
,quality=5,roleId=10090,skill=
|
||
{1181,
|
||
{400000,0.2,
|
||
{1,0.9,2}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1182,
|
||
{230002,0.2,
|
||
{1,2.12,2}
|
||
}
|
||
,
|
||
{300000,0.2,
|
||
{100,1,1}
|
||
}
|
||
}
|
||
,type=1}
|
||
,
|
||
{camp=1,element=2,passivity=
|
||
{
|
||
{105,1}
|
||
}
|
||
,position=3,professionId=4,property=
|
||
{0,10000,10000,1000,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=10033,skill=
|
||
{1191,
|
||
{220801,0.2,
|
||
{1,0.9,2}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1192,
|
||
{220801,0.2,
|
||
{103,3.15,2,0.3}
|
||
}
|
||
}
|
||
,type=1}
|
||
,
|
||
{camp=1,element=1,passivity=
|
||
{
|
||
{134,2,1,0.36}
|
||
}
|
||
,position=4,professionId=1,property=
|
||
{100,10000,10000,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=10041,skill=
|
||
{1471,
|
||
{400000,0.2,
|
||
{1,1,2}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1472,
|
||
{210003,0.2,
|
||
{1,1.72,2}
|
||
,
|
||
{111,0.6,2,1,1,2}
|
||
}
|
||
}
|
||
,type=1}
|
||
,
|
||
{camp=1,element=6,passivity=
|
||
{
|
||
{136,0.8,1,2}
|
||
}
|
||
,position=5,professionId=3,property=
|
||
{100,10000,10000,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=10014,skill=
|
||
{1281,
|
||
{210003,0.2,
|
||
{1,0.44,2}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1282,
|
||
{200000,0.6,
|
||
{2,0.92,2}
|
||
,
|
||
{111,0.4,1,0.2,1,2}
|
||
}
|
||
}
|
||
,type=1}
|
||
,
|
||
{camp=1,element=3,passivity=
|
||
{
|
||
{168,1}
|
||
}
|
||
,position=6,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=10009,skill=
|
||
{1311,
|
||
{400000,0.2,
|
||
{1,0.9,2}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1312,
|
||
{210003,0.2,
|
||
{113,1.55,2,1,0.4,7,1}
|
||
}
|
||
}
|
||
,type=1}
|
||
,teamPassive=
|
||
{}
|
||
,teamSkill=
|
||
{}
|
||
}
|
||
}
|
||
,playerData=
|
||
{
|
||
{camp=0,element=5,passivity=
|
||
{}
|
||
,position=1,professionId=5,property=
|
||
{1,10000,10000,1000,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0}
|
||
,quality=5,roleId=10089,skill=
|
||
{1181,
|
||
{400000,0.2,
|
||
{1,0.9,2}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1182,
|
||
{230002,0.2,
|
||
{1,2.12,2}
|
||
}
|
||
,
|
||
{300000,0.2,
|
||
{100,1,1}
|
||
}
|
||
}
|
||
,type=1}
|
||
,
|
||
{camp=0,element=1,passivity=
|
||
{
|
||
{170,0.89,1}
|
||
}
|
||
,position=2,professionId=1,property=
|
||
{0,10000,10000,1000,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,
|
||
{230002,0.2,
|
||
{1,0.6,2}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1132,
|
||
{200212,0.2,
|
||
{1,2.12,2}
|
||
}
|
||
,
|
||
{400001,0.2,
|
||
{101,1}
|
||
}
|
||
}
|
||
,type=1}
|
||
,
|
||
{camp=0,element=1,passivity=
|
||
{}
|
||
,position=3,professionId=3,property=
|
||
{100,100000,100000,1000,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,
|
||
{220801,0.2,
|
||
{1,0.95,2}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1042,
|
||
{220801,0.2,
|
||
{1,3.33,2}
|
||
}
|
||
,
|
||
{300000,0.2,
|
||
{100,1,1}
|
||
}
|
||
}
|
||
,type=1}
|
||
,
|
||
{camp=0,element=2,passivity=
|
||
{}
|
||
,position=4,professionId=2,property=
|
||
{0,10000,10000,100,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0}
|
||
,quality=5,roleId=10008,skill=
|
||
{1021,
|
||
{210003,0.2,
|
||
{1,0.47,1}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1022,
|
||
{210003,0.6,
|
||
{2,1.63,1}
|
||
}
|
||
,
|
||
{100000,0.6,
|
||
{100,1,1}
|
||
}
|
||
}
|
||
,type=1}
|
||
,
|
||
{camp=0,element=4,passivity=
|
||
{
|
||
{93,0.25}
|
||
}
|
||
,position=5,professionId=5,property=
|
||
{0,10000,10000,100,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0}
|
||
,quality=5,roleId=10018,skill=
|
||
{1051,
|
||
{100111,0.2,
|
||
{24,1,1.03}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1052,
|
||
{100113,0.2,
|
||
{24,1,1.75}
|
||
}
|
||
}
|
||
,type=1}
|
||
,
|
||
{camp=0,element=4,passivity=
|
||
{
|
||
{109,1}
|
||
}
|
||
,position=6,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=10003,skill=
|
||
{1061,
|
||
{400000,0.2,
|
||
{1,0.95,1}
|
||
}
|
||
}
|
||
,superSkill=
|
||
{1062,
|
||
{230002,0.2,
|
||
{10,2.23,1,0.3}
|
||
}
|
||
}
|
||
,type=1}
|
||
,teamPassive=
|
||
{}
|
||
,teamSkill=
|
||
{}
|
||
}
|
||
}
|
||
local testSeed = 1544186778
|
||
|
||
-- local testFightData = {enemyData={{{ai={0},camp=1,element=6,monsterId=10112151,passivity={},professionId=0,property={24,864,864,127,59,59,1040,0,0,0.05,1,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=1,roleId=2,skill={0,{40001,0.4,{1,2.4,1},{3,0.4,2,2}}},superSkill={45000,{40001,0.4,{1,2.6,1},{13,3,0.2,1,5}}},type=3},{ai={0},camp=1,element=6,monsterId=10112152,passivity={},professionId=0,property={24,576,576,142,59,59,1040,0,0,0.05,1,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=1,roleId=6,skill={0,{20803,0.4,{1,0.94,2},{13,1,0.1,2,5}}},superSkill={45000,{20000,0.4,{2,1.16,2},{13,1,0.2,2,5}}},type=3},{ai={0},camp=1,element=6,monsterId=10112153,passivity={},professionId=0,property={24,576,576,142,59,59,1040,0,0,0.05,1,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=1,roleId=6,skill={0,{20803,0.4,{1,0.94,2},{13,1,0.1,2,5}}},superSkill={45000,{20000,0.4,{2,1.16,2},{13,1,0.2,2,5}}},type=3},{ai={0},camp=1,element=1,monsterId=10112154,passivity={},professionId=0,property={24,720,720,135,59,59,1040,0,0,0.05,1,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=1,roleId=1,skill={0,{40001,0.4,{1,2.4,1}}},superSkill={45000,{40001,0.4,{6,3,3,1.2,1}}},type=4},{ai={0},camp=1,element=6,monsterId=10112155,passivity={},professionId=0,property={24,720,720,135,59,59,1040,0,0,0.05,1,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=1,roleId=1,skill={0,{40001,0.4,{1,2.4,1}}},superSkill={45000,{40001,0.4,{6,3,3,1.2,1}}},type=4},teamPassive={},teamSkill={}}},playerData={{camp=0,element=3,passivity={},professionId=2,property={1,888,888,210,283,61,276,0,0,0,1,0,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=0,roleId=10037,skill={0,{40001,0.4,{1,1.6,1}}},superSkill={85000,{40001,0.5,{6,3,3,1,1},{86,0.5,0.3,8,15,1}}},type=1},{camp=0,element=4,passivity={{64,0.4}},professionId=1,property={1,1121,1121,92,100,85,260,0,0,0,1,0,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=0,roleId=10003,skill={0,{40001,0.4,{1,2.2,1}},{20000,0.4,{3,0.6,3,10}}},type=1},{camp=0,element=3,passivity={},professionId=2,property={1,888,888,98,85,61,276,0,0,0,1,0,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=0,roleId=10037,skill={0,{40001,0.4,{1,1.6,1}}},superSkill={85000,{40001,0.5,{6,3,3,1,1},{86,0.5,0.3,8,15,1}}},type=1},teamPassive={{}},teamSkill={}}}
|
||
-- local testSeed = 1585137052
|
||
local testFightType = 2
|
||
local testFightTime = 90
|
||
UIManager.OpenPanel(UIName.BattlePanel, testFightData, testSeed, testFightType, testFightTime, "test", nil, nil, monsterId, nil)
|
||
|
||
--[[调试战斗
|
||
local testFightData = {enemyData={{{ai={2,1,1,1,1},camp=1,element=1,monsterId=30607,passivity={{45,0,1},{45,0,2}},professionId=0,property={200,852472,852472,15626,3946,3946,6720,0,0,0.05,1,0.2,1.5,0,1,1,0,0,0,0,0,0,0,0,0},quality=4,roleId=59,skill={0,{40001,0.4,{10,2.16,2,0.2}}},superSkill={50000,{20000,0.4,{2,0.96,2},{4,3,0.2,10,4},{4,1,0.2,10,4}}},type=2},teamPassive={},teamSkill={}}},playerData={{camp=0,element=3,passivity={{63,1,0.24,12},{14,0.4,1,0.1,3,3,2}},professionId=5,property={200,94925,94925,6878,5638,6460,4168,0,0.05,0.0477,1,0.0449,1.5,0.037,1,1.0302,0.027,0.017,0,0,0,0,0,0,0},quality=0,roleId=10007,skill={0,{40001,0.4,{1,0.7,2}},{30001,0.4,{9,12,0.4,20,0}}},type=1},{camp=0,element=4,passivity={{29,0.3,0.4},{39,10,3200}},professionId=3,property={200,76129,76129,8059,5907,5626,3857,0,0,0,1,0.0267,1.5745,0,1.0416,1,0.027,0.017,0,0,0,0,0,0,0},quality=0,roleId=10011,skill={0,{20211,0.4,{90,2.1,2,1}}},type=1},{camp=0,element=4,passivity={{57,0.3},{14,0.4,1,0.1,2,3,1}},professionId=2,property={180,60698,60698,6772,5455,3902,3368,0,0,0,1,0.0282,1.5257,0.0475,1,1,0.027,0.017,0,0,0,0,0,0,0},quality=0,roleId=10023,skill={0,{40001,0.4,{1,2.1,1}}},type=1},{camp=0,element=2,passivity={{34,550}},professionId=2,property={200,64808,64808,8098,5530,4079,4131,0,0,0.1339,1,0,1.5271,0.0321,1.0729,1.0309,0.027,0.017,0,0,0,0,0,0,0},quality=0,roleId=10022,skill={0,{40001,0.6,{67,3,3,0.42,1,0.25,1,0.5}}},superSkill={45000,{20000,0.4,{68,0.21,1,0.07,3}}},type=1},{camp=0,element=4,passivity={{14,0.4,1,0.1,3,3,2}},professionId=4,property={180,66062,66062,6957,5835,5176,3680,0,0,0.0708,1,0,1.5,0,1.044,1.0431,0.027,0.017,0,0,0,0,0,0,0},quality=0,roleId=10005,skill={0,{40001,0.4,{76,0.7,1,1},{3,0.5,1,4}}},superSkill={45000,{40001,0.4,{1,0.9,1},{77,0.3,1,3,0.2}}},type=1},teamPassive={{}},teamSkill={{901,{20000,0.4,{26,26090}},{10004,0.4,{4,9,0.1,2,1},{4,10,0.1,2,1}}},{702,{20000,0.4,{26,14403},{27,4320,4}},{10004,0.4,{37,0}},{10000,0.4,{40,2880,2,0}}},{303,{20003,0.4,{26,10400},{27,2600,6}},{10003,0.4,{25,1,0.2,7}}}}}}
|
||
local testSeed = 1573538141
|
||
local testFightType = 2
|
||
local testFightTime = 90
|
||
UIManager.OpenPanel(UIName.BattlePanel, testFightData, testSeed, testFightType, testFightTime, "test", nil, nil, monsterId, nil)
|
||
]]--
|
||
-- end
|
||
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
|
||
if tonumber(str) <= 1 then Log("太近了,跳不了,拜拜") return end
|
||
str = "14#" .. tonumber(str) .. "#0"
|
||
NetManager.GMEvent(str, function ()
|
||
PopupTipPanel.ShowTip("发送成功,请重登!")
|
||
end)
|
||
end)
|
||
|
||
-- 兽潮选定波次
|
||
Util.AddClick(this.btnMonsterWave, function ()
|
||
local str = tostring(this.waveText.text)
|
||
if not str or str == "" then
|
||
PopupTipPanel.ShowTip("格式错误!") return end
|
||
str = string.format("16#%s#0", str)
|
||
NetManager.GMEvent(str, function ()
|
||
PopupTipPanel.ShowTip("发送成功,请重登!")
|
||
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 ()
|
||
PopupTipPanel.ShowTip("发送成功,请重登!")
|
||
end)
|
||
end)
|
||
|
||
Util.AddClick(this.btnTecTree, function ()
|
||
NetManager.GMEvent("21#0#0", function ()
|
||
PopupTipPanel.ShowTip("发送成功, 请重登!")
|
||
end)
|
||
end)
|
||
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)
|
||
|
||
this.btnGoText.text = RoomManager.IsMatch == 1 and "取消匹配" or "开始匹配"
|
||
end
|
||
|
||
--界面关闭时调用(用于子类重写)
|
||
function GMPanel:OnClose()
|
||
|
||
end
|
||
|
||
--界面销毁时调用(用于子类重写)
|
||
function GMPanel:OnDestroy()
|
||
|
||
end
|
||
|
||
return GMPanel
|