Skip to content

Commit

Permalink
修复
Browse files Browse the repository at this point in the history
  • Loading branch information
YongAn404 committed Aug 26, 2024
1 parent dcb5699 commit d38cc00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Role/Core/CustomRolePlus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ private void OnRestartingRound()
//}


private void OnSpawning(SpawningEventArgs args)
private void OnSpawned(SpawnedEventArgs args)
{
FramePlayer fPlayer = args.Player.ToFPlayer();
if (fPlayer.CustomRolePlus == null
&& IStaetSpawn && (SpawnAttributes.RefreshTeam != RefreshTeamType.Start || (RespawnTeamPlayer.Contains(fPlayer) && SpawnAttributes.StartWave <= RespawnWave))
&& IStaetSpawn && (SpawnAttributes.RefreshTeam != RefreshTeamType.Start && RespawnTeamPlayer.Contains(fPlayer) && SpawnAttributes.StartWave <= RespawnWave)
&& (OldRole == RoleTypeId.None || args.Player.Role.Type == OldRole))
{
TrySpawn(fPlayer);
Expand Down Expand Up @@ -280,7 +280,7 @@ private void OnDying(DyingEventArgs args)
protected override void SubscribeEvents()
{
//Exiled.Events.Handlers.Server.RoundStarted += new CustomEventHandler(OnRoundStarted);
Exiled.Events.Handlers.Player.Spawning += new CustomEventHandler<SpawningEventArgs>(OnSpawning);
Exiled.Events.Handlers.Player.Spawned += new CustomEventHandler<SpawnedEventArgs>(OnSpawned);
Exiled.Events.Handlers.Player.Hurting += new CustomEventHandler<HurtingEventArgs>(OnHurting);
Exiled.Events.Handlers.Server.RestartingRound += new CustomEventHandler(OnRestartingRound);
Exiled.Events.Handlers.Player.DroppingItem += new CustomEventHandler<DroppingItemEventArgs>(OnDroppingItem);
Expand All @@ -299,7 +299,7 @@ protected override void UnsubscribeEvents()
Exiled.Events.Handlers.Player.Hurting -= new CustomEventHandler<HurtingEventArgs>(OnHurting);
Exiled.Events.Handlers.Server.RestartingRound -= new CustomEventHandler(OnRestartingRound);
Exiled.Events.Handlers.Player.DroppingItem -= new CustomEventHandler<DroppingItemEventArgs>(OnDroppingItem);
Exiled.Events.Handlers.Player.Spawning += new CustomEventHandler<SpawningEventArgs>(OnSpawning);
Exiled.Events.Handlers.Player.Spawned += new CustomEventHandler<SpawnedEventArgs>(OnSpawned);
Exiled.Events.Handlers.Player.Dying -= new CustomEventHandler<DyingEventArgs>(OnDying);
base.UnsubscribeEvents();

Expand Down

0 comments on commit d38cc00

Please sign in to comment.