Files
fc/dev/project/library/imports/e4/e4ba5ab9-a721-47b9-822c-29040e7da76f.js
T
2026-05-24 10:21:26 +08:00

892 lines
29 KiB
JavaScript

"use strict";
cc._RF.push(module, 'e4ba5q5pyFHuYIsKQQOfadv', 'arenateam_controller');
// Scripts/mod/pvp/arenateam/arenateam_controller.js
"use strict";
/*
這裡填寫簡要說明(必填),
@author: lwc@syg.com(必填, 創建模塊的人員)
@editor: xxx@syg.com(必填, 後續維護以及修改的人員)
@description:
組隊競技場 後端 鋒林 策劃 康傑
<br/>Create: 2019-09-28
*/
var BridgeController = require("bridge.controller");
var BattleController = require("battle_controller");
var BattleConst = require("battle_const");
var ArenateamEvent = require("arenateam_event");
var ArenateamConst = require("arenateam_const");
var ArenateamController = cc.Class({
"extends": BridgeController,
ctor: function ctor() {},
initConfig: function initConfig() {
var ArenateamModel = require("arenateam_model");
this.model = new ArenateamModel(this);
this.dispather = gcore.GlobalEvent;
this.model.initConfig();
// this.setOpenFunction(func_name, panel_obj, panel_name)
},
getModel: function getModel() {
return this.model;
},
registerEvents: function registerEvents() {
//聊天那邊會影響這邊的紅點
this.chat_event = gcore.GlobalEvent.bind(EventId.CHAT_UDMSG_WORLD, function (channel, is_this, is_login_content) {
if (channel && channel == ChatConst.Channel.Team || channel == ChatConst.Channel.Team_Sys) {
if (!is_login_content) {
this.model.setIsChatRedpoint(true);
}
}
}.bind(this));
this.team_info = gcore.GlobalEvent.bind(ArenateamEvent.ARENATEAM_REFRESH_TEAM_INFO_EVENT, function () {
//沒保存佈陣一
var my_team_info = this.model.getMyTeamInfo();
if (my_team_info && my_team_info.tid != 0) {}
this.sender27221();
}.bind(this));
},
registerProtocals: function registerProtocals() {
//主界面協議
this.RegisterProtocal(27220, this.handle27220); //"主界面隊伍協議"
//組隊大廳協議
this.RegisterProtocal(27200, this.handle27200); //"請求隊伍信息"
this.RegisterProtocal(27201, this.handle27201); //"創建隊伍"
this.RegisterProtocal(27202, this.handle27202); //"申請入隊"
this.RegisterProtocal(27203, this.handle27203); //"獲取申請入隊列表"
this.RegisterProtocal(27204, this.handle27204); //"回應入隊申請"
this.RegisterProtocal(27205, this.handle27205); //"邀請玩家入隊"
this.RegisterProtocal(27206, this.handle27206); //"獲取邀請列表"
this.RegisterProtocal(27207, this.handle27207); //"回應邀請入隊信息"
this.RegisterProtocal(27208, this.handle27208); //"一鍵清除邀請信息"
this.RegisterProtocal(27210, this.handle27210); //"搜索隊伍"
this.RegisterProtocal(27211, this.handle27211); //"退出隊伍"
this.RegisterProtocal(27212, this.handle27212); //"踢出玩家"
this.RegisterProtocal(27213, this.handle27213); //"移交隊長"
this.RegisterProtocal(27215, this.handle27215); //"登陸紅點"
this.RegisterProtocal(27216, this.handle27216); //"一鍵申請隊伍"
this.RegisterProtocal(27221, this.handle27221); //"請求我的隊伍信息"
this.RegisterProtocal(27222, this.handle27222); //"事件監聽"
this.RegisterProtocal(27223, this.handle27223); //"主界面排行榜"
this.RegisterProtocal(27224, this.handle27224); //"領取寶箱獎勵"
this.RegisterProtocal(27225, this.handle27225); //"修改隊伍設置"
this.RegisterProtocal(27226, this.handle27226); //"修改名字"
this.RegisterProtocal(27228, this.handle27228); //"獲取推薦玩家"
this.RegisterProtocal(27229, this.handle27229); //"搜索指定玩家"
this.RegisterProtocal(27240, this.handle27240); //"報名參賽"
this.RegisterProtocal(27241, this.handle27241); //"取消報名"
this.RegisterProtocal(27242, this.handle27242); //"保存佈陣調整"
this.RegisterProtocal(27243, this.handle27243); //"請求佈陣"
this.RegisterProtocal(27250, this.handle27250); //"刷新對手"
this.RegisterProtocal(27251, this.handle27251); //"匹配對手"
this.RegisterProtocal(27252, this.handle27252); //"挑戰對手"
this.RegisterProtocal(27253, this.handle27253); //"戰鬥結算"
this.RegisterProtocal(27255, this.handle27255); //"戰報日誌"
this.RegisterProtocal(27256, this.handle27256); //"戰報個人日誌"
this.RegisterProtocal(27227, this.handle27227); //"在線推送"
//
},
checkArenaTeamIsOpen: function checkArenaTeamIsOpen(not_tips) {
return this.model.checkArenaTeamIsOpen(not_tips);
},
reqBaseFromServer: function reqBaseFromServer(_cb) {
var _this = this;
var cfgs = ["arena_team_data"];
this.loadConfigs(cfgs, function (_ret, _data) {
_this.SendProtocal(27221, {}, _cb);
});
},
//主界面協議
sender27220: function sender27220() {
var protocal = {};
this.SendProtocal(27220, protocal);
},
handle27220: function handle27220(data) {
this.model.setMyTeamInfo(data);
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_MAIN_EVENT, data);
},
handle27227: function handle27227(data) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_ONLINE_EVENT, data);
},
//進入組隊大廳
sender27200: function sender27200() {
var protocal = {};
this.SendProtocal(27200, protocal);
},
handle27200: function handle27200(data) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_HALL_MAIN_EVENT, data);
},
//創建隊伍
sender27201: function sender27201(name, limit_lev, limit_power, is_check) {
var protocal = {};
protocal.name = name;
protocal.limit_lev = limit_lev;
protocal.limit_power = limit_power;
protocal.is_check = is_check;
this.SendProtocal(27201, protocal);
},
handle27201: function handle27201(data) {
// message(data.msg)
if (data.code == 1) {
//創建隊伍成功 要打開 我的隊伍界面 只要在組隊大廳還存在的情況下打開..其他情況不處理
if (this.arenateam_hall_panel) {
this.arenateam_hall_panel.changeToggle(ArenateamConst.TeamHallTabType.eMyTeam);
}
if (this.arenateam_create_team_panel) {
this.openArenateamCreateTeamPanel(false);
}
this.sender27220();
} else {
nx.tbox(data.msg);
}
},
//申請入隊
sender27202: function sender27202(tid, srv_id) {
var protocal = {};
protocal.tid = tid;
protocal.srv_id = srv_id;
this.SendProtocal(27202, protocal);
},
handle27202: function handle27202(data) {
// message(data.msg)
if (data.code == 1) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_APPLY_TEAM_EVENT, data);
}
},
//獲取申請入隊列表
sender27203: function sender27203(tid, srv_id) {
var protocal = {};
protocal.tid = tid;
protocal.srv_id = srv_id;
this.SendProtocal(27203, protocal);
},
handle27203: function handle27203(data) {
if (data.arena_team_member.length == 0) {
this.model.setIsApplayRedpoint(false);
}
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_APPLY_LIST_EVENT, data);
},
//回應入隊申請
sender27204: function sender27204(rid, srv_id, _type) {
var protocal = {};
protocal.rid = rid;
protocal.srv_id = srv_id;
protocal.type = _type;
this.SendProtocal(27204, protocal);
},
handle27204: function handle27204(data) {
// message(data.msg)
if (data.code == 1) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_ANSWER_APPLY_EVENT, data);
}
},
//獲取邀請列表
sender27205: function sender27205(rid, srv_id) {
var protocal = {};
protocal.rid = rid;
protocal.srv_id = srv_id;
this.SendProtocal(27205, protocal);
},
handle27205: function handle27205(data) {
// message(data.msg)
if (data.code == 1) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_INVITATION_PLAYER_EVENT, data);
}
},
//獲取邀請列表
sender27206: function sender27206() {
var protocal = {};
this.SendProtocal(27206, protocal);
},
handle27206: function handle27206(data) {
// if #data.team_list == 0) {
this.model.setIsInvitationRedpoint(false);
// end
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_INVITATION_LIST_EVENT, data);
},
//回應邀請入隊信息
sender27207: function sender27207(tid, srv_id, _type) {
var protocal = {};
protocal.tid = tid;
protocal.srv_id = srv_id;
protocal.type = _type;
this.SendProtocal(27207, protocal);
},
handle27207: function handle27207(data) {
// message(data.msg)
if (data.code == 1) {
this.sender27206();
}
},
//一鍵清除
sender27208: function sender27208() {
var protocal = {};
this.SendProtocal(27208, protocal);
},
handle27208: function handle27208(data) {
// message(data.msg)
if (data.code == 1) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_KEY_CLEAR_EVENT, data);
}
},
//搜索隊伍
sender27210: function sender27210(name) {
var protocal = {};
protocal.name = name;
this.SendProtocal(27210, protocal);
},
handle27210: function handle27210(data) {
nx.tbox(data.msg);
if (data.code == 1) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_SEARCH_TEAM_EVENT, data);
}
},
//退出隊伍
sender27211: function sender27211() {
var protocal = {};
this.SendProtocal(27211, protocal);
},
handle27211: function handle27211(data) {
if (data.code == 1) {
if (this.arenateam_hall_panel) {
this.sender27221();
}
this.sender27220();
this.model.setIsApplayRedpoint(false);
}
},
//踢出玩家
sender27212: function sender27212(rid, srv_id) {
var protocal = {};
protocal.rid = rid;
protocal.srv_id = srv_id;
this.SendProtocal(27212, protocal);
},
handle27212: function handle27212(data) {
// message(data.msg)
if (data.code == 1) {
if (this.arenateam_delete_player_panel) {
this.openArenateamDeletePlayerPanel(false);
}
}
},
//移交隊長
sender27213: function sender27213(rid, srv_id) {
var protocal = {};
protocal.rid = rid;
protocal.srv_id = srv_id;
this.SendProtocal(27213, protocal);
},
handle27213: function handle27213(data) {
// message(data.msg)
if (data.code == 1) {
if (this.arenateam_hall_panel) {
this.sender27221();
}
this.sender27220();
}
},
//紅點
sender27215: function sender27215(rid, srv_id) {
var protocal = {};
this.SendProtocal(27215, protocal);
},
handle27215: function handle27215(data) {
this.model.updateLoginRedpoint(data);
},
//一鍵申請隊伍
sender27216: function sender27216(do_join_list) {
var protocal = {};
protocal.do_join_list = do_join_list;
this.SendProtocal(27216, protocal);
},
handle27216: function handle27216(data) {
// message(data.msg)
if (data.code == 1) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_KEY_APPLY_TEAM_EVENT, data);
}
},
//獲取我的隊伍信息
sender27221: function sender27221() {
var protocal = {};
this.SendProtocal(27221, protocal);
},
handle27221: function handle27221(data) {
this.model.setMyTeamDetailsInfo(data);
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_MY_TEAM_INFO_EVENT, data);
},
//"事件類型(1:加入新隊伍 2: 隊伍信息變更 3:新的入隊申請 4:新的入隊邀請 5:被踢出隊伍 6:戰鬥結算)"
handle27222: function handle27222(data) {
if (data.type == 1) {
//加入新隊伍
this.joinNewTeam();
} else if (data.type == 2) {
//隊伍信息變更
if (this.arenateam_hall_panel) {
this.sender27221();
}
this.sender27220();
} else if (data.type == 3) {
//新的入隊申請
this.newApply();
} else if (data.type == 4) {
//新的入隊邀請
this.newInvitation();
} else if (data.type == 5) {
// :被踢出隊伍
this.leaveTeam();
} else if (data.type == 6) {
// 戰鬥結算
this.fightResult();
}
},
//推送新的入隊申請
newApply: function newApply() {
this.model.setIsApplayRedpoint(true);
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_APPLY_RED_POINT_EVENT);
},
//推送新的入隊邀請
newInvitation: function newInvitation(data) {
this.model.setIsInvitationRedpoint(true);
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_INVITATION_RED_POINT_EVENT);
},
//推送加入新隊伍
joinNewTeam: function joinNewTeam(data) {
if (this.arenateam_main_window) {
this.sender27220();
if (this.arenateam_hall_panel) this.arenateam_hall_panel.changeSelectedTab(ArenateamConst.TeamHallTabType.eMyTeam);
} else {
this.openArenateamHallPanel(true, {
index: ArenateamConst.TeamHallTabType.eMyTeam
});
}
},
//推送被踢了
leaveTeam: function leaveTeam(data) {
if (this.arenateam_add_player_panel) {
this.openArenateamAddPlayerPanel(false);
}
if (this.arenateam_main_window) {
if (this.arenateam_hall_panel) {
this.openArenateamHallPanel(false);
}
this.sender27220();
}
},
//推戰鬥結束
fightResult: function fightResult() {
this.model.setIsReportRedpoint(true);
if (this.arenateam_main_window) {
this.sender27220();
this.sender27223(1, 100);
}
},
//"主界面排行榜"
sender27223: function sender27223(start_rank, end_rank) {
var protocal = {};
protocal.start_rank = start_rank;
protocal.end_rank = end_rank;
this.SendProtocal(27223, protocal);
},
handle27223: function handle27223(data) {
this.model.updateRankInfo(data);
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_MAIN_RANK_EVENT, data);
},
//領取獎勵
sender27224: function sender27224(id) {
var protocal = {};
protocal.id = id;
this.SendProtocal(27224, protocal);
},
handle27224: function handle27224(data) {
if (data.code == 1) {
this.model.updateRewardInfo(data.id);
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_RECEIVE_BOX_EVENT, data);
}
},
//修改隊伍設置
sender27225: function sender27225(limit_lev, limit_power, is_check) {
var protocal = {};
protocal.limit_lev = limit_lev;
protocal.limit_power = limit_power;
protocal.is_check = is_check;
this.SendProtocal(27225, protocal);
},
handle27225: function handle27225(data) {
if (data.code == 1) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_TEAM_SET_EVENT, data);
if (this.arenateam_team_set_panel) {
this.openArenateamTeamSetPanel(false);
}
}
},
//修改隊伍名字
sender27226: function sender27226(name) {
var protocal = {};
protocal.name = name;
this.SendProtocal(27226, protocal);
},
handle27226: function handle27226(data) {
if (data.code == 1) {
nx.tbox(nx.text.getKey("lab_arenateam_1"));
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_CHANGE_NAME_EVENT, data);
} else {
nx.tbox(data.msg);
}
},
//獲取推薦玩家
sender27228: function sender27228() {
var protocal = {};
this.SendProtocal(27228, protocal);
},
handle27228: function handle27228(data) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_GET_RECOMMEND_INFO_EVENT, data);
},
//搜索指定玩家
sender27229: function sender27229(name) {
var protocal = {};
protocal.name = name;
this.SendProtocal(27229, protocal);
},
handle27229: function handle27229(data) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_SEARCH_PLAYER_EVENT, data);
},
//報名參賽
sender27240: function sender27240() {
var protocal = {};
this.SendProtocal(27240, protocal);
},
handle27240: function handle27240(data) {
// message(data.msg)
if (data.code == 1) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_JOIN_GAME_EVENT, data);
}
},
//取消報名
sender27241: function sender27241() {
var protocal = {};
this.SendProtocal(27241, protocal);
},
handle27241: function handle27241(data) {
// message(data.msg)
if (data.code == 1) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_LEAVE_GAME_EVENT, data);
}
},
//保存佈陣調整
sender27242: function sender27242(pos_info) {
var protocal = {};
protocal.pos_info = pos_info;
this.SendProtocal(27242, protocal);
},
handle27242: function handle27242(data) {
nx.tbox(data.msg);
if (data.code == 1) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_SAVE_FROM_EVENT, data);
this.sender27221();
}
},
//三個對玩的佈陣信息
sender27243: function sender27243() {
var protocal = {};
this.SendProtocal(27243, protocal);
},
handle27243: function handle27243(data) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_THREE_TEAM_INFO_EVENT, data);
},
//刷新對手
sender27250: function sender27250() {
var protocal = {};
this.SendProtocal(27250, protocal);
},
handle27250: function handle27250(data) {
if (data.code == 1) {
this.refresh_27250 = true;
}
},
//匹配對手
sender27251: function sender27251() {
var protocal = {};
this.SendProtocal(27251, protocal);
},
handle27251: function handle27251(data) {
if (this.refresh_27250) {
this.refresh_27250 = false;
// message(nx.text.getKey("刷新成功"))
}
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_MATCH_OTHER_EVENT, data);
},
//挑戰對手
sender27252: function sender27252(tid, srv_id, is_auto) {
var protocal = {};
protocal.tid = tid;
protocal.srv_id = srv_id;
protocal.is_auto = is_auto;
this.SendProtocal(27252, protocal);
},
handle27252: function handle27252(data) {
nx.tbox(data.msg);
// message(data.msg)
// gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_MATCH_OTHER_EVENT, data)
},
//戰鬥結算
handle27253: function handle27253(data) {
this.new_result_data = data;
return;
BattleController.getInstance().openFinishView(true, BattleConst.Fight_Type.Arean_Team, data);
},
newResultWin: function newResultWin() {
if (!this.new_result_data) return;
BattleController.getInstance().openFinishView(true, BattleConst.Fight_Type.Arean_Team, this.new_result_data);
this.new_result_data = null;
},
//戰報
sender27255: function sender27255() {
var protocal = {};
this.SendProtocal(27255, protocal);
},
handle27255: function handle27255(data) {
this.model.setIsReportRedpoint(false);
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_MIAIN_REPORT_EVENT, data);
},
//個人戰報
sender27256: function sender27256(id) {
var protocal = {};
protocal.id = id;
this.SendProtocal(27256, protocal);
},
handle27256: function handle27256(data) {
gcore.GlobalEvent.fire(ArenateamEvent.ARENATEAM_SINGLE_REPORT_EVENT, data);
},
//打開組隊競技場主界面
openArenateamMainWindow: function openArenateamMainWindow(status, setting) {
if (status == true) {
if (!this.arenateam_main_window) {
var ArenateamMainWindow = require("arenateam_main_window");
this.arenateam_main_window = new ArenateamMainWindow(this);
}
this.arenateam_main_window.open(setting);
} else {
if (this.arenateam_main_window) {
this.arenateam_main_window.close();
this.arenateam_main_window = null;
}
}
},
//創建隊伍
openArenateamCreateTeamPanel: function openArenateamCreateTeamPanel(status, setting) {
if (status == true) {
if (!this.arenateam_create_team_panel) {
var ArenateamCreateTeamPanel = require("arenateam_create_team_panel");
this.arenateam_create_team_panel = new ArenateamCreateTeamPanel(this);
}
if (this.arenateam_create_team_panel) {
this.arenateam_create_team_panel.open(setting);
}
} else {
if (this.arenateam_create_team_panel) {
this.arenateam_create_team_panel.close();
this.arenateam_create_team_panel = null;
}
}
},
//組隊大廳
openArenateamHallPanel: function openArenateamHallPanel(status, setting) {
if (status == true) {
if (!this.arenateam_hall_panel) {
var ArenateamHallPanel = require("arenateam_hall_panel");
this.arenateam_hall_panel = new ArenateamHallPanel(this);
}
if (this.arenateam_hall_panel) {
this.arenateam_hall_panel.open(setting);
}
} else {
if (this.arenateam_hall_panel) {
this.arenateam_hall_panel.close();
this.arenateam_hall_panel = null;
}
}
},
//隊伍改名
openArenateamChangTeamNamePanel: function openArenateamChangTeamNamePanel(status, setting) {
if (status == true) {
if (!this.arenateam_chang_team_name_panel) {
var ArenateamChangTeamNamePanel = require("arenateam_chang_team_name_panel");
this.arenateam_chang_team_name_panel = new ArenateamChangTeamNamePanel(this);
}
if (this.arenateam_chang_team_name_panel) {
this.arenateam_chang_team_name_panel.open(setting);
}
} else {
if (this.arenateam_chang_team_name_panel) {
this.arenateam_chang_team_name_panel.close();
this.arenateam_chang_team_name_panel = null;
}
}
},
//修改隊伍申請條件
openArenateamTeamSetPanel: function openArenateamTeamSetPanel(status, setting) {
if (status == true) {
if (!this.arenateam_team_set_panel) {
var ArenateamTeamSetPanel = require("arenateam_team_set_panel");
this.arenateam_team_set_panel = new ArenateamTeamSetPanel(this);
}
if (this.arenateam_team_set_panel) {
this.arenateam_team_set_panel.open(setting);
}
} else {
if (this.arenateam_team_set_panel) {
this.arenateam_team_set_panel.close();
this.arenateam_team_set_panel = null;
}
}
},
//踢除隊員
openArenateamDeletePlayerPanel: function openArenateamDeletePlayerPanel(status, setting) {
if (status == true) {
if (!this.arenateam_delete_player_panel) {
var ArenateamDeletePlayerPanel = require("arenateam_delete_player_panel");
this.arenateam_delete_player_panel = new ArenateamDeletePlayerPanel(this);
}
if (this.arenateam_delete_player_panel) {
this.arenateam_delete_player_panel.open(setting);
}
} else {
if (this.arenateam_delete_player_panel) {
this.arenateam_delete_player_panel.close();
this.arenateam_delete_player_panel = null;
}
}
},
//添加隊員
openArenateamAddPlayerPanel: function openArenateamAddPlayerPanel(status, setting) {
if (status == true) {
if (!this.arenateam_add_player_panel) {
var ArenateamAddPlayerPanel = require("arenateam_add_player_panel");
this.arenateam_add_player_panel = new ArenateamAddPlayerPanel(this);
}
if (this.arenateam_add_player_panel) {
this.arenateam_add_player_panel.open(setting);
}
} else {
if (this.arenateam_add_player_panel) {
this.arenateam_add_player_panel.close();
this.arenateam_add_player_panel = null;
}
}
},
//暫時不搞這東西
setOpenFunction: function setOpenFunction(func_name, panel_obj, panel_name) {
this[func_name] = function (status, setting) {
if (status == true) {
if (!this[panel_name]) {
this[panel_name] = new panel_obj();
}
if (this[panel_name]) {
this[panel_name].open(setting);
}
} else {
if (this[panel_name]) {
this[panel_name].close();
this[panel_name] = null;
}
}
};
},
//佈陣
openArenateamFormPanel: function openArenateamFormPanel(status, setting) {
if (status == true) {
if (!this.arenateam_form_panel) {
var ArenateamFormPanel = require("arenateam_form_panel");
this.arenateam_form_panel = new ArenateamFormPanel(this);
}
if (this.arenateam_form_panel) {
this.arenateam_form_panel.open(setting);
}
} else {
if (this.arenateam_form_panel) {
this.arenateam_form_panel.close();
this.arenateam_form_panel = null;
}
}
},
//打開挑戰界面 三選一界面
openArenateamFightListPanel: function openArenateamFightListPanel(status, setting) {
if (status == true) {
if (!this.arenateam_fight_list_panel) {
var ArenateamFightListPanel = require("arenateam_fight_list_panel");
this.arenateam_fight_list_panel = new ArenateamFightListPanel(this);
}
if (this.arenateam_fight_list_panel) {
this.arenateam_fight_list_panel.open(setting);
}
} else {
if (this.arenateam_fight_list_panel) {
this.arenateam_fight_list_panel.close();
this.arenateam_fight_list_panel = null;
}
}
},
//打開挑戰界面tips界面
openArenateamFightTips: function openArenateamFightTips(status, setting) {
if (status == true) {
if (!this.arenateam_fight_tips) {
var ArenateamFightTips = require("arenateam_fight_tips");
this.arenateam_fight_tips = new ArenateamFightTips(this);
}
if (this.arenateam_fight_tips) {
this.arenateam_fight_tips.open(setting);
}
} else {
if (this.arenateam_fight_tips) {
this.arenateam_fight_tips.close();
this.arenateam_fight_tips = null;
}
}
},
//打結算界面
openArenateamFightResultPanel: function openArenateamFightResultPanel(status, data) {
if (status == true) {
if (!this.arenateam_fight_result_panel) {
var ArenateamFightResultPanel = require("arenateam_fight_result_panel");
var data1 = data || {};
var result = data1.result || 1;
this.arenateam_fight_result_panel = new ArenateamFightResultPanel(this, result);
}
if (this.arenateam_fight_result_panel) this.arenateam_fight_result_panel.open(data);
} else {
if (this.arenateam_fight_result_panel) {
this.arenateam_fight_result_panel.close();
this.arenateam_fight_result_panel = null;
}
}
},
//打開錄像記錄界面
openArenateamFightRecordPanel: function openArenateamFightRecordPanel(status, setting) {
if (status == true) {
if (!this.arenateam_fight_record_panel) {
var ArenateamFightRecordPanel = require("arenateam_fight_record_panel");
this.arenateam_fight_record_panel = new ArenateamFightRecordPanel(this);
}
if (this.arenateam_fight_record_panel) {
this.arenateam_fight_record_panel.open(setting);
}
} else {
if (this.arenateam_fight_record_panel) {
this.arenateam_fight_record_panel.close();
this.arenateam_fight_record_panel = null;
}
}
},
//打開錄像記錄界面
openArenateamFightVedioPanel: function openArenateamFightVedioPanel(status, setting) {
if (status == true) {
if (!this.arenateam_fight_vedio_panel) {
var ArenateamFightVedioPanel = require("arenateam_fight_video_panel");
this.arenateam_fight_vedio_panel = new ArenateamFightVedioPanel(this);
}
if (this.arenateam_fight_vedio_panel) {
this.arenateam_fight_vedio_panel.open(setting);
}
} else {
if (this.arenateam_fight_vedio_panel) {
this.arenateam_fight_vedio_panel.close();
this.arenateam_fight_vedio_panel = null;
}
}
},
//打開獎勵界面
openArenateamBoxRewardPanel: function openArenateamBoxRewardPanel(status, setting) {
if (status == true) {
if (!this.arenateam_box_reward_panel) {
var ArenateamBoxRewardPanel = require("arenateam_box_reward_panel");
this.arenateam_box_reward_panel = new ArenateamBoxRewardPanel(this);
}
if (this.arenateam_box_reward_panel) {
this.arenateam_box_reward_panel.open(setting);
}
} else {
if (this.arenateam_box_reward_panel) {
this.arenateam_box_reward_panel.close();
this.arenateam_box_reward_panel = null;
}
}
},
//打開排行界面
openArenateamRankRewardPanel: function openArenateamRankRewardPanel(status, setting) {
if (status == true) {
if (!this.arenateam_rank_reward_panel) {
var ArenateamRankRewardPanel = require("arenateam_rank_reward_panel");
this.arenateam_rank_reward_panel = new ArenateamRankRewardPanel(this);
}
if (this.arenateam_rank_reward_panel) {
this.arenateam_rank_reward_panel.open(setting);
}
} else {
if (this.arenateam_rank_reward_panel) {
this.arenateam_rank_reward_panel.close();
this.arenateam_rank_reward_panel = null;
}
}
},
//打開商店界面
openArenateamShopPanel: function openArenateamShopPanel(status, setting) {
if (status == true) {
if (!this.arenateam_shop_panel) {
var ArenateamShopPanel = require("arenateam_shop_window");
this.arenateam_shop_panel = new ArenateamShopPanel(this);
}
if (this.arenateam_shop_panel) {
this.arenateam_shop_panel.open(setting);
}
} else {
if (this.arenateam_shop_panel) {
this.arenateam_shop_panel.close();
this.arenateam_shop_panel = null;
}
}
},
//打開聊天
openArenateamChatPanel: function openArenateamChatPanel(status, setting) {
if (status == true) {
if (!this.arenateam_chat_panel) {
var ArenateamChatPanel = require("arenateam_chat_panel");
this.arenateam_chat_panel = new ArenateamChatPanel(this);
}
if (this.arenateam_chat_panel) {
this.arenateam_chat_panel.open(setting);
}
} else {
if (this.arenateam_chat_panel) {
this.arenateam_chat_panel.close();
this.arenateam_chat_panel = null;
}
}
},
__delete: function __delete() {
if (this.model != null) {
this.model.deleteMe();
this.model = null;
}
}
});
module.exports = ArenateamController;
cc._RF.pop();