Ejemplo n.º 1
0
 public void Infect()
 {
     if (Target.IsAlive)
     {
         try
         {
             InfectingEventArgs infectingArgs = new InfectingEventArgs(Attacker, Target);
             Infecting?.Invoke(infectingArgs);
             if (infectingArgs.IsAllowed)
             {
                 Target.SetRole(RoleType.Scp0492, true, false);
             }
         } catch (Exception e)
         {
             Log.Error($"InfectingEvent Error Thrown: {e}");
         }
         try
         {
             InfectedEventArgs infectedArgs = new InfectedEventArgs(Attacker, Target);
             Infected?.Invoke(infectedArgs);
         } catch (Exception e)
         {
             Log.Error($"InfectedEvent Error Thrown: {e}");
         }
     }
 }