Merge branch 'general-devel' into all-contributors/add-Patrikkk

This commit is contained in:
Lucas Nicodemus 2020-05-18 17:55:45 -07:00 committed by GitHub
commit 541a3ff658
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 5 deletions

View file

@ -2,6 +2,10 @@
This is the rolling changelog for TShock for Terraria. Use past tense when adding new entries; sign your name off when you add or change something. This should primarily be things like user changes, not necessarily codebase changes unless it's really relevant or large.
## Upcoming changes
* Fixed NPC buff anticheat issue conflicting with Terraria gameplay changes (whips) (@Patrikkk)
## TShock 4.4.0 (Pre-release 1)
* Added confused debuff to Bouncer for confusion applied from Brain of Confusion
* API: Added return in OnNameCollision if hook has been handled. (@Patrikkk)

View file

@ -1402,7 +1402,8 @@ namespace TShockAPI
if (detectedNPCBuffTimeCheat)
{
args.Player.Kick("Added buff to NPC abnormally.", true);
args.Player.Kick($"Added buff to NPC abnormally.", true);
args.Handled = true;
}
}
@ -1867,8 +1868,8 @@ namespace TShockAPI
}
}
}
// These time values are references from Projectile.cs, at npc.AddBuff() calls.
private static Dictionary<int, short> NPCAddBuffTimeMax = new Dictionary<int, short>()
{
{ BuffID.Poisoned, 3600 },
@ -1891,9 +1892,18 @@ namespace TShockAPI
{ BuffID.BetsysCurse, 600 },
{ BuffID.Oiled, 540 },
{ BuffID.Confused, 450 }, // Brain of Confusion Internal Item ID: 3223
{ BuffID.Daybreak, 300 } // Solar Eruption Item ID: 3473, Daybreak Item ID: 3543
{ BuffID.Daybreak, 300 }, // Solar Eruption Item ID: 3473, Daybreak Item ID: 3543
{ BuffID.BlandWhipEnemyDebuff, 240 },
{ BuffID.SwordWhipNPCDebuff, 240 },
{ BuffID.ScytheWhipEnemyDebuff, 240 },
{ BuffID.FlameWhipEnemyDebuff, 240 },
{ BuffID.ThornWhipNPCDebuff, 240 },
{ BuffID.RainbowWhipNPCDebuff, 240 },
{ BuffID.MaceWhipNPCDebuff, 240 },
{ BuffID.GelBalloonBuff, 1800 }
};
/// <summary>
/// Tile IDs that can be oriented:
/// Cannon,