106 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			106 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
|  | /* | ||
|  | 文件名:Rindro_Fiendwar_CreateParty.nut | ||
|  | 路径:Plugins/New_Fiendwar/Rindro_Fiendwar_CreateParty.nut | ||
|  | 创建日期:2024-07-15	20:28 | ||
|  | 文件用途:超时空创建队伍窗口 | ||
|  | */ | ||
|  | 
 | ||
|  | 
 | ||
|  | class Rindro_FiendwarCreatePartyC extends LenheartNewUI_Windows { | ||
|  |     //调试模式 | ||
|  |     DeBugMode = false; | ||
|  | 
 | ||
|  |     X = 290; | ||
|  |     Y = 220; | ||
|  |     //输入框 | ||
|  |     InputObject = null; | ||
|  | 
 | ||
|  |     //时装 帽子 头部 脸 上衣 下装 鞋子  胸部  腰部  皮肤 光环 | ||
|  |     AvatarInfoIdx = [0x3038, 0x3010, 0x3014, 0x3018, 0x301c, 0x3020, 0x3024, 0x3028, 0x302c, 0x3030, 0x3034]; | ||
|  | 
 | ||
|  | 
 | ||
|  |     constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) { | ||
|  |         Childrens = []; | ||
|  | 
 | ||
|  |         //关闭按钮 | ||
|  |         local CloseButton = LenheartNewUI_BaseButton(266, 2, 11, 12, "interface/lenheartwindowcommon.img", 276); | ||
|  |         CloseButton.OnClick = function() { | ||
|  |             DestroyWindow(); | ||
|  |         }.bindenv(this); | ||
|  |         AddChild(CloseButton); | ||
|  | 
 | ||
|  |         local OkButton = LenheartNewUI_ButtonText(78, 124, 5, "确定"); | ||
|  |         OkButton.SetTextOffset(0, 1); | ||
|  |         OkButton.OnClick = function() { | ||
|  | 
 | ||
|  |             //如果队伍名输出框的文字长度大于0就创建队伍 创建时告诉服务端自己的 头发 帽子 脸部 皮肤 | ||
|  |             if (InputObject.str.len() > 0) { | ||
|  | 
 | ||
|  |                 local C_Object = L_sq_RA(0x1ab7cdc); | ||
|  |                 local avataritemsbuf = []; | ||
|  |                 foreach(offset in AvatarInfoIdx) { | ||
|  |                     local AvatarEquiAddress = L_sq_RA(C_Object + offset); | ||
|  |                     if (AvatarEquiAddress >= 0x400000) { | ||
|  |                         local Ab = []; | ||
|  |                         local NormalIndex = L_sq_RA(AvatarEquiAddress + 0x1c); | ||
|  |                         local ExIndex = L_sq_RA(AvatarEquiAddress + 0x13E0); | ||
|  |                         Ab.append(NormalIndex); | ||
|  |                         Ab.append(ExIndex); | ||
|  |                         avataritemsbuf.append(Ab); | ||
|  |                     } else { | ||
|  |                         local Ab = []; | ||
|  |                         Ab.append(0); | ||
|  |                         Ab.append(0); | ||
|  |                         avataritemsbuf.append(Ab); | ||
|  |                     } | ||
|  |                 } | ||
|  | 
 | ||
|  |                 local T = { | ||
|  |                     op = 20063001, | ||
|  |                     teamsName = InputObject.str, | ||
|  |                     items = avataritemsbuf, | ||
|  |                 } | ||
|  |                 SendPackEx(T); | ||
|  |                 DestroyWindow(); | ||
|  |             } | ||
|  |         }.bindenv(this); | ||
|  |         AddChild(OkButton); | ||
|  | 
 | ||
|  |         local CloseButton = LenheartNewUI_ButtonText(144, 124, 5, "取消"); | ||
|  |         CloseButton.SetTextOffset(0, 1); | ||
|  |         CloseButton.OnClick = function() { | ||
|  |             DestroyWindow(); | ||
|  |         }.bindenv(this); | ||
|  |         AddChild(CloseButton); | ||
|  | 
 | ||
|  |         InputObject = LenheartNewUI_BaseInput(62, 68, 152, 20); | ||
|  |         AddChild(InputObject); | ||
|  | 
 | ||
|  |         LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH); | ||
|  |     } | ||
|  | 
 | ||
|  |     //绘制主界面 | ||
|  |     function DrawMain(obj) { | ||
|  |         L_sq_DrawWindow(X, Y + 10, 260, 120, "interface/lenheartwindowcommon.img", 213, 12, 2, 13, 2); | ||
|  |         L_sq_DrawWindow(X, Y + 10, 260, 120, "interface/lenheartwindowcommon.img", 213, 12, 2, 13, 2); | ||
|  |         L_sq_DrawImg("interface2/gcontents/180621_fiendwar/raid/raid_areaimg_fiend.img", 0, X + 11, Y + 21); | ||
|  | 
 | ||
|  |         L_sq_DrawImg("hud/fiendwarl.img", 9, X - 2, Y + 2); | ||
|  |         L_sq_DrawCode("创建攻坚队", X + 112, Y + 3, sq_RGBA(179, 169, 135, 255), 0, 1); | ||
|  | 
 | ||
|  |         L_sq_DrawImg("hud/fiendwarl.img", 10, X + 72, Y + 44); | ||
|  | 
 | ||
|  |     } | ||
|  | 
 | ||
|  | 
 | ||
|  |     function Show(obj) { | ||
|  |         DrawMain(obj); | ||
|  |         LenheartNewUI_Windows.Show(obj); | ||
|  |     } | ||
|  | 
 | ||
|  |     //逻辑入口 | ||
|  |     function Proc(obj) { | ||
|  |         LenheartNewUI_Windows.SyncPos(X, Y); | ||
|  |     } | ||
|  | 
 | ||
|  | } |