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. 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) ## TShock 4.4.0 (Pre-release 1)
* Added confused debuff to Bouncer for confusion applied from Brain of Confusion * Added confused debuff to Bouncer for confusion applied from Brain of Confusion
* API: Added return in OnNameCollision if hook has been handled. (@Patrikkk) * API: Added return in OnNameCollision if hook has been handled. (@Patrikkk)

View file

@ -1402,7 +1402,8 @@ namespace TShockAPI
if (detectedNPCBuffTimeCheat) if (detectedNPCBuffTimeCheat)
{ {
args.Player.Kick("Added buff to NPC abnormally.", true);
args.Player.Kick($"Added buff to NPC abnormally.", true);
args.Handled = true; args.Handled = true;
} }
} }
@ -1868,7 +1869,7 @@ namespace TShockAPI
} }
} }
// These time values are references from Projectile.cs, at npc.AddBuff() calls.
private static Dictionary<int, short> NPCAddBuffTimeMax = new Dictionary<int, short>() private static Dictionary<int, short> NPCAddBuffTimeMax = new Dictionary<int, short>()
{ {
{ BuffID.Poisoned, 3600 }, { BuffID.Poisoned, 3600 },
@ -1891,7 +1892,16 @@ namespace TShockAPI
{ BuffID.BetsysCurse, 600 }, { BuffID.BetsysCurse, 600 },
{ BuffID.Oiled, 540 }, { BuffID.Oiled, 540 },
{ BuffID.Confused, 450 }, // Brain of Confusion Internal Item ID: 3223 { 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> /// <summary>