创建角色 包调式
This commit is contained in:
		
							parent
							
								
									11b0a8b3e4
								
							
						
					
					
						commit
						89e51c4123
					
				|  | @ -235,6 +235,8 @@ class _CreateCharacter extends Yosin_Window { | ||||||
| 
 | 
 | ||||||
|     jobIndex = 0; |     jobIndex = 0; | ||||||
| 
 | 
 | ||||||
|  |     NoticeBox = null; | ||||||
|  | 
 | ||||||
|     constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) { |     constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) { | ||||||
|         base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH); |         base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH); | ||||||
| 
 | 
 | ||||||
|  | @ -246,9 +248,12 @@ class _CreateCharacter extends Yosin_Window { | ||||||
| 
 | 
 | ||||||
|         // 创建角色回包 |         // 创建角色回包 | ||||||
|         MySocket.RegisterHandler(4, function(Jso) { |         MySocket.RegisterHandler(4, function(Jso) { | ||||||
|  |             if (NoticeBox) NoticeBox.CloseWindow(); | ||||||
|             if (Jso.type == 0){ |             if (Jso.type == 0){ | ||||||
|                 // 创建成功. |                 // 创建成功. | ||||||
|                 NoticeBox = _Yosin_MessageBox("创建成功."); |                 //关闭创建界面 | ||||||
|  |                 NoticeBox.DestroyWindow(); | ||||||
|  |                 DestroyWindow(); | ||||||
|             }else{ |             }else{ | ||||||
|                 // 创建失败. |                 // 创建失败. | ||||||
|                 NoticeBox = _Yosin_MessageBox("创建失败."); |                 NoticeBox = _Yosin_MessageBox("创建失败."); | ||||||
|  | @ -356,7 +361,7 @@ class _CreateCharacter extends Yosin_Window { | ||||||
|         // 确定 |         // 确定 | ||||||
|         enter.OnClick = function (enterName) { |         enter.OnClick = function (enterName) { | ||||||
|             local jobEnum = getJobEnum(jobIndex); |             local jobEnum = getJobEnum(jobIndex); | ||||||
|             MySocket.Send(9, { |             MySocket.Send(7, { | ||||||
|                 name = enterName, |                 name = enterName, | ||||||
|                 gkb = jobEnum, |                 gkb = jobEnum, | ||||||
|             }) |             }) | ||||||
|  | @ -767,9 +772,6 @@ class _create_Character_enterName extends Yosin_Window { | ||||||
| 
 | 
 | ||||||
|     OnClick = null; |     OnClick = null; | ||||||
| 
 | 
 | ||||||
|     //公告框 |  | ||||||
|     NoticeBox = null; |  | ||||||
| 
 |  | ||||||
|     // 检查过的名称 |     // 检查过的名称 | ||||||
|     checkName = null; |     checkName = null; | ||||||
|     // 当前名称 |     // 当前名称 | ||||||
|  | @ -875,15 +877,15 @@ class _create_Character_enterName extends Yosin_Window { | ||||||
| 
 | 
 | ||||||
|         // 昵称重复检查回包 |         // 昵称重复检查回包 | ||||||
|         MySocket.RegisterHandler(3, function(Jso) { |         MySocket.RegisterHandler(3, function(Jso) { | ||||||
|             if (NoticeBox) NoticeBox.CloseWindow(); |             if (Parent.NoticeBox) Parent.NoticeBox.CloseWindow(); | ||||||
|             if (Jso.type == 0){ |             if (Jso.type == 0){ | ||||||
|                 // 可以使用的ID 确认按钮可以使用. |                 // 可以使用的ID 确认按钮可以使用. | ||||||
|                 NoticeBox = _Yosin_MessageBox("可以使用的ID."); |                 Parent.NoticeBox = _Yosin_MessageBox("可以使用的ID."); | ||||||
|                 checkName = nameInputBox.str; |                 checkName = name; | ||||||
|                 affirmButton.State = 0; |                 affirmButton.State = 0; | ||||||
|             }else{ |             }else{ | ||||||
|                 // 名称重复. |                 // 名称重复. | ||||||
|                 NoticeBox = _Yosin_MessageBox("名称重复."); |                 Parent.NoticeBox = _Yosin_MessageBox("名称重复."); | ||||||
|             } |             } | ||||||
|         }.bindenv(this)); |         }.bindenv(this)); | ||||||
| 
 | 
 | ||||||
|  | @ -895,10 +897,6 @@ class _create_Character_enterName extends Yosin_Window { | ||||||
|         SyncPos(X, Y); |         SyncPos(X, Y); | ||||||
|         base.Proc(Dt); |         base.Proc(Dt); | ||||||
| 
 | 
 | ||||||
|         // if (nameInputBox.str != checkName && affirmButton.State !=  3) { |  | ||||||
|         //     affirmButton.State = 3; |  | ||||||
|         // } |  | ||||||
| 
 |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue