Skip to content

Commit

Permalink
Fix CursedInferno buff kick
Browse files Browse the repository at this point in the history
  • Loading branch information
sgkoishi committed Feb 26, 2024
1 parent 44d1dbb commit cf98ba8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Core/Backport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ private void Backport_Inferno()
{
// Reported via Discord https://discord.com/channels/479657350043664384/482065271297671168/1061908947151372408
var bouncer = Utils.TShockType("Bouncer");
if (bouncer?.GetField("NPCAddBuffTimeMax", _bfany)?.GetValue(null) is Dictionary<int, int> npcAddBuffTimeMax)
if (bouncer?.GetField("NPCAddBuffTimeMax", _bfany)?.GetValue(null) is Dictionary<int, short> npcAddBuffTimeMax)
{
if (npcAddBuffTimeMax[Terraria.ID.BuffID.CursedInferno] == 420)
{
Expand Down
2 changes: 1 addition & 1 deletion Core/Enhancements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private string Detour_RealIP_IPv6Support(TShockAPI.Utils _, string mess)
{
return !System.Net.IPEndPoint.TryParse(mess, out var ip)
? "127.0.0.0"
: ip.Address.IsIPv4MappedToIPv6
: this.config.Enhancements.Value.IPv6DualStack && ip.Address.IsIPv4MappedToIPv6
? ip.Address.MapToIPv4().ToString()
: ip.Address.ToString();
}
Expand Down
2 changes: 1 addition & 1 deletion Core/FirstChance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private void FirstChanceExceptionHandler(object? sender, FirstChanceExceptionEve
try
{
this.inFirstChance.Value++;
var v = $"{args.Exception.Message} @ {args.Exception.StackTrace}";
var v = $"{args.Exception.Message}{Environment.NewLine}{args.Exception.StackTrace}";
if (this.exceptions.Add(v))
{
Utils.ShowError($"New First Chance: {v}");
Expand Down

0 comments on commit cf98ba8

Please sign in to comment.