added filter: only check when zones contains towers
This commit is contained in:
parent
2ea9a0161b
commit
42e413012d
1 changed files with 28 additions and 25 deletions
|
|
@ -1005,6 +1005,8 @@ namespace TShockAPI
|
||||||
/// <param name="sender">The object that triggered the event.</param>
|
/// <param name="sender">The object that triggered the event.</param>
|
||||||
/// <param name="args">The packet arguments that the event has.</param>
|
/// <param name="args">The packet arguments that the event has.</param>
|
||||||
internal void OnPlayerZone(object sender, GetDataHandlers.PlayerZoneEventArgs args)
|
internal void OnPlayerZone(object sender, GetDataHandlers.PlayerZoneEventArgs args)
|
||||||
|
{
|
||||||
|
if(args.Zone2[1] || args.Zone2[2] || args.Zone2[3] || args.Zone2[4])
|
||||||
{
|
{
|
||||||
bool hasSolarTower = false;
|
bool hasSolarTower = false;
|
||||||
bool hasVortexTower = false;
|
bool hasVortexTower = false;
|
||||||
|
|
@ -1024,7 +1026,7 @@ namespace TShockAPI
|
||||||
hasStardustTower = true;
|
hasStardustTower = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((args.Zone2[1] && !hasSolarTower)
|
if ((args.Zone2[1] && !hasSolarTower)
|
||||||
|| (args.Zone2[2] && !hasVortexTower)
|
|| (args.Zone2[2] && !hasVortexTower)
|
||||||
|| (args.Zone2[3] && !hasNebulaTower)
|
|| (args.Zone2[3] && !hasNebulaTower)
|
||||||
|| (args.Zone2[4] && !hasStardustTower)
|
|| (args.Zone2[4] && !hasStardustTower)
|
||||||
|
|
@ -1034,6 +1036,7 @@ namespace TShockAPI
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Bouncer's KillMe hook stops crash exploits from out of bounds values.</summary>
|
/// <summary>Bouncer's KillMe hook stops crash exploits from out of bounds values.</summary>
|
||||||
/// <param name="sender">The object that triggered the event.</param>
|
/// <param name="sender">The object that triggered the event.</param>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue