Bug fix health stat storage in server side inventory mode.
This commit is contained in:
parent
11473493e4
commit
0cdafc0e81
2 changed files with 12 additions and 0 deletions
|
|
@ -161,6 +161,11 @@ namespace TShockAPI
|
||||||
args.Player.IgnoreActionsForCheating = true;
|
args.Player.IgnoreActionsForCheating = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args.Player.IsLoggedIn)
|
||||||
|
{
|
||||||
|
args.Player.PlayerData.maxHealth = max;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -175,6 +180,11 @@ namespace TShockAPI
|
||||||
args.Player.IgnoreActionsForCheating = true;
|
args.Player.IgnoreActionsForCheating = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args.Player.IsLoggedIn)
|
||||||
|
{
|
||||||
|
args.Player.PlayerData.maxMana = max;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -478,6 +478,8 @@ namespace TShockAPI
|
||||||
|
|
||||||
public void CopyInventory(TSPlayer player)
|
public void CopyInventory(TSPlayer player)
|
||||||
{
|
{
|
||||||
|
this.maxHealth = player.TPlayer.statLifeMax;
|
||||||
|
this.maxMana = player.TPlayer.statManaMax;
|
||||||
Item[] inventory = player.TPlayer.inventory;
|
Item[] inventory = player.TPlayer.inventory;
|
||||||
Item[] armor = player.TPlayer.armor;
|
Item[] armor = player.TPlayer.armor;
|
||||||
for (int i = 0; i < NetItem.maxNetInventory; i++)
|
for (int i = 0; i < NetItem.maxNetInventory; i++)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue