Add initial support for Journey mode in SSC.
This commit is contained in:
parent
cb31997acc
commit
56b695b80b
5 changed files with 161 additions and 1 deletions
|
|
@ -39,6 +39,8 @@ using TShockAPI.Localization;
|
|||
using TShockAPI.Models;
|
||||
using TShockAPI.Models.PlayerUpdate;
|
||||
using TShockAPI.Models.Projectiles;
|
||||
using Terraria.Net;
|
||||
using Terraria.GameContent.NetModules;
|
||||
|
||||
namespace TShockAPI
|
||||
{
|
||||
|
|
@ -3238,6 +3240,20 @@ namespace TShockAPI
|
|||
return true;
|
||||
}
|
||||
}
|
||||
} else if (moduleId == (int)NetModulesTypes.CreativeUnlocksPlayerReport)
|
||||
{
|
||||
var unknownField = args.Data.ReadByte();
|
||||
|
||||
if (unknownField == 0) //this is required or something???
|
||||
{
|
||||
var itemId = args.Data.ReadUInt16();
|
||||
var amount = args.Data.ReadUInt16();
|
||||
|
||||
var totalSacrificed = TShock.ResearchDatastore.SacrificeItem(itemId, amount, args.Player);
|
||||
|
||||
var response = NetCreativeUnlocksModule.SerializeItemSacrifice(itemId, totalSacrificed);
|
||||
NetManager.Instance.Broadcast(response);
|
||||
}
|
||||
}
|
||||
|
||||
// As of 1.4.x.x, this is now used for more things:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue