Add Torch God's Favor to SSC

Closes #2031
This commit is contained in:
Stealownz 2020-11-01 22:47:51 +08:00
parent 25e37947f7
commit 8969ce4a94
3 changed files with 25 additions and 9 deletions

View file

@ -49,6 +49,7 @@ namespace TShockAPI
public Color? eyeColor;
public bool[] hideVisuals;
public int questsCompleted;
public int unlockedBiomeTorches;
public PlayerData(TSPlayer player)
{
@ -114,6 +115,7 @@ namespace TShockAPI
this.skinColor = player.TPlayer.skinColor;
this.eyeColor = player.TPlayer.eyeColor;
this.questsCompleted = player.TPlayer.anglerQuestsFinished;
this.unlockedBiomeTorches = player.TPlayer.unlockedBiomeTorches ? 1 : 0;
Item[] inventory = player.TPlayer.inventory;
Item[] armor = player.TPlayer.armor;
@ -235,6 +237,12 @@ namespace TShockAPI
else
player.TPlayer.hideVisibleAccessory = new bool[player.TPlayer.hideVisibleAccessory.Length];
if (this.unlockedBiomeTorches != null)
{
player.TPlayer.unlockedBiomeTorches = this.unlockedBiomeTorches == 1 ? true : false;
player.TPlayer.UsingBiomeTorches = this.unlockedBiomeTorches == 1 ? true : false;
}
for (int i = 0; i < NetItem.MaxInventory; i++)
{
if (i < NetItem.InventoryIndex.Item2)