Fix hardcore deaths by wiping and reseeding the tsCharacter table.
Log to server/logs chat over head.
This commit is contained in:
parent
acdaa2eb05
commit
ddb2afefe9
3 changed files with 33 additions and 3 deletions
|
|
@ -2513,6 +2513,15 @@ namespace TShockAPI
|
|||
args.Player.LastDeath = DateTime.Now;
|
||||
args.Player.Dead = true;
|
||||
|
||||
if (args.TPlayer.difficulty == 2 && TShock.Config.ServerSideCharacter && args.Player.IsLoggedIn)
|
||||
{
|
||||
User user = TShock.Users.GetUserByName(args.Player.UserAccountName);
|
||||
if (TShock.CharacterDB.RemovePlayer(user.ID))
|
||||
{
|
||||
TShock.CharacterDB.SeedInitialData(user);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue