Only process journey research updates for SSC mode
This commit changes the logic for sending and accepting journey research requests -- only processing those requests in SSC makes sense. This stops sending extra data to clients that may not know what to do with it when it's not relevant (not in both SSC and journey mode). This also stops us from accepting erroneous journey mode NPC spawn rate update requests when journey mode isn't on but SSC is on due to a weird client glitch in 1.4.0.4.
This commit is contained in:
parent
fb418095fe
commit
d1b27d8b7a
2 changed files with 18 additions and 10 deletions
|
|
@ -3237,6 +3237,12 @@ namespace TShockAPI
|
|||
}
|
||||
case CreativePowerTypes.SetSpawnRate:
|
||||
{
|
||||
// This is a monkeypatch because the 1.4.0.4 seemingly at random sends NPC spawn rate changes even outside of journey mode
|
||||
// (with SSC on) -- particles, May 25, 2 Reiwa
|
||||
if (!Main.GameModeInfo.IsJourneyMode)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (!args.Player.HasPermission(Permissions.journey_setspawnrate))
|
||||
{
|
||||
args.Player.SendErrorMessage("You don't have permission to modify the NPC spawn rate of the server!");
|
||||
|
|
@ -3249,7 +3255,7 @@ namespace TShockAPI
|
|||
return true;
|
||||
}
|
||||
}
|
||||
} else if (moduleId == (int)NetModulesTypes.CreativeUnlocksPlayerReport)
|
||||
} else if (moduleId == (int)NetModulesTypes.CreativeUnlocksPlayerReport && Main.GameModeInfo.IsJourneyMode)
|
||||
{
|
||||
var unknownField = args.Data.ReadByte();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue