Properly remove all buffs in PlayerData.RestoreCharacter
This was previously using the constant `22` directly, instead of `Player.maxBuffs`, which is now `44`. This theoretically allowed players to smuggle buffs on to servers with SSC enabled, by using buff indexes past `22`.
This commit is contained in:
parent
5a72121200
commit
ad9c9cccce
1 changed files with 1 additions and 1 deletions
|
|
@ -673,7 +673,7 @@ namespace TShockAPI
|
|||
NetMessage.SendData(42, player.Index, -1, NetworkText.Empty, player.Index, 0f, 0f, 0f, 0);
|
||||
NetMessage.SendData(16, player.Index, -1, NetworkText.Empty, player.Index, 0f, 0f, 0f, 0);
|
||||
|
||||
for (int k = 0; k < 22; k++)
|
||||
for (int k = 0; k < Player.maxBuffs; k++)
|
||||
{
|
||||
player.TPlayer.buffType[k] = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue