Skip to content

Commit

Permalink
RespawningTeam Fix Index
Browse files Browse the repository at this point in the history
  • Loading branch information
louis1706 committed Dec 26, 2024
1 parent e3c7be2 commit ec8df26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions EXILED/Exiled.Events/Patches/Events/Server/RespawningTeam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace Exiled.Events.Patches.Events.Server
using Exiled.Events.Handlers;
using HarmonyLib;
using PlayerRoles;
using Respawning.NamingRules;
using Respawning.Waves;

using static HarmonyLib.AccessTools;
Expand All @@ -37,8 +38,8 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
{
List<CodeInstruction> newInstructions = ListPool<CodeInstruction>.Pool.Get(instructions);

int offset = 1;
int index = newInstructions.FindIndex(instruction => instruction.Calls(Method(typeof(SpawnableWaveBase), nameof(SpawnableWaveBase.PopulateQueue)))) + offset;
int offset = -2;
int index = newInstructions.FindIndex(instruction => instruction.Calls(Method(typeof(NamingRulesManager), nameof(NamingRulesManager.TryGetNamingRule)))) + offset;

LocalBuilder ev = generator.DeclareLocal(typeof(RespawningTeamEventArgs));

Expand Down

0 comments on commit ec8df26

Please sign in to comment.