-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEventHandlers.cs
More file actions
50 lines (48 loc) · 1.9 KB
/
EventHandlers.cs
File metadata and controls
50 lines (48 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CustomPlayerEffects;
using Exiled.API.Enums;
using Exiled.API.Features;
using Exiled.CustomRoles.API;
using Exiled.CustomRoles.API.Features;
using Exiled.Events.EventArgs.Player;
using PlayerRoles;
using MEC;
using Exiled.Events.Handlers;
namespace SCPSpeedBoost
{
// Event Handler class where all the events that are called are stored
public static class EventHandlers
{
public static void ChangingRole(ChangingRoleEventArgs ev)
{
switch (ev.NewRole)
{
case RoleTypeId.Scp173:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP173Boost));
break;
case RoleTypeId.Scp096:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP096Boost));
break;
case RoleTypeId.Scp106:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP106Boost));
break;
case RoleTypeId.Scp939:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP939Boost));
break;
case RoleTypeId.Scp049:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP049Boost));
break;
case RoleTypeId.Scp0492:
Timing.CallDelayed(2f, () => Methods.AddEffect(ev.Player, Plugin.plugin.Config.SCP0492Boost));
break;
case RoleTypeId.Spectator:
ev.Player.DisableEffect(EffectType.MovementBoost);
break;
}
}
}
}