fix Tests Reference; restore IgnoreSSCPackets = false in PlayerData

This commit is contained in:
xuyuwtu 2026-01-29 10:29:43 +08:00
parent 1d2bfbe62f
commit 7702d3b00b
2 changed files with 12 additions and 3 deletions

View file

@ -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);
}
}
}
}

View file

@ -21,6 +21,12 @@
</ItemGroup>
<ItemGroup>
<Reference Include="OTAPI">
<HintPath>..\lib\OTAPI.dll</HintPath>
</Reference>
<Reference Include="OTAPI.Runtime">
<HintPath>..\lib\OTAPI.Runtime.dll</HintPath>
</Reference>
<ProjectReference Include="..\TShockAPI\TShockAPI.csproj" />
<ProjectReference Include="..\TShockLauncher\TShockLauncher.csproj" />
</ItemGroup>