111
This commit is contained in:
93
Plugins/Anton/anton.nut
Normal file
93
Plugins/Anton/anton.nut
Normal file
@@ -0,0 +1,93 @@
|
||||
|
||||
dofile("sqr/Plugins/Anton/antonbuttonclass.nut"); //安图恩按钮类
|
||||
|
||||
dofile("sqr/Plugins/Anton/antontownmainbutton.nut"); //安图恩城镇开启攻坚队界面按钮部分
|
||||
|
||||
dofile("sqr/Plugins/Anton/antontownmainparty_list.nut"); //安图恩城镇队伍列表部分
|
||||
dofile("sqr/Plugins/Anton/antontownmainparty_info.nut"); //安图恩城镇队伍信息部分
|
||||
dofile("sqr/Plugins/Anton/antontownmainparty_req.nut"); //安图恩城镇队伍组队部分
|
||||
dofile("sqr/Plugins/Anton/antontownmainparty_user.nut"); //安图恩城镇队伍玩家部分
|
||||
|
||||
|
||||
|
||||
dofile("sqr/Plugins/Anton/antondungeoninfo.nut"); //安图恩开始攻坚主界面按钮
|
||||
|
||||
|
||||
|
||||
function Anton(obj) {
|
||||
|
||||
//判断 查看信息窗口 交易窗口如果开启则隐藏UI
|
||||
{
|
||||
if (sq_GetPopupWindowMainCotrol(74) || sq_GetPopupWindowMainCotrol(64)) {
|
||||
local window = sq_GetPopupWindowMainCotrol(267);
|
||||
if (window) window.SetVisible(false);
|
||||
} else {
|
||||
local window = sq_GetPopupWindowMainCotrol(267);
|
||||
if (window) window.SetVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
//如果不在安图恩区域则不执行
|
||||
if (L_sq_GetTownIndex() != 18 || L_sq_GetRegionIndex() < 1) return;
|
||||
|
||||
//检查自己是否断线重连
|
||||
if (!getroottable().rawin("AntonDConnect")) {
|
||||
local AntonDConnect = Json_STL("AntonDConnect");
|
||||
AntonDConnect.Put("op", 1075);
|
||||
local str = AntonDConnect.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
AntonDConnect.Delete();
|
||||
getroottable().rawset("AntonDConnect", true);
|
||||
}
|
||||
|
||||
//安图恩城镇开启攻坚队界面按钮部分
|
||||
AntonTownMainButtonControl(obj);
|
||||
|
||||
//安图恩城镇攻坚队界面 攻坚队队伍列表部分
|
||||
AntonTownMainControl_PartyList(obj);
|
||||
//安图恩城镇攻坚队界面 攻坚队队伍信息部分
|
||||
AntonTownMainControl_PartyInfo(obj);
|
||||
//安图恩城镇攻坚队界面 攻坚队队伍申请部分
|
||||
AntonTownMainControl_PartyReq(obj);
|
||||
|
||||
|
||||
//安图恩攻坚副本信息
|
||||
AntonDungeonInfoControlFunc(obj);
|
||||
}
|
||||
|
||||
function AntonTopDraw(obj) {
|
||||
local RootTab = getroottable();
|
||||
|
||||
//如果不在安图恩区域则不执行
|
||||
if (L_sq_GetTownIndex() != 18 || L_sq_GetRegionIndex() < 1) return;
|
||||
|
||||
//如果界面按钮被点击状态为打开 就运行攻坚队伍列表 绘制
|
||||
if (RootTab.rawin("ANTONTEAMMAINBUTTON") && RootTab["ANTONTEAMMAINBUTTON"].WindowSwitch == true) {
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].Run(obj);
|
||||
}
|
||||
|
||||
//如果安图恩队伍被点击状态为打开 就运行攻坚队伍信息 绘制
|
||||
if (RootTab.rawin("ANTONTOWNMAINCONTROLLIST") && RootTab["ANTONTOWNMAINCONTROLLIST"].NowSelectTeam != null) {
|
||||
RootTab["ANTONTOWNCONTROLINFO"].Run(obj);
|
||||
}
|
||||
|
||||
|
||||
//如果安图恩攻坚已经开始
|
||||
if (RootTab.rawin("ANTONDUNGEONINFOCONTROL") && RootTab["ANTONDUNGEONINFOCONTROL"].PageState == 1) {
|
||||
RootTab["ANTONDUNGEONINFOCONTROL"].Draw(obj);
|
||||
}
|
||||
|
||||
|
||||
//如果安图恩主界面开启就绘制申请队伍人信息
|
||||
RootTab["ANTONTOWNMAINCONTROLREQ"].Run(obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
360
Plugins/Anton/antonbuttonclass.nut
Normal file
360
Plugins/Anton/antonbuttonclass.nut
Normal file
@@ -0,0 +1,360 @@
|
||||
//HudPro按钮类
|
||||
class AntonButtonPro extends BasicsDrawTool // obj -- 按钮名称 -- X坐标 -- Y坐标 -- Ani调用路径 -- 宽度 -- 高度
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
Index = 0;
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gWidth, gLength, gIndex)
|
||||
{
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
Index = gIndex;
|
||||
}
|
||||
//绘制按钮
|
||||
function Show()
|
||||
{
|
||||
isLBDown();
|
||||
isRBDown();
|
||||
if(ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if(isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if(!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if(CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if(isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if(RectEnble) //开启悬停效果时
|
||||
{
|
||||
if((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
if(!isInRect()) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, Index, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame)
|
||||
{
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame)
|
||||
{
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool)
|
||||
{
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool)
|
||||
{
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect()
|
||||
{
|
||||
if(sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 1)
|
||||
{
|
||||
obj.getVar(ButtonName).setBool(0, true);
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
//右键按下状态
|
||||
function isRBDown()
|
||||
{
|
||||
if(isInRect() && IMouse.GetRButton() == 2)
|
||||
{
|
||||
obj.getVar(ButtonName).setBool(1, true);
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键双击状态
|
||||
function IsLBDoubleClick()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 64) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键单击状态
|
||||
function isLBActive()
|
||||
{
|
||||
if(isInRect() && IMouse.isButtonUpEvent() && obj.getVar(ButtonName).getBool(0) == true)
|
||||
{
|
||||
obj.getVar(ButtonName).setBool(0, false);
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
//右键单击状态
|
||||
function isRBActive()
|
||||
{
|
||||
if(isInRect() && IMouse.isButtonUpEvent() && obj.getVar(ButtonName).getBool(1) == true)
|
||||
{
|
||||
obj.getVar(ButtonName).setBool(1, false);
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
//别处点击
|
||||
function isNotLBActive()
|
||||
{
|
||||
|
||||
if(!isInRect() && IMouse.isButtonUpEvent()) return true;
|
||||
else return false;
|
||||
}
|
||||
//别处右键点击
|
||||
function isNotRBActive()
|
||||
{
|
||||
if(!isInRect() && IMouse.GetRButton() == 2) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Switch按钮类
|
||||
class AntonSwitchButtonPro extends SwitchButtonPro
|
||||
{
|
||||
obj = null; //Obj对象
|
||||
State = 0; //按钮状态
|
||||
ClickEnble = false; //点击效果
|
||||
ButtonDynamic = false; //动态按钮效果
|
||||
SwitchState = false; //复选框是否选中
|
||||
|
||||
CustomClickEnble = false; //自定义点击效果
|
||||
CustomClickAnifile = null; //自定义点击效果Ani路径
|
||||
CustomButtonName = null; //自定义点击效果名称
|
||||
CustomClickFrame = null; //自定义点击效果Ani编号
|
||||
CustomClickx = null; //自定义点击效果X坐标
|
||||
CustomClicky = null; //自定义点击效果Y坐标
|
||||
|
||||
|
||||
RectEnble = false; //悬停效果
|
||||
RectButtonName = null; //悬停名称
|
||||
RectBaseAnifile = null; //悬停Ani路径
|
||||
RectFrame = null; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = null; //悬停X坐标
|
||||
Recty = null; //悬停Y坐标
|
||||
|
||||
|
||||
ButtonName = null; //按钮名称
|
||||
x = null; //X坐标
|
||||
y = null; //Y坐标
|
||||
BaseAnifile = null; //调用Ani路径
|
||||
BaseAnifileFrame = null; //调用的Ani帧数
|
||||
width = null; //可点击宽度
|
||||
length = null; //可点击高度
|
||||
//构造函数
|
||||
constructor(gObj, gButtonName, gX, gY, gAnifile, gBaseAnifileFrame, gWidth, gLength)
|
||||
{
|
||||
obj = gObj;
|
||||
ButtonName = gButtonName;
|
||||
x = gX;
|
||||
y = gY;
|
||||
BaseAnifile = gAnifile;
|
||||
BaseAnifileFrame = gBaseAnifileFrame;
|
||||
width = gWidth;
|
||||
length = gLength;
|
||||
}
|
||||
|
||||
//绘制按钮
|
||||
function Show()
|
||||
{
|
||||
|
||||
|
||||
if(ClickEnble) //是否开启点击效果
|
||||
{
|
||||
if(isLBDown() && State == 0) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 1; //按键进入按下状态
|
||||
++y;
|
||||
}
|
||||
if(!isLBDown() && State == 1) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
State = 0; //按键进入弹起状态
|
||||
--y;
|
||||
}
|
||||
}
|
||||
|
||||
if(CustomClickEnble) //是否开启自定义点击效果
|
||||
{
|
||||
if(isLBDown()) //按下左键并且按钮处于弹起状态
|
||||
{
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomClickFrame, CustomButtonName);
|
||||
else T_DrawDynamicAni(obj, CustomClickAnifile, CustomClickx, CustomClicky, CustomButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if(RectEnble) //开启悬停效果时
|
||||
{
|
||||
if((isInRect() && !isLBDown()) || (isInRect() && !CustomClickEnble)) //如果鼠标悬停的时候 并且没有点击的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(44);
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
if(!isInRect() && !SwitchState) //如果鼠标没有悬停的时候
|
||||
{
|
||||
//IMouse.SetMouseTask(0);
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, BaseAnifile, x, y, BaseAnifileFrame, ButtonName);
|
||||
else T_DrawDynamicAni(obj, BaseAnifile, x, y, ButtonName);
|
||||
}
|
||||
|
||||
if(!isInRect() && SwitchState)
|
||||
{
|
||||
if(!ButtonDynamic) T_DrawStayAni(obj, RectBaseAnifile, Rectx, Recty, RectFrame, RectButtonName);
|
||||
else T_DrawDynamicAni(obj, RectBaseAnifile, Rectx, Recty, RectButtonName);
|
||||
}
|
||||
}
|
||||
|
||||
//设置自定义点击效果
|
||||
function SetCustomClickEnble(bool, gButtonName, gX, gY, gAnifile, gFrame)
|
||||
{
|
||||
CustomClickEnble = bool; //自定义点击效果
|
||||
CustomClickAnifile = gAnifile; //自定义点击效果Ani路径
|
||||
CustomButtonName = gButtonName; //自定义点击效果名称
|
||||
CustomClickFrame = gFrame; //自定义点击效果Ani编号
|
||||
CustomClickx = gX; //自定义点击效果X坐标
|
||||
CustomClicky = gY; //自定义点击效果Y坐标
|
||||
}
|
||||
|
||||
//设置悬停效果
|
||||
function SetRectEnble(bool, gButtonName, gX, gY, gAnifile, gFrame)
|
||||
{
|
||||
RectEnble = bool; //悬停效果
|
||||
RectButtonName = gButtonName; //悬停名称
|
||||
RectBaseAnifile = gAnifile; //悬停Ani路径
|
||||
RectFrame = gFrame; //非动态按钮的悬停调用Ani编号
|
||||
Rectx = gX; //悬停X坐标
|
||||
Recty = gY; //悬停Y坐标
|
||||
}
|
||||
|
||||
//设置动态按钮
|
||||
function SetClickEnble(bool)
|
||||
{
|
||||
ButtonDynamic = bool;
|
||||
}
|
||||
|
||||
//设置点击效果
|
||||
function SetClickEnble(bool)
|
||||
{
|
||||
ClickEnble = bool;
|
||||
}
|
||||
|
||||
//悬停状态
|
||||
function isInRect()
|
||||
{
|
||||
if(sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 5, 5, x, y, width, length)) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键按下状态
|
||||
function isLBDown()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 1) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键弹起状态
|
||||
function isLBUp()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 0) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键双击状态
|
||||
function IsLBDoubleClick()
|
||||
{
|
||||
if(isInRect() && IMouse.GetLButton() == 64) return true;
|
||||
else return false;
|
||||
}
|
||||
//左键单击状态
|
||||
function isLBActive()
|
||||
{
|
||||
if(isInRect() && IMouse.isButtonUpEvent()) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
}
|
||||
1480
Plugins/Anton/antondungeoninfo.nut
Normal file
1480
Plugins/Anton/antondungeoninfo.nut
Normal file
File diff suppressed because it is too large
Load Diff
108
Plugins/Anton/antontownmainbutton.nut
Normal file
108
Plugins/Anton/antontownmainbutton.nut
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
文件名:antontownmainbutton.nut
|
||||
路径:Plugins/Anton/antontownmainbutton.nut
|
||||
创建日期:2022-09-04 08:54
|
||||
文件用途:城镇中打开安图恩攻坚队面板按钮部分
|
||||
*/
|
||||
|
||||
class AntonTeamMainButtonC extends BasicsDrawTool {
|
||||
ButtonObject = null;
|
||||
State = 0;
|
||||
WindowSwitch = false;
|
||||
|
||||
//创建队伍和加入队伍事件
|
||||
function SendPackEvent_JoinTeam_and_CreatTeam(Type) {
|
||||
local JoinTeam_and_CreatTeam = Json_STL("JoinTeam_and_CreatTeam");
|
||||
JoinTeam_and_CreatTeam.Put("op", 1025);
|
||||
local str = JoinTeam_and_CreatTeam.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
JoinTeam_and_CreatTeam.Delete();
|
||||
}
|
||||
|
||||
//退出队伍事件
|
||||
function SendPackEvent_ExitTeam(Type) {
|
||||
local ExitTeam = Json_STL("ExitTeam");
|
||||
ExitTeam.Put("op", 1029);
|
||||
local str = ExitTeam.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
ExitTeam.Delete();
|
||||
}
|
||||
|
||||
//退出队伍请求
|
||||
function PartyKickPlayer(chunk) {
|
||||
print(chunk);
|
||||
L_sq_SendPackType(13);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
|
||||
//委任队长事件
|
||||
function PartyGiveM(chunk) {
|
||||
local PartyGiveM = Json_STL("PartyGiveM");
|
||||
PartyGiveM.Put("op", 1023);
|
||||
local str = PartyGiveM.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
PartyGiveM.Delete();
|
||||
}
|
||||
|
||||
constructor(obj) {
|
||||
ButtonObject = ButtonPro(obj, "RankSystemMainSwitchButton", 15, 300, "common/training/main/maintab.ani", 39, 35);
|
||||
ButtonObject.SetRectEnble(true, "RankSystemMainSwitchButtonr", 15, 300, "common/training/main/maintab.ani", 0);
|
||||
ButtonObject.SetCustomClickEnble(true, "RankSystemMainSwitchButtonc", 15, 300, "common/training/main/maintab.ani", 0);
|
||||
|
||||
//安图恩创建队伍和加入队伍事件
|
||||
SendPackTypeTable.rawset(11, SendPackEvent_JoinTeam_and_CreatTeam);
|
||||
SendPackTypeTable.rawset(12, SendPackEvent_JoinTeam_and_CreatTeam);
|
||||
//安图恩退出队伍事件
|
||||
SendPackTypeTable.rawset(13, SendPackEvent_ExitTeam);
|
||||
//委任队长事件
|
||||
SendPackTypeTable.rawset(124, PartyGiveM);
|
||||
//玩家自己退出队伍
|
||||
Pack_Control.rawset(1030, PartyKickPlayer);
|
||||
}
|
||||
|
||||
function Run(obj) {
|
||||
if (State == 0 && !sq_GetPopupWindowMainCotrol(267)) {
|
||||
ButtonObject.Show();
|
||||
if (ButtonObject.isLBActive()) {
|
||||
State = 1;
|
||||
L_NewWindows("Lenheart", 267, 0x65535);
|
||||
|
||||
local GetAntonTeamList = Json_STL("GetAntonTeamList");
|
||||
GetAntonTeamList.Put("op", 1007);
|
||||
GetAntonTeamList.Put("Page", 1);
|
||||
local str = GetAntonTeamList.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamList.Delete();
|
||||
}
|
||||
} else if (State == 1 && !sq_GetPopupWindowMainCotrol(267)) {
|
||||
local RootTab = getroottable();
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].NowSelectTeamFunc = null; //把功能选择页关掉
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].NowSelectTeam = null; //把功能选择页关掉
|
||||
State = 0;
|
||||
WindowSwitch = false;
|
||||
} else if (State == 1 && sq_GetPopupWindowMainCotrol(267)) {
|
||||
WindowSwitch = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local RootTab = getroottable();
|
||||
RootTab.rawdelete("ANTONTEAMMAINBUTTON");
|
||||
|
||||
function AntonTownMainButtonControl(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("ANTONTEAMMAINBUTTON") == false) {
|
||||
local ANTONTEAMMAINBUTTONOBJ = AntonTeamMainButtonC(obj);
|
||||
RootTab.rawset("ANTONTEAMMAINBUTTON", ANTONTEAMMAINBUTTONOBJ);
|
||||
} else {
|
||||
RootTab["ANTONTEAMMAINBUTTON"].Run(obj);
|
||||
}
|
||||
}
|
||||
120
Plugins/Anton/antontownmainparty_info.nut
Normal file
120
Plugins/Anton/antontownmainparty_info.nut
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
文件名:antontownmainparty_info.nut
|
||||
路径:Plugins/Anton/antontownmainparty_info.nut
|
||||
创建日期:2022-09-04 20:09
|
||||
文件用途:城镇中打开安图恩攻坚队面板攻坚队信息部分
|
||||
*/
|
||||
|
||||
class AntonTownControlInfo_C extends BasicsDrawTool {
|
||||
X = 424;
|
||||
Y = 28;
|
||||
UserUiMap = null; //小队成员UI Map
|
||||
UserInfoMap = null; //小队成员Info Map
|
||||
MySelfMap = null; //自己
|
||||
|
||||
CaptainControl = false; //攻坚队长主控
|
||||
|
||||
function RedAntonPlayerInfo(chunk) {
|
||||
//Sout("收到包: %L", chunk);
|
||||
local RootTab = getroottable();
|
||||
BasicsDrawTool.InitClass("AntonTownUserJson"); //自动判断清空
|
||||
local JsonObj = Json_STL("AntonTownUserJsonBuffer");
|
||||
RootTab.rawset("AntonTownUserJson", JsonObj);
|
||||
RootTab["AntonTownUserJson"].Parse(chunk, 0, false);
|
||||
|
||||
//判断是否是攻坚队长主控
|
||||
RootTab["ANTONTOWNCONTROLINFO"].CaptainControl = RootTab["AntonTownUserJson"].Get("CaptainBool");
|
||||
//清空自己的信息
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap = {};
|
||||
//写入自己的信息
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PartyID", RootTab["AntonTownUserJson"].Get("myself->PartyID"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PartyCaptain", RootTab["AntonTownUserJson"].Get("myself->PartyCaptain"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PlayerGrowTypeJob", RootTab["AntonTownUserJson"].Get("myself->PlayerGrowTypeJob"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PlayerSession", RootTab["AntonTownUserJson"].Get("myself->PlayerSession"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PlayerLevel", RootTab["AntonTownUserJson"].Get("myself->PlayerLevel"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PlayerJob", RootTab["AntonTownUserJson"].Get("myself->PlayerJob"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("PlayerName", RootTab["AntonTownUserJson"].Get("myself->PlayerName"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("CaptainBool", RootTab["AntonTownUserJson"].Get("myself->CaptainBool"));
|
||||
RootTab["ANTONTOWNCONTROLINFO"].MySelfMap.rawset("isPrepare", RootTab["AntonTownUserJson"].Get("myself->isPrepare"));
|
||||
|
||||
//清空小队成员数组
|
||||
RootTab["ANTONTOWNCONTROLINFO"].UserInfoMap = [];
|
||||
//写入小队成员信息
|
||||
for (local i = 0; i < 20; i++) {
|
||||
local gPartyID = RootTab["AntonTownUserJson"].Get("result->" + i + "->PartyID"); //得到队伍ID
|
||||
if (gPartyID == true || gPartyID == false) break; //如果读不到说明读完了 直接走
|
||||
local gPartyCaptain = RootTab["AntonTownUserJson"].Get("result->" + i + "->PartyCaptain"); //得到是否为小队队长
|
||||
local gPlayerGrowTypeJob = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerGrowTypeJob"); //得到转职职业(String)
|
||||
local gPlayerSession = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerSession"); //得到世界编号
|
||||
local gPlayerLevel = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerLevel"); //得到等级
|
||||
local gPlayerJob = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerJob"); //得到基础职业
|
||||
local gPlayerJobEx = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerJobEx"); //得到基础职业
|
||||
local gPlayerName = RootTab["AntonTownUserJson"].Get("result->" + i + "->PlayerName"); //得到玩家名字
|
||||
local gCaptainBool = RootTab["AntonTownUserJson"].Get("result->" + i + "->CaptainBool"); //得到是否为攻坚队队长
|
||||
local gMaterial = RootTab["AntonTownUserJson"].Get("result->" + i + "->isPrepare"); //得到是否拥有材料
|
||||
local gCID = RootTab["AntonTownUserJson"].Get("result->" + i + "->CID"); //得到是否拥有材料
|
||||
|
||||
local PlayerTab = {
|
||||
PartyID = gPartyID,
|
||||
PartyCaptain = gPartyCaptain,
|
||||
PlayerGrowTypeJob = gPlayerGrowTypeJob,
|
||||
PlayerSession = gPlayerSession,
|
||||
PlayerLevel = gPlayerLevel,
|
||||
PlayerJob = gPlayerJob,
|
||||
PlayerJobEx = gPlayerJobEx,
|
||||
PlayerName = gPlayerName,
|
||||
CaptainBool = gCaptainBool,
|
||||
Material = gMaterial,
|
||||
CID = gCID,
|
||||
}
|
||||
RootTab["ANTONTOWNCONTROLINFO"].UserInfoMap.append(PlayerTab); //PlayerInfoTable丢进数组
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
constructor() {
|
||||
UserUiMap = []; //小队成员UI Map
|
||||
UserInfoMap = []; //小队成员Info Map
|
||||
MySelfMap = {}; //自己
|
||||
|
||||
print("AntonTownControl_C ClassObject Succes");
|
||||
Pack_Control.rawset(1002, RedAntonPlayerInfo);
|
||||
Pack_Control.rawset(1012, RedAntonPlayerInfo);
|
||||
UserUiMap.resize(20);
|
||||
}
|
||||
|
||||
function DrawPartyInfo(obj) {
|
||||
for (local i = 0; i < UserInfoMap.len(); ++i) {
|
||||
if (!UserUiMap[i]) UserUiMap[i] = AntonUserControl_C("AntonUserPlayer" + i, 308 + ((i % 2) * 223), 97 + ((i / 2) * 42), CaptainControl); //如果用户Map没有被实例化则实例化他
|
||||
|
||||
UserUiMap[i].SetPlayerInfo(UserInfoMap[i]);
|
||||
|
||||
UserUiMap[i].Run(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Show(obj) {
|
||||
//如果有攻坚队的具体信息才绘制
|
||||
if (UserInfoMap.len() > 0) {
|
||||
DrawPartyInfo(obj);
|
||||
}
|
||||
}
|
||||
|
||||
function Run(obj) {
|
||||
Show(obj);
|
||||
}
|
||||
}
|
||||
|
||||
local RootTab = getroottable();
|
||||
RootTab.rawdelete("ANTONTOWNCONTROLINFO");
|
||||
|
||||
function AntonTownMainControl_PartyInfo(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("ANTONTOWNCONTROLINFO") == false) {
|
||||
local ANTONTOWNCONTROLINFOOBJ = AntonTownControlInfo_C();
|
||||
RootTab.rawset("ANTONTOWNCONTROLINFO", ANTONTOWNCONTROLINFOOBJ);
|
||||
}
|
||||
|
||||
}
|
||||
377
Plugins/Anton/antontownmainparty_list.nut
Normal file
377
Plugins/Anton/antontownmainparty_list.nut
Normal file
@@ -0,0 +1,377 @@
|
||||
/*
|
||||
文件名:antontownmainpartylist.nut
|
||||
路径:Plugins/Anton/antontownmainpartylist.nut
|
||||
创建日期:2022-09-04 09:03
|
||||
文件用途:城镇中打开安图恩攻坚队面板攻坚队列表部分
|
||||
*/
|
||||
|
||||
class AntonTownMainControl_PartyList_C extends BasicsDrawTool {
|
||||
X = 37;
|
||||
Y = 38;
|
||||
|
||||
ListUiMap = null; //小队成员UI Map
|
||||
ListInfoMap = null; //小队成员Info Map
|
||||
|
||||
ListCount = null;
|
||||
NowSelectTeam = null;
|
||||
NowSelectTeamFunc = null; //当前选择队伍功能
|
||||
MyTeamId = -1; //我的队伍Id
|
||||
MyCaptainControl = 0; //我是否为攻坚队长
|
||||
|
||||
ReloadingButtonObject = null; //刷新按钮
|
||||
MyTeamButtonObject = null; //我的队伍按钮
|
||||
LeftButtonObject = null; //左按钮
|
||||
RightButtonObject = null; //右按钮
|
||||
PartyReqButtonObject = null; //申请加入攻坚队伍按钮
|
||||
PartyExitButtonObject = null; //退出攻坚队伍按钮
|
||||
PartyStartButtonObject = null; //开始攻坚按钮
|
||||
Page = 1;
|
||||
|
||||
//获取汉字偏移
|
||||
function GetOffserFromLen(char, offset) {
|
||||
return (char.len() * offset)
|
||||
}
|
||||
|
||||
function RedAntonListInfo(chunk) {
|
||||
//Sout("\n\n收到包数据: %L", chunk);
|
||||
local RootTab = getroottable();
|
||||
BasicsDrawTool.InitClass("AntonTownListJson"); //自动判断清空
|
||||
local JsonObj = Json_STL("AntonTownListJsonBuffer");
|
||||
RootTab.rawset("AntonTownListJson", JsonObj);
|
||||
RootTab["AntonTownListJson"].Parse(chunk, 0, false);
|
||||
|
||||
//清空自己的信息
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].ListInfoMap = [];
|
||||
|
||||
//获取自己的攻坚队ID
|
||||
local gMyTeamId = RootTab["AntonTownListJson"].Get("MyTeamId");
|
||||
if (gMyTeamId) RootTab["ANTONTOWNMAINCONTROLLIST"].MyTeamId = gMyTeamId;
|
||||
|
||||
//获取自己是否为攻坚队队长
|
||||
local gMyCaptain = RootTab["AntonTownListJson"].Get("MyCaptain");
|
||||
if (gMyCaptain) RootTab["ANTONTOWNMAINCONTROLLIST"].MyCaptainControl = gMyCaptain;
|
||||
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].ListCount = RootTab["AntonTownListJson"].Get("ListCount").tointeger();
|
||||
//写入小队成员信息
|
||||
for (local i = 0; i < RootTab["ANTONTOWNMAINCONTROLLIST"].ListCount; i++) {
|
||||
local gTeamId = RootTab["AntonTownListJson"].Get("result->" + i + "->TeamId"); //得到攻坚队伍ID
|
||||
if (gTeamId == true || gTeamId == false) break; //如果读不到说明读完了 直接走
|
||||
local gTeamName = RootTab["AntonTownListJson"].Get("result->" + i + "->TeamName"); //得到攻坚队名称
|
||||
local gState = RootTab["AntonTownListJson"].Get("result->" + i + "->State"); //得到队伍状态
|
||||
local gTeamPlayerCount = RootTab["AntonTownListJson"].Get("result->" + i + "->TeamPlayerCount"); //得到队伍人数
|
||||
|
||||
local ListTab = {
|
||||
TeamId = gTeamId,
|
||||
TeamName = gTeamName,
|
||||
State = gState,
|
||||
TeamPlayerCount = gTeamPlayerCount,
|
||||
}
|
||||
RootTab["ANTONTOWNMAINCONTROLLIST"].ListInfoMap.append(ListTab); //ListTabInfoTable丢进数组
|
||||
}
|
||||
}
|
||||
|
||||
constructor() {
|
||||
ListUiMap = [];
|
||||
ListInfoMap = [];
|
||||
ListUiMap.resize(10);
|
||||
Pack_Control.rawset(1008, RedAntonListInfo);
|
||||
Pack_Control.rawset(1010, RedAntonListInfo);
|
||||
}
|
||||
|
||||
//功能按钮
|
||||
function FuncButtonC(obj, YposOffset, AniIndex) {
|
||||
local FuncThis = null;
|
||||
if (FuncThis == null) {
|
||||
FuncThis = AntonButtonPro(obj, "" + MyTeamId + FuncThis + "Func", X + 360, Y - 32 + YposOffset, "common/anton/funcbutton.ani", 100, 21, AniIndex);
|
||||
FuncThis.SetRectEnble(true, "" + MyTeamId + FuncThis + "Func", X + 360, Y - 32 + YposOffset, "common/anton/funcbutton.ani", AniIndex + 1);
|
||||
FuncThis.SetCustomClickEnble(true, "" + MyTeamId + FuncThis + "FuncSwitchButtonc", X + 360, Y - 32 + YposOffset, "common/anton/funcbutton.ani", AniIndex + 2);
|
||||
}
|
||||
FuncThis.Show();
|
||||
return FuncThis;
|
||||
}
|
||||
|
||||
//绘制背景框
|
||||
function DrawMainBackGround(obj) {
|
||||
//绘制主界面
|
||||
{
|
||||
T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X, Y, 0, "安图恩队伍列表界面");
|
||||
}
|
||||
}
|
||||
|
||||
//绘制攻坚队伍页面控制
|
||||
function DrawPartyListPageConctrl(obj) {
|
||||
//绘制攻坚队伍数量
|
||||
local ListMaxPage = (ListCount / 12).tointeger() + 1;
|
||||
L_Code_STL(Page.tostring() + " / " + ListMaxPage.tostring(), X + 41, Y + 293, 0xFFFFFFFF, 1);
|
||||
//如果不止1页
|
||||
if (ListMaxPage > 1) {
|
||||
//左按钮
|
||||
{
|
||||
if (LeftButtonObject == null) {
|
||||
LeftButtonObject = AntonButtonPro(obj, "AntonPartyListLeftButton", X + 17, Y + 292, "common/anton/new/newbasebutton.ani", 15, 13, 0);
|
||||
LeftButtonObject.SetRectEnble(true, "AntonPartyListLeftButtonr", X + 17, Y + 292, "common/anton/new/newbasebutton.ani", 1);
|
||||
LeftButtonObject.SetCustomClickEnble(true, "AntonPartyListLeftButtonc", X + 17, Y + 293, "common/anton/new/newbasebutton.ani", 2);
|
||||
}
|
||||
LeftButtonObject.Show();
|
||||
if (LeftButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
if (Page > 1) --Page;
|
||||
local GetAntonTeamList = Json_STL("GetAntonTeamList");
|
||||
GetAntonTeamList.Put("op", 1007);
|
||||
GetAntonTeamList.Put("Page", Page);
|
||||
local str = GetAntonTeamList.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamList.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
//右按钮
|
||||
{
|
||||
if (RightButtonObject == null) {
|
||||
RightButtonObject = AntonButtonPro(obj, "AntonPartyListRightButton", X + 75, Y + 292, "common/anton/new/newbasebutton.ani", 15, 13, 3);
|
||||
RightButtonObject.SetRectEnble(true, "AntonPartyListRightButtonr", X + 75, Y + 292, "common/anton/new/newbasebutton.ani", 4);
|
||||
RightButtonObject.SetCustomClickEnble(true, "AntonPartyListRightButtonc", X + 75, Y + 293, "common/anton/new/newbasebutton.ani", 5);
|
||||
}
|
||||
RightButtonObject.Show();
|
||||
if (RightButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
if (Page < ListMaxPage) ++Page;
|
||||
local GetAntonTeamList = Json_STL("GetAntonTeamList");
|
||||
GetAntonTeamList.Put("op", 1007);
|
||||
GetAntonTeamList.Put("Page", Page);
|
||||
local str = GetAntonTeamList.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamList.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制攻坚队列表信息
|
||||
function DrawPartyListInfo(obj) {
|
||||
//已经开始的 0xFF676665 灰色
|
||||
//可以申请的 0xFFddddea 珍珠白
|
||||
//可以申请的 0xFF4990aa 定义黄
|
||||
|
||||
local Min = 0 + (12 * (Page - 1));
|
||||
local Max = 12 * Page;
|
||||
for (local i = Min; i < ListCount % Max; ++i) {
|
||||
T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X + 15, Y + 61 + (19 * i), 1, "安图恩队伍列表底框" + i);
|
||||
|
||||
//阶段
|
||||
local stage = 5;
|
||||
if (ListInfoMap[i].State >= 1 && ListInfoMap[i].State <= 3) stage = 6;
|
||||
if (ListInfoMap[i].State >= 4 && ListInfoMap[i].State <= 5) stage = 7;
|
||||
if (ListInfoMap[i].State >= 6) stage = 8;
|
||||
|
||||
T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X + 18, Y + 62 + (19 * i), stage, "安图恩队伍列表底框" + stage);
|
||||
|
||||
local Color = null;
|
||||
if (ListInfoMap[i].State != 3) {
|
||||
Color = 0xFF4990aa;
|
||||
} else {
|
||||
Color = 0xFF676665;
|
||||
}
|
||||
|
||||
//绘制攻坚队名称
|
||||
local TeamNameStr = ListInfoMap[i].TeamName;
|
||||
|
||||
L_Code_STL(TeamNameStr, X + 60, Y + 64 + (19 * i), Color, 1);
|
||||
|
||||
//绘制攻坚队人数
|
||||
local PlayerCountStr = ListInfoMap[i].TeamPlayerCount + "/20";
|
||||
L_Code_STL(PlayerCountStr, X + 205, Y + 64 + (19 * i), Color, 1);
|
||||
|
||||
ListUiMap[i] = AntonButtonPro(obj, "AntonPartyListSwitchButton" + TeamNameStr, X + 15, Y + 61 + (19 * i), "common/anton/new/newnull.ani", 255, 15, 0);
|
||||
ListUiMap[i].SetRectEnble(true, "AntonPartyListSwitchButtonr" + TeamNameStr, X + 15, Y + 61 + (19 * i), "common/anton/new/newbaseui.ani", 3);
|
||||
ListUiMap[i].Show();
|
||||
|
||||
if (ListUiMap[i].isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
NowSelectTeam = i;
|
||||
|
||||
local GetAntonTeamInfo = Json_STL("GetAntonTeamInfo");
|
||||
GetAntonTeamInfo.Put("op", 1011);
|
||||
GetAntonTeamInfo.Put("TeamId", ListInfoMap[i].TeamId);
|
||||
local str = GetAntonTeamInfo.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamInfo.Delete();
|
||||
}
|
||||
|
||||
//当前选择队伍不为空 并且等于当前的i
|
||||
if (NowSelectTeam != null && NowSelectTeam == i) {
|
||||
local Ani = T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X + 15, Y + 61 + (19 * i), 2, "安图恩队伍列表界面当前选中");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制攻坚队列表功能按钮
|
||||
function DrawPartyListFuncButton(obj) {
|
||||
//刷新攻坚队
|
||||
{
|
||||
if (ReloadingButtonObject == null) {
|
||||
ReloadingButtonObject = AntonButtonPro(obj, "AntonPartyListReloadingButton", X + 96, Y + 291, "common/anton/new/newbasebutton.ani", 46, 17, 7);
|
||||
ReloadingButtonObject.SetRectEnble(true, "AntonPartyListReloadingButtonr", X + 96, Y + 291, "common/anton/new/newbasebutton.ani", 8);
|
||||
ReloadingButtonObject.SetCustomClickEnble(true, "AntonPartyListReloadingButtonc", X + 96, Y + 291, "common/anton/new/newbasebutton.ani", 9);
|
||||
}
|
||||
ReloadingButtonObject.Show();
|
||||
if (ReloadingButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
local GetAntonTeamList = Json_STL("GetAntonTeamList");
|
||||
GetAntonTeamList.Put("op", 1007);
|
||||
GetAntonTeamList.Put("Page", Page);
|
||||
local str = GetAntonTeamList.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamList.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
//我的攻坚队
|
||||
{
|
||||
if (MyTeamId == -1) {
|
||||
T_DrawStayAni(obj, "common/anton/new/newbasebutton.ani", X + 96 + 48 + 3, Y + 291, 10, "安图恩队伍列表我的攻坚队不可用");
|
||||
} else {
|
||||
if (MyTeamButtonObject == null) {
|
||||
MyTeamButtonObject = AntonButtonPro(obj, "AntonPartyListMyTeamButton", X + 96 + 48 + 3, Y + 291, "common/anton/new/newbasebutton.ani", 97, 23, 11);
|
||||
MyTeamButtonObject.SetRectEnble(true, "AntonPartyListMyTeamButtonr", X + 96 + 48 + 3, Y + 291, "common/anton/new/newbasebutton.ani", 12);
|
||||
MyTeamButtonObject.SetCustomClickEnble(true, "AntonPartyListMyTeamButtonc", X + 96 + 48 + 3, Y + 291, "common/anton/new/newbasebutton.ani", 13);
|
||||
}
|
||||
MyTeamButtonObject.Show();
|
||||
if (MyTeamButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
local GetAntonTeamList = Json_STL("GetAntonTeamList");
|
||||
GetAntonTeamList.Put("op", 1011);
|
||||
local str = GetAntonTeamList.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
GetAntonTeamList.Delete();
|
||||
NowSelectTeam = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制攻坚队请求按钮
|
||||
function DrawPartyReqButton(obj) {
|
||||
if (MyTeamId == -1) {
|
||||
//申请加入
|
||||
{
|
||||
if (PartyReqButtonObject == null) {
|
||||
PartyReqButtonObject = AntonButtonPro(obj, "AntonPartyListReloadingButton", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 70, 17, 14);
|
||||
PartyReqButtonObject.SetRectEnble(true, "AntonPartyListReloadingButtonr", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 15);
|
||||
PartyReqButtonObject.SetCustomClickEnble(true, "AntonPartyListReloadingButtonc", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 16);
|
||||
}
|
||||
PartyReqButtonObject.Show();
|
||||
if (PartyReqButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON4");
|
||||
local AntonJoinPartyReq = Json_STL("AntonJoinPartyReq");
|
||||
AntonJoinPartyReq.Put("op", 1003);
|
||||
AntonJoinPartyReq.Put("TeamId", ListInfoMap[NowSelectTeam].TeamId);
|
||||
local str = AntonJoinPartyReq.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
AntonJoinPartyReq.Delete();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//退出攻坚队
|
||||
{
|
||||
if (PartyExitButtonObject == null) {
|
||||
PartyExitButtonObject = AntonButtonPro(obj, "AntonPartyListReloadingButton", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 70, 17, 17);
|
||||
PartyExitButtonObject.SetRectEnble(true, "AntonPartyListReloadingButtonr", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 18);
|
||||
PartyExitButtonObject.SetCustomClickEnble(true, "AntonPartyListReloadingButtonc", X + 636, Y + 500, "common/anton/new/newbasebutton.ani", 19);
|
||||
}
|
||||
PartyExitButtonObject.Show();
|
||||
if (PartyExitButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON4");
|
||||
local AntonExitPartyReq = Json_STL("AntonExitPartyReq");
|
||||
AntonExitPartyReq.Put("op", 1005);
|
||||
local str = AntonExitPartyReq.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
AntonExitPartyReq.Delete();
|
||||
NowSelectTeam = null; //关闭队伍详细信息显示
|
||||
MyTeamId = -1; //清空自己的队伍信息
|
||||
|
||||
//清除正在攻坚的信息
|
||||
local RootTab = getroottable();
|
||||
RootTab.rawdelete("ANTONDUNGEONINFOCONTROL");
|
||||
}
|
||||
}
|
||||
//开始攻坚
|
||||
{
|
||||
local RootTab = getroottable();
|
||||
//如果自己是攻坚队队长 并且 攻坚状态为未开启
|
||||
if (MyCaptainControl == 1 && RootTab.rawin("ANTONDUNGEONINFOCONTROL") && (RootTab["ANTONDUNGEONINFOCONTROL"].State == -1 || RootTab["ANTONDUNGEONINFOCONTROL"].State == 2)) {
|
||||
if (PartyStartButtonObject == null) {
|
||||
PartyStartButtonObject = AntonButtonPro(obj, "AntonPartyListReloadingButton", X + 536, Y + 500, "common/anton/new/newbasebutton.ani", 70, 17, 29);
|
||||
PartyStartButtonObject.SetRectEnble(true, "AntonPartyListReloadingButtonr", X + 536, Y + 500, "common/anton/new/newbasebutton.ani", 30);
|
||||
PartyStartButtonObject.SetCustomClickEnble(true, "AntonPartyListReloadingButtonc", X + 536, Y + 500, "common/anton/new/newbasebutton.ani", 31);
|
||||
}
|
||||
PartyStartButtonObject.Show();
|
||||
if (PartyStartButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON4");
|
||||
local AntonPartyStart = Json_STL("AntonPartyStart");
|
||||
local op = 1041;
|
||||
//默认一阶段 如果是二阶段则发1047包二阶段开始
|
||||
if (RootTab["ANTONDUNGEONINFOCONTROL"].State == 2) op = 1047;
|
||||
AntonPartyStart.Put("op", op);
|
||||
local str = AntonPartyStart.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
AntonPartyStart.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//绘制背景框
|
||||
DrawMainBackGround(obj);
|
||||
|
||||
//如果没有攻坚队信息 则返回
|
||||
if (!ListCount || ListCount <= 0) return;
|
||||
|
||||
//绘制攻坚队伍页面控制
|
||||
DrawPartyListPageConctrl(obj);
|
||||
|
||||
//绘制攻坚队列表信息
|
||||
DrawPartyListInfo(obj);
|
||||
|
||||
//绘制攻坚队功能按钮
|
||||
DrawPartyListFuncButton(obj);
|
||||
|
||||
//绘制攻坚队请求按钮
|
||||
DrawPartyReqButton(obj);
|
||||
}
|
||||
|
||||
function Run(obj) {
|
||||
//绘制类
|
||||
Show(obj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
local RootTab = getroottable();
|
||||
RootTab.rawdelete("ANTONTOWNMAINCONTROLLIST");
|
||||
|
||||
function AntonTownMainControl_PartyList(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("ANTONTOWNMAINCONTROLLIST") == false) {
|
||||
local ANTONTOWNMAINCONTROLLISTOBJ = AntonTownMainControl_PartyList_C();
|
||||
RootTab.rawset("ANTONTOWNMAINCONTROLLIST", ANTONTOWNMAINCONTROLLISTOBJ);
|
||||
}
|
||||
}
|
||||
233
Plugins/Anton/antontownmainparty_req.nut
Normal file
233
Plugins/Anton/antontownmainparty_req.nut
Normal file
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
文件名:antontownmainparty_req.nut
|
||||
路径:Plugins/Anton/antontownmainparty_req.nut
|
||||
创建日期:2022-09-04 20:11
|
||||
文件用途:城镇中打开安图恩攻坚队面板攻坚队申请部分
|
||||
*/
|
||||
|
||||
|
||||
class AntonTownMainControl_PartyReq_C extends BasicsDrawTool {
|
||||
X = 57;
|
||||
Y = 385;
|
||||
ReqList = null;
|
||||
|
||||
Page = 1;
|
||||
NowSelect = 0;
|
||||
|
||||
|
||||
LeftButtonObject = null; //左按钮
|
||||
RightButtonObject = null; //右按钮
|
||||
|
||||
ClossButtonObj = null;
|
||||
AllowJoinButtonObj = null;
|
||||
RejectJoinButtonObj = null;
|
||||
|
||||
|
||||
function AntonPartyReqPack(chunk) {
|
||||
//print(chunk);
|
||||
local RootTab = getroottable();
|
||||
BasicsDrawTool.InitClass("AntonPartyReqJson"); //自动判断清空
|
||||
local JsonObj = Json_STL("AntonPartyReqJson");
|
||||
RootTab.rawset("AntonPartyReqJson", JsonObj);
|
||||
RootTab["AntonPartyReqJson"].Parse(chunk, 0, false);
|
||||
|
||||
|
||||
local TabBuffer = {
|
||||
UID = RootTab["AntonPartyReqJson"].Get("Charac->UID"),
|
||||
CID = RootTab["AntonPartyReqJson"].Get("Charac->CID"),
|
||||
CaptainBool = RootTab["AntonPartyReqJson"].Get("Charac->CaptainBool"),
|
||||
PartyCaptain = RootTab["AntonPartyReqJson"].Get("Charac->PartyCaptain"),
|
||||
PlayerSession = RootTab["AntonPartyReqJson"].Get("Charac->PlayerSession"),
|
||||
PartyID = RootTab["AntonPartyReqJson"].Get("Charac->PartyID"),
|
||||
PlayerLevel = RootTab["AntonPartyReqJson"].Get("Charac->PlayerLevel"),
|
||||
PlayerName = RootTab["AntonPartyReqJson"].Get("Charac->PlayerName"),
|
||||
PlayerJob = RootTab["AntonPartyReqJson"].Get("Charac->PlayerJob"),
|
||||
PlayerJobEx = RootTab["AntonPartyReqJson"].Get("Charac->PlayerJobEx"),
|
||||
PlayerGrowTypeJob = RootTab["AntonPartyReqJson"].Get("Charac->PlayerGrowTypeJob"),
|
||||
isPrepare = RootTab["AntonPartyReqJson"].Get("Charac->isPrepare"),
|
||||
UiButton = null,
|
||||
}
|
||||
|
||||
RootTab["ANTONTOWNMAINCONTROLREQ"].ReqList.append(TabBuffer);
|
||||
}
|
||||
|
||||
constructor() {
|
||||
ReqList = [];
|
||||
Pack_Control.rawset(1004, AntonPartyReqPack);
|
||||
}
|
||||
|
||||
//获取汉字偏移
|
||||
function GetOffserFromLen(char, offset) {
|
||||
return (char.len() * offset)
|
||||
}
|
||||
|
||||
//绘制申请人具体信息
|
||||
function DrawReqPlayerInfo(obj) {
|
||||
//材料准备情况
|
||||
T_DrawStayAni(obj, "common/anton/material.ani", X + 157, Y - 1, ReqList[NowSelect].isPrepare.tointeger(), "安图恩队伍申请材料准备情况" + ReqList[NowSelect].isPrepare);
|
||||
//头像
|
||||
T_DrawStayAni(obj, "common/anton/face/" + ReqList[NowSelect].PlayerJob + "/" + (ReqList[NowSelect].PlayerJobEx % 16) + ".ani", X, Y, 0, "安图恩队伍申请头像编号" + ReqList[NowSelect].PlayerName);
|
||||
//绘制等级
|
||||
L_Code_STL("Lv." + ReqList[NowSelect].PlayerLevel, X + 40, Y + 17, 0xFF29708a, 1);
|
||||
//绘制名字
|
||||
L_Code_STL(ReqList[NowSelect].PlayerName, X + 40, Y - 1, 0xFF29708a, 1);
|
||||
//绘制职业名
|
||||
L_Code_STL(ReqList[NowSelect].PlayerGrowTypeJob, X + 65 + GetOffserFromLen(ReqList[NowSelect].PlayerGrowTypeJob.tostring(), 3), Y + 17, 0xFF29708a, 1);
|
||||
//绘制信息
|
||||
L_Code_STL("", X + 200, Y + 75, 0xFF29708a, 1);
|
||||
}
|
||||
|
||||
//绘制申请人列表
|
||||
function DrawReqPlayerList(obj) {
|
||||
local Min = 0 + (5 * (Page - 1));
|
||||
local Max = 5 * Page;
|
||||
for (local i = Min; i < ReqList.len() % Max; ++i) {
|
||||
T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X - 5, Y + 53 + (19 * i), 1, "安图恩队伍申请列表底框" + i);
|
||||
//绘制等级
|
||||
L_Code_STL("Lv." + ReqList[i].PlayerLevel, X + 3, Y + 56 + (19 * i), 0xFF29708a, 1);
|
||||
//绘制名字
|
||||
L_Code_STL(ReqList[i].PlayerName, X + 57, Y + 56 + (19 * i), 0xFF29708a, 1);
|
||||
//材料准备情况
|
||||
T_DrawStayAni(obj, "common/anton/material.ani", X + 160, Y + 56 + (19 * i), ReqList[i].isPrepare.tointeger(), "安图恩队伍申请材料准备情况" + ReqList[NowSelect].isPrepare);
|
||||
|
||||
ReqList[i].UiButton = AntonButtonPro(obj, "AntonPartyReqListSwitchButton" + ReqList[i].PlayerName, X - 5, Y + 53 + (19 * i), "common/anton/new/newnull.ani", 255, 15, 0);
|
||||
ReqList[i].UiButton.SetRectEnble(true, "AntonPartyReqListSwitchButtonr" + ReqList[i].PlayerName, X - 5, Y + 53 + (19 * i), "common/anton/new/newbaseui.ani", 3);
|
||||
ReqList[i].UiButton.Show();
|
||||
|
||||
if (ReqList[i].UiButton.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
NowSelect = i;
|
||||
}
|
||||
}
|
||||
T_DrawStayAni(obj, "common/anton/new/newbaseui.ani", X - 5, Y + 53 + (19 * NowSelect), 2, "安图恩队伍申请列表界面当前选中");
|
||||
}
|
||||
|
||||
//绘制申请人页面控制
|
||||
function DrawReqPlayerListPageConctrl(obj) {
|
||||
//绘制申请人页面数量
|
||||
local ListMaxPage = (ReqList.len() / 5).tointeger() + 1;
|
||||
L_Code_STL(Page.tostring() + " / " + ListMaxPage.tostring(), X + 21, Y + 155, 0xFFFFFFFF, 1);
|
||||
|
||||
//如果申请人列表不止1页
|
||||
if (ListMaxPage > 1) {
|
||||
//左按钮
|
||||
{
|
||||
if (LeftButtonObject == null) {
|
||||
LeftButtonObject = AntonButtonPro(obj, "AntonPartyReqListLeftButton", X - 3, Y + 154, "common/anton/new/newbasebutton.ani", 15, 13, 0);
|
||||
LeftButtonObject.SetRectEnble(true, "AntonPartyReqListLeftButtonr", X - 3, Y + 154, "common/anton/new/newbasebutton.ani", 1);
|
||||
LeftButtonObject.SetCustomClickEnble(true, "AntonPartyReqListLeftButtonc", X - 3, Y + 155, "common/anton/new/newbasebutton.ani", 2);
|
||||
}
|
||||
LeftButtonObject.Show();
|
||||
if (LeftButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
if (Page > 1) --Page;
|
||||
}
|
||||
}
|
||||
|
||||
//右按钮
|
||||
{
|
||||
if (RightButtonObject == null) {
|
||||
RightButtonObject = AntonButtonPro(obj, "AntonPartyReqListRightButton", X + 55, Y + 154, "common/anton/new/newbasebutton.ani", 15, 13, 3);
|
||||
RightButtonObject.SetRectEnble(true, "AntonPartyReqListRightButtonr", X + 55, Y + 154, "common/anton/new/newbasebutton.ani", 4);
|
||||
RightButtonObject.SetCustomClickEnble(true, "AntonPartyReqListRightButtonc", X + 55, Y + 155, "common/anton/new/newbasebutton.ani", 5);
|
||||
}
|
||||
RightButtonObject.Show();
|
||||
if (RightButtonObject.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
if (Page < ListMaxPage) ++Page;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制申请人控制按钮
|
||||
function DrawReqPlayerConctrlButton(obj, Type) {
|
||||
if (Type == 0) {
|
||||
T_DrawStayAni(obj, "common/anton/new/newbasebutton.ani", X + 138, Y + 153, 20, "安图恩队伍申请同意不可用");
|
||||
T_DrawStayAni(obj, "common/anton/new/newbasebutton.ani", X + 138 + 43, Y + 153, 24, "安图恩队伍申请拒绝不可用");
|
||||
} else {
|
||||
//同意按钮
|
||||
{
|
||||
if (AllowJoinButtonObj == null) {
|
||||
AllowJoinButtonObj = AntonButtonPro(obj, "AntonAllowJoinButton", X + 138, Y + 153, "common/anton/new/newbasebutton.ani", 40, 17, 21);
|
||||
AllowJoinButtonObj.SetRectEnble(true, "AntonAllowJoinButtonr", X + 138, Y + 153, "common/anton/new/newbasebutton.ani", 22);
|
||||
AllowJoinButtonObj.SetCustomClickEnble(true, "AntonAllowJoinButtonc", X + 138, Y + 153, "common/anton/new/newbasebutton.ani", 23);
|
||||
}
|
||||
AllowJoinButtonObj.Show();
|
||||
if (AllowJoinButtonObj.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
local TabBuffer = {
|
||||
UID = ReqList[NowSelect].UID,
|
||||
CID = ReqList[NowSelect].CID,
|
||||
CaptainBool = ReqList[NowSelect].CaptainBool,
|
||||
PartyCaptain = ReqList[NowSelect].PartyCaptain,
|
||||
PlayerSession = ReqList[NowSelect].PlayerSession,
|
||||
PartyID = ReqList[NowSelect].PartyID,
|
||||
PlayerLevel = ReqList[NowSelect].PlayerLevel,
|
||||
PlayerJob = ReqList[NowSelect].PlayerJob,
|
||||
PlayerJobEx = ReqList[NowSelect].PlayerJobEx,
|
||||
IsPrepare = ReqList[NowSelect].isPrepare,
|
||||
}
|
||||
local TabBufferB = {
|
||||
Charac = TabBuffer,
|
||||
op = 1013,
|
||||
}
|
||||
local ReqStr = Json.Encode(TabBufferB);
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(ReqStr);
|
||||
L_sq_SendPack();
|
||||
ReqList.remove(NowSelect);
|
||||
}
|
||||
}
|
||||
|
||||
//拒绝按钮
|
||||
{
|
||||
if (RejectJoinButtonObj == null) {
|
||||
RejectJoinButtonObj = AntonButtonPro(obj, "AntonRejectJoinButton", X + 138 + 43, Y + 153, "common/anton/new/newbasebutton.ani", 40, 17, 25);
|
||||
RejectJoinButtonObj.SetRectEnble(true, "AntonRejectJoinButtonr", X + 138 + 43, Y + 153, "common/anton/new/newbasebutton.ani", 26);
|
||||
RejectJoinButtonObj.SetCustomClickEnble(true, "AntonRejectJoinButtonc", X + 138 + 43, Y + 153, "common/anton/new/newbasebutton.ani", 27);
|
||||
}
|
||||
RejectJoinButtonObj.Show();
|
||||
if (RejectJoinButtonObj.isLBActive()) {
|
||||
obj.sq_PlaySound("CLICK_BUTTON2");
|
||||
ReqList.remove(NowSelect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj) {
|
||||
//绘制申请人具体信息
|
||||
DrawReqPlayerInfo(obj);
|
||||
|
||||
//绘制申请人列表
|
||||
DrawReqPlayerList(obj);
|
||||
|
||||
//绘制申请人页面控制
|
||||
DrawReqPlayerListPageConctrl(obj);
|
||||
|
||||
//绘制申请人控制按钮
|
||||
DrawReqPlayerConctrlButton(obj, 1);
|
||||
}
|
||||
|
||||
function Run(obj) {
|
||||
//如果不是自己的界面打开
|
||||
local RootTab = getroottable();
|
||||
if(RootTab["ANTONTEAMMAINBUTTON"].State == 0)return;
|
||||
local ArrSize = ReqList.len();
|
||||
if (ArrSize > 0) {
|
||||
Show(obj);
|
||||
} else DrawReqPlayerConctrlButton(obj, 0);
|
||||
}
|
||||
}
|
||||
|
||||
local RootTab = getroottable();
|
||||
RootTab.rawdelete("ANTONTOWNMAINCONTROLREQ");
|
||||
|
||||
function AntonTownMainControl_PartyReq(obj) {
|
||||
local RootTab = getroottable();
|
||||
if (RootTab.rawin("ANTONTOWNMAINCONTROLREQ") == false) {
|
||||
local ANTONTOWNMAINCONTROLREQOBJ = AntonTownMainControl_PartyReq_C();
|
||||
RootTab.rawset("ANTONTOWNMAINCONTROLREQ", ANTONTOWNMAINCONTROLREQOBJ);
|
||||
}
|
||||
}
|
||||
303
Plugins/Anton/antontownmainparty_user.nut
Normal file
303
Plugins/Anton/antontownmainparty_user.nut
Normal file
@@ -0,0 +1,303 @@
|
||||
/*
|
||||
文件名:antontownmainparty_user.nut
|
||||
路径:Plugins/Anton/antontownmainparty_user.nut
|
||||
创建日期:2022-09-04 20:12
|
||||
文件用途:城镇中打开安图恩攻坚队面板攻坚队玩家部分
|
||||
*/
|
||||
|
||||
class AntonUserControl_C extends BasicsDrawTool
|
||||
{
|
||||
CaptainControl = null; //攻坚队长主控
|
||||
|
||||
PartyID = null; //队伍ID
|
||||
PlayerLevel = null; //玩家等级
|
||||
PlayerName = null; //玩家名字
|
||||
PlayerJob = null; //玩家基础职业
|
||||
PlayerJobEx = null; //玩家转职职业
|
||||
PlayerGrowTypeJob = null; //玩家转职职业
|
||||
PlayerSession = null; //玩家世界编号
|
||||
PartyCaptain = null; //玩家是否小队队长
|
||||
CaptainBool = null; //是否攻坚队队长
|
||||
Material = null; //是否拥有材料
|
||||
CID = null; //玩家CID
|
||||
|
||||
CheakPlayerInfoFunc = null;
|
||||
|
||||
FuncButtonSwitch = false; //功能界面是否打开
|
||||
MyName = null;
|
||||
ButtonObj = null;
|
||||
X = 0;
|
||||
Y = 0;
|
||||
|
||||
KickoutPlayerButtonObj = null; //踢出玩家按钮
|
||||
CheckPlayerInfoButtonObj = null; //查看信息按钮
|
||||
PartyFuncButtonObj = null; //组队按钮
|
||||
TradingPlayerButtonObj = null; //交易按钮
|
||||
|
||||
//获取汉字偏移
|
||||
function GetOffserFromLen(char, offset)
|
||||
{
|
||||
return (char.len() * offset)
|
||||
}
|
||||
|
||||
constructor(gName, gX, gY, gCaptainControl)
|
||||
{
|
||||
MyName = gName;
|
||||
X = gX;
|
||||
Y = gY;
|
||||
print("AntonUserControl_C ClassObject Succes");
|
||||
CaptainControl = gCaptainControl;
|
||||
}
|
||||
|
||||
//设置Player信息
|
||||
function SetPlayerInfo(InfoTable)
|
||||
{
|
||||
PartyID = InfoTable.PartyID; //队伍ID
|
||||
PlayerLevel = InfoTable.PlayerLevel; //玩家等级
|
||||
PlayerName = InfoTable.PlayerName; //玩家名字
|
||||
PlayerJob = InfoTable.PlayerJob; //玩家基础职业
|
||||
PlayerJobEx = InfoTable.PlayerJobEx; //玩家转职职业
|
||||
PlayerGrowTypeJob = InfoTable.PlayerGrowTypeJob; //玩家转职职业
|
||||
PlayerSession = InfoTable.PlayerSession; //玩家世界编号
|
||||
PartyCaptain = InfoTable.PartyCaptain; //玩家是否小队队长
|
||||
CaptainBool = InfoTable.CaptainBool; //是否攻坚队队长
|
||||
Material = InfoTable.Material; //是否拥有材料
|
||||
CID = InfoTable.CID; //玩家CID
|
||||
}
|
||||
|
||||
function FuncButtonC(obj, YposOffset, AniIndex)
|
||||
{
|
||||
local FuncThis = null;
|
||||
if(FuncThis == null)
|
||||
{
|
||||
FuncThis = AntonButtonPro(obj, MyName + FuncThis + "Func", AntonTownControl_C.X + X - 110, AntonTownControl_C.Y + Y - 1 + YposOffset, "common/anton/funcbutton.ani", 100, 21, AniIndex);
|
||||
FuncThis.SetRectEnble(true, MyName + FuncThis + "Func", AntonTownControl_C.X + X - 110, AntonTownControl_C.Y + Y - 1 + YposOffset, "common/anton/funcbutton.ani", AniIndex + 1);
|
||||
FuncThis.SetCustomClickEnble(true, FuncThis + "FuncSwitchButtonc", AntonTownControl_C.X + X - 110, AntonTownControl_C.Y + Y - 1 + YposOffset, "common/anton/funcbutton.ani", AniIndex + 2);
|
||||
}
|
||||
FuncThis.Show();
|
||||
return FuncThis;
|
||||
}
|
||||
|
||||
//绘制功能按键
|
||||
function DrawFucButton(obj)
|
||||
{
|
||||
if(FuncButtonSwitch) //功能函数开关
|
||||
{
|
||||
local Ypos = 0; //初始偏移
|
||||
|
||||
{ //邀请组队
|
||||
if(PartyID == 0)
|
||||
{
|
||||
local CheakPlayer = FuncButtonC(obj, Ypos, 12);
|
||||
if(CheakPlayer.isLBActive())
|
||||
{
|
||||
L_sq_SendPackType(10);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(0);
|
||||
L_sq_SendPackDWord(1);
|
||||
L_sq_SendPackWord(0);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
Ypos += 21;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
{ //查看信息
|
||||
local CheakPlayer = FuncButtonC(obj, Ypos, 0);
|
||||
if(CheakPlayer.isLBActive())
|
||||
{
|
||||
L_sq_SendPackType(8);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(3);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
Ypos += 21;
|
||||
}
|
||||
|
||||
{ //交易
|
||||
local TradingPlayer = FuncButtonC(obj, Ypos, 6);
|
||||
if(TradingPlayer.isLBActive())
|
||||
{
|
||||
L_sq_SendPackType(10);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(1);
|
||||
L_sq_SendPackDWord(22053);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
Ypos += 21;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//绘制主Ani
|
||||
function DrawMainAni(obj)
|
||||
{
|
||||
if(ButtonObj == null)
|
||||
{
|
||||
ButtonObj = AntonButtonPro(obj, MyName, AntonTownControl_C.X + X, AntonTownControl_C.Y + Y, "common/anton/user.ani", 329, 17, 0);
|
||||
ButtonObj.SetRectEnble(true, MyName + "SwitchButtonr", AntonTownControl_C.X + X - 8, AntonTownControl_C.Y + Y - 8, "common/anton/user.ani", 2);
|
||||
}
|
||||
ButtonObj.Show();
|
||||
|
||||
//绘制队伍
|
||||
T_DrawStayAni(obj, "common/anton/partytype.ani", AntonTownControl_C.X + X + 6, AntonTownControl_C.Y + Y + 2, PartyID + 1, "安图恩队伍编号" + PartyID, 1.0);
|
||||
//绘制材料准备情况
|
||||
T_DrawStayAni(obj, "common/anton/material.ani", AntonTownControl_C.X + X + 272, AntonTownControl_C.Y + Y + 2, Material.tointeger(), "安图恩材料准备情况" + Material, 1.0);
|
||||
}
|
||||
|
||||
//绘制头像
|
||||
function DrawFaceAni(obj)
|
||||
{
|
||||
T_DrawStayAni(obj, "common/anton/face/" + PlayerJob + "/" + (PlayerJobEx % 16) + ".ani", X, Y, 0, "安图恩头像编号" + PlayerName);
|
||||
//如果是攻坚队长主控
|
||||
if(CaptainControl && !CaptainBool)
|
||||
{
|
||||
KickoutPlayerButtonObj = AntonButtonPro(obj, "AntonPartyKickoutButton" + PlayerName.tostring(), X - 9, Y - 10, "common/anton/new/newnull.ani", 38, 39, 0);
|
||||
KickoutPlayerButtonObj.SetRectEnble(true, "AntonPartyKickoutButtonr" + PlayerName.tostring(), X - 9, Y - 10, "common/anton/new/newfunc.ani", 0);
|
||||
KickoutPlayerButtonObj.Show();
|
||||
|
||||
if(KickoutPlayerButtonObj.isLBActive())
|
||||
{
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
local AntonKickoutPartyPlayer = Json_STL("AntonKickoutPartyPlayer");
|
||||
AntonKickoutPartyPlayer.Put("op", 1015);
|
||||
AntonKickoutPartyPlayer.Put("TCID", CID);
|
||||
local str = AntonKickoutPartyPlayer.GetString();
|
||||
L_sq_SendPackType(130);
|
||||
L_sq_SendPackWChar(str);
|
||||
L_sq_SendPack();
|
||||
AntonKickoutPartyPlayer.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//绘制名字
|
||||
function DrawPlayerName(obj)
|
||||
{
|
||||
L_Code_STL(PlayerName.tostring(), X + 40, Y - 1, 0xFF4990aa, 1);
|
||||
}
|
||||
|
||||
//绘制等级
|
||||
function DrawPlayerLevel(obj)
|
||||
{
|
||||
L_Code_STL("Lv." + PlayerLevel, X + 40, Y + 17, 0xFF29708a, 1);
|
||||
}
|
||||
|
||||
//绘制职业名字
|
||||
function DrawPlayerGrowTypeName(obj)
|
||||
{
|
||||
L_Code_STL(PlayerGrowTypeJob, X + 65 + GetOffserFromLen(PlayerLevel.tostring(), 3), Y + 17, 0xFF29708a, 1);
|
||||
}
|
||||
|
||||
//绘制队伍图标
|
||||
function DrawPlayerPartyType(obj)
|
||||
{
|
||||
if(CaptainBool == true)
|
||||
{
|
||||
T_DrawStayAni(obj, "common/anton/partytype.ani", X + 133, Y - 1, 0, "安图恩队伍编号队长");
|
||||
}
|
||||
else T_DrawStayAni(obj, "common/anton/partytype.ani", X + 133, Y - 1, PartyID + 1, "安图恩队伍编号" + PartyID);
|
||||
}
|
||||
|
||||
//绘制材料准备情况
|
||||
function DrawPlayerMaterial(obj)
|
||||
{
|
||||
T_DrawStayAni(obj, "common/anton/material.ani", X + 157, Y - 1, Material.tointeger(), "安图恩材料准备情况" + Material.tostring());
|
||||
}
|
||||
|
||||
//绘制交互功能按钮
|
||||
function DrawPlayerFunc(obj)
|
||||
{
|
||||
//绘制查看信息按钮
|
||||
{
|
||||
if(!CheckPlayerInfoButtonObj)
|
||||
{
|
||||
CheckPlayerInfoButtonObj = AntonButtonPro(obj, "AntonCheckPlayerInfoButton", X + 153, Y + 12, "common/anton/new/newfunc.ani", 16, 16, 1);
|
||||
CheckPlayerInfoButtonObj.SetRectEnble(true, "AntonCheckPlayerInfoButtonr", X + 153, Y + 12, "common/anton/new/newfunc.ani", 2);
|
||||
CheckPlayerInfoButtonObj.SetCustomClickEnble(true, "AntonCheckPlayerInfoButtonr", X + 153, Y + 13, "common/anton/new/newfunc.ani", 2);
|
||||
}
|
||||
CheckPlayerInfoButtonObj.Show();
|
||||
if(CheckPlayerInfoButtonObj.isLBActive())
|
||||
{
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
L_sq_SendPackType(8);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(3);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
}
|
||||
|
||||
//绘制交易按钮
|
||||
{
|
||||
if(!TradingPlayerButtonObj)
|
||||
{
|
||||
TradingPlayerButtonObj = AntonButtonPro(obj, "AntonTradingPlayerButton", X + 171, Y + 12, "common/anton/new/newfunc.ani", 16, 16, 3);
|
||||
TradingPlayerButtonObj.SetRectEnble(true, "AntonTradingPlayerButtonr", X + 171, Y + 12, "common/anton/new/newfunc.ani", 4);
|
||||
TradingPlayerButtonObj.SetCustomClickEnble(true, "AntonTradingPlayerButtonr", X + 171, Y + 13, "common/anton/new/newfunc.ani", 4);
|
||||
}
|
||||
TradingPlayerButtonObj.Show();
|
||||
if(TradingPlayerButtonObj.isLBActive())
|
||||
{
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
L_sq_SendPackType(10);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(1);
|
||||
L_sq_SendPackDWord(22053);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
}
|
||||
|
||||
//绘制组队按钮
|
||||
{
|
||||
if(!PartyFuncButtonObj)
|
||||
{
|
||||
PartyFuncButtonObj = AntonButtonPro(obj, "AntonPartyFuncButton", X + 189, Y + 12, "common/anton/new/newfunc.ani", 16, 16, 5);
|
||||
PartyFuncButtonObj.SetRectEnble(true, "AntonPartyFuncButtonr", X + 189, Y + 12, "common/anton/new/newfunc.ani", 6);
|
||||
PartyFuncButtonObj.SetCustomClickEnble(true, "AntonPartyFuncButtonr", X + 189, Y + 13, "common/anton/new/newfunc.ani", 6);
|
||||
}
|
||||
PartyFuncButtonObj.Show();
|
||||
if(PartyFuncButtonObj.isLBActive())
|
||||
{
|
||||
obj.sq_PlaySound("CLICK_BUTTON1");
|
||||
L_sq_SendPackType(10);
|
||||
L_sq_SendPackWord(PlayerSession);
|
||||
L_sq_SendPackByte(0);
|
||||
L_sq_SendPackDWord(1);
|
||||
L_sq_SendPackWord(0);
|
||||
L_sq_SendPack();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Show(obj)
|
||||
{
|
||||
//绘制头像
|
||||
DrawFaceAni(obj);
|
||||
|
||||
//绘制名字
|
||||
DrawPlayerName(obj);
|
||||
|
||||
//绘制等级
|
||||
DrawPlayerLevel(obj);
|
||||
|
||||
//绘制职业名字
|
||||
DrawPlayerGrowTypeName(obj);
|
||||
|
||||
//绘制队伍图标
|
||||
DrawPlayerPartyType(obj);
|
||||
|
||||
//绘制材料准备情况
|
||||
DrawPlayerMaterial(obj);
|
||||
|
||||
//绘制交互功能按钮
|
||||
DrawPlayerFunc(obj);
|
||||
}
|
||||
|
||||
function Run(obj)
|
||||
{
|
||||
Show(obj);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user