@@ -119,9 +119,11 @@ private void Replace_Executed(PersonAccount person, object arg)
119
119
var player = person as PlayerAccount ;
120
120
121
121
string index ;
122
+
122
123
if ( player != null )
123
124
{
124
125
var playerIndex = ClientData . Players . IndexOf ( player ) ;
126
+
125
127
if ( playerIndex == - 1 )
126
128
{
127
129
return ;
@@ -152,6 +154,7 @@ private void Free_Executed(object arg)
152
154
if ( player != null )
153
155
{
154
156
var index = ClientData . Players . IndexOf ( player ) ;
157
+
155
158
if ( index < 0 || index >= ClientData . Players . Count )
156
159
{
157
160
AddLog ( $ "Wrong index: { index } " + Environment . NewLine ) ;
@@ -161,7 +164,11 @@ private void Free_Executed(object arg)
161
164
indexString = index . ToString ( ) ;
162
165
}
163
166
164
- _viewerActions . SendMessage ( Messages . Config , MessageParams . Config_Free , player != null ? Constants . Player : Constants . Showman , indexString ) ;
167
+ _viewerActions . SendMessage (
168
+ Messages . Config ,
169
+ MessageParams . Config_Free ,
170
+ player != null ? Constants . Player : Constants . Showman ,
171
+ indexString ) ;
165
172
}
166
173
167
174
private void Delete_Executed ( object arg )
@@ -217,7 +224,9 @@ private void Kick_Executed(object arg)
217
224
private void Ban_Executed ( object arg )
218
225
{
219
226
if ( arg is not ViewerAccount person )
227
+ {
220
228
return ;
229
+ }
221
230
222
231
if ( person == ClientData . Me )
223
232
{
@@ -245,6 +254,7 @@ private void DeleteTable_Executed(object arg)
245
254
var player = ClientData . Players [ i ] ;
246
255
player . CanBeSelected = ClientData . Stage == GameStage . Before || ! player . IsConnected || ! player . IsHuman ;
247
256
int num = i ;
257
+
248
258
player . SelectionCallback = p =>
249
259
{
250
260
_viewerActions . SendMessageWithArgs ( Messages . Config , MessageParams . Config_DeleteTable , num ) ;
@@ -716,6 +726,13 @@ await _client.Server.ConnectionsLock.WithLockAsync(() =>
716
726
_logic . SetAtom ( mparams ) ;
717
727
break ;
718
728
729
+ case Messages . Atom_Hint :
730
+ if ( mparams . Length > 1 )
731
+ {
732
+ _logic . OnAtomHint ( mparams [ 1 ] ) ;
733
+ }
734
+ break ;
735
+
719
736
case Messages . Atom_Second :
720
737
_logic . SetSecondAtom ( mparams ) ;
721
738
break ;
0 commit comments