This repository was archived by the owner on Apr 21, 2024. It is now read-only.
File tree 1 file changed +2
-13
lines changed
1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ namespace Splotch.Event.AbilityEvents
151
151
/// <summary>
152
152
/// A class that should be extended by any ability-related events
153
153
/// </summary>
154
- public abstract class AbilityEvent : Event , Cancellable
154
+ public abstract class AbilityEvent : GameEvent , Cancellable
155
155
{
156
156
public bool Cancelled { get ; set ; } = false ;
157
157
@@ -240,15 +240,10 @@ public abstract class PlayerEvent : GameEvent
240
240
/// </summary>
241
241
/// <returns></returns>
242
242
public abstract Player GetPlayer ( ) ;
243
- public override GameSessionHandler GetGameSessionHandler ( )
244
- {
245
- FieldInfo selfRefField = typeof ( GameSessionHandler ) . GetField ( "selfRef" , BindingFlags . Static | BindingFlags . NonPublic ) ;
246
- return selfRefField . GetValue ( null ) as GameSessionHandler ;
247
- }
248
243
249
244
public SlimeController GetSlimeController ( )
250
245
{
251
- return GetSlimeControllers ( ) [ GetPlayer ( ) . Id - 1 ] ;
246
+ return Splotch . GetSlimeControllers ( ) [ GetPlayer ( ) . Id - 1 ] ;
252
247
}
253
248
}
254
249
@@ -335,11 +330,5 @@ public abstract class GameEvent : Event, Cancellable
335
330
{
336
331
public bool Cancelled { get ; set ; } = false ;
337
332
338
- public abstract GameSessionHandler GetGameSessionHandler ( ) ;
339
- public SlimeController [ ] GetSlimeControllers ( )
340
- {
341
- FieldInfo slimeControllersField = typeof ( GameSessionHandler ) . GetField ( "slimeControllers" , BindingFlags . Instance | BindingFlags . NonPublic ) ;
342
- return slimeControllersField . GetValue ( GetGameSessionHandler ( ) ) as SlimeController [ ] ;
343
- }
344
333
}
345
334
}
You can’t perform that action at this time.
0 commit comments