Skip to content

Commit 143d3b6

Browse files
committed
Merge branch 'upcoming' into upcoming-nuget-release
2 parents 3962ce3 + a05a7d7 commit 143d3b6

3 files changed

Lines changed: 3 additions & 10 deletions

File tree

OTAPI.Patcher/OTAPI.Patcher.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net9.0</TargetFramework>
6-
<Version>3.3.8</Version>
6+
<Version>3.3.9</Version>
77
<PreserveCompilationContext>true</PreserveCompilationContext>
88
<RuntimeIdentifiers>win;osx;linux;</RuntimeIdentifiers>
99
<Nullable>enable</Nullable>

OTAPI.Scripts/Mods/HookClientSendBytes.Server.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void HookClientSendBytes(MonoModder modder)
6060
}
6161
}
6262

63-
#if TerrariaServer_1448_OrAbove
63+
#if TerrariaServer_1450_OrAbove
6464
var SendPacket = modder.GetILCursor(() => Terraria.NetMessage.SendPacket(default, default));
6565
// find each AsyncSend, replace with OTAPI.Hooks.NetMessage.InvokeSendBytes, and inject arg2 (remoteClient) as well.
6666
while (SendPacket.TryGotoNext(

OTAPI.Scripts/Patches/PatchNpcStrikeArgs.Server.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,9 @@ instr.Previous.Operand is FieldReference fieldReference &&
104104
case "Projectile.Damage":
105105
case "Player.ProcessHitAgainstNPC":
106106
case "NPC.StrikeNPC":
107-
body.GetILProcessor().InsertBefore(instr,
108-
new { OpCodes.Ldarg_0 }
109-
);
110-
break;
111-
112107
case "Projectile.Damage_PVE_Inner":
113-
// find the NPC parameter
114-
var prm = body.Method.Parameters.Single(x => x.ParameterType.FullName == "Terraria.NPC");
115108
body.GetILProcessor().InsertBefore(instr,
116-
new { OpCodes.Ldarg, Operand = prm }
109+
new { OpCodes.Ldarg_0 }
117110
);
118111
break;
119112

0 commit comments

Comments
 (0)