Skip to content

Commit 5aefdd8

Browse files
authored
Update GetDataHandlers.cs
1 parent c425ff0 commit 5aefdd8

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

TShockAPI/GetDataHandlers.cs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,16 +2700,6 @@ private static bool HandleSpawn(GetDataHandlerArgs args)
27002700
short numberOfDeathsPVE = args.Data.ReadInt16();
27012701
short numberOfDeathsPVP = args.Data.ReadInt16();
27022702
PlayerSpawnContext context = (PlayerSpawnContext)args.Data.ReadByte();
2703-
// When the player spawn into world, the numberOfDeathsPVE and numberOfDeathsPVP is not correct on the SSC Server.
2704-
// Send the data agrain fixed them.
2705-
if (context == PlayerSpawnContext.SpawningIntoWorld && args.Player.IsLoggedIn )
2706-
{
2707-
if(numberOfDeathsPVE != args.TPlayer.numberOfDeathsPVE || numberOfDeathsPVP != args.TPlayer.numberOfDeathsPVP)
2708-
{
2709-
args.Player.Spawn(PlayerSpawnContext.SpawningIntoWorld);
2710-
return true;
2711-
}
2712-
}
27132703
if (OnPlayerSpawn(args.Player, args.Data, player, spawnx, spawny, respawnTimer, numberOfDeathsPVE, numberOfDeathsPVP, context))
27142704
return true;
27152705

@@ -2746,6 +2736,17 @@ private static bool HandleSpawn(GetDataHandlerArgs args)
27462736
args.Player.Dead = true;
27472737
else
27482738
args.Player.Dead = false;
2739+
2740+
// When the player spawn into world, the numberOfDeathsPVE and numberOfDeathsPVP is not correct on the SSC Server.
2741+
// Send the data agrain fixed them.
2742+
if (context == PlayerSpawnContext.SpawningIntoWorld && args.Player.IsLoggedIn )
2743+
{
2744+
if(numberOfDeathsPVE != args.TPlayer.numberOfDeathsPVE || numberOfDeathsPVP != args.TPlayer.numberOfDeathsPVP)
2745+
{
2746+
args.Player.Spawn(PlayerSpawnContext.SpawningIntoWorld);
2747+
return true;
2748+
}
2749+
}
27492750
return false;
27502751
}
27512752

0 commit comments

Comments
 (0)