File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -88,11 +88,11 @@ void onSelAvatarUI()
8888 else
8989 {
9090 info ( "Please wait...(请稍后...)" ) ;
91- Account account = ( Account ) KBEngineApp . app . player ( ) ;
92- if ( account != null )
91+
92+ if ( ui_avatarList != null && ui_avatarList . Count > 0 )
9393 {
9494 Dictionary < string , object > avatarinfo = ui_avatarList [ selAvatarDBID ] ;
95- account . reqRemoveAvatar ( ( string ) avatarinfo [ "name" ] ) ;
95+ KBEngine . Event . fireIn ( "reqRemoveAvatar" , ( string ) avatarinfo [ "name" ] ) ;
9696 }
9797 }
9898 }
@@ -111,10 +111,8 @@ void onSelAvatarUI()
111111 else
112112 {
113113 info ( "Please wait...(请稍后...)" ) ;
114- Account account = ( Account ) KBEngineApp . app . player ( ) ;
115- if ( account != null )
116- account . selectAvatarGame ( selAvatarDBID ) ;
117-
114+
115+ KBEngine . Event . fireIn ( "selectAvatarGame" , selAvatarDBID ) ;
118116 Application . LoadLevel ( "world" ) ;
119117 ui_state = 2 ;
120118 }
@@ -127,8 +125,7 @@ void onSelAvatarUI()
127125 if ( stringAvatarName . Length > 1 )
128126 {
129127 startCreateAvatar = ! startCreateAvatar ;
130- Account account = ( Account ) KBEngineApp . app . player ( ) ;
131- account . reqCreateAvatar ( 1 , stringAvatarName ) ;
128+ KBEngine . Event . fireIn ( "reqCreateAvatar" , 1 , stringAvatarName ) ;
132129 }
133130 else
134131 {
You can’t perform that action at this time.
0 commit comments