diff --git a/TShockAPI/PlayerData.cs b/TShockAPI/PlayerData.cs index 5f4cc63b..e88303f2 100644 --- a/TShockAPI/PlayerData.cs +++ b/TShockAPI/PlayerData.cs @@ -614,13 +614,16 @@ namespace TShockAPI } } + // 别删了,ItemOwner那边应该是依赖于原版的一个行为会发包恢复,现在好像没了,先用这个 + player.IgnoreSSCPackets = false; } - public static void TrySendingItemArray(int plr, Item[] array, int slotStartIndex,int remoteClient = -1, int ignoreClient = -1) + private static void TrySendingItemArray(int plr, Item[] array, int slotStartIndex,int remoteClient = -1, int ignoreClient = -1) { - for (int index = 0; index < array.Length; ++index) - NetMessage.TrySendData(5, number: plr, number2: (float) (slotStartIndex + index),remoteClient: remoteClient, ignoreClient: ignoreClient); + { + NetMessage.TrySendData(5, number: plr, number2: slotStartIndex + index, remoteClient: remoteClient, ignoreClient: ignoreClient); + } } } } diff --git a/TShockLauncher.Tests/TShockLauncher.Tests.csproj b/TShockLauncher.Tests/TShockLauncher.Tests.csproj index 9be3968a..2192df81 100644 --- a/TShockLauncher.Tests/TShockLauncher.Tests.csproj +++ b/TShockLauncher.Tests/TShockLauncher.Tests.csproj @@ -21,6 +21,12 @@ + + ..\lib\OTAPI.dll + + + ..\lib\OTAPI.Runtime.dll +