Allow[Hallow/Corruption/Crimson]Creep in config now work

Fixes #1043
This commit is contained in:
White 2015-07-25 13:06:21 +09:30
parent 835f507672
commit c7711b2906

View file

@ -33,10 +33,10 @@ using MySql.Data.MySqlClient;
using Newtonsoft.Json; using Newtonsoft.Json;
using Rests; using Rests;
using Terraria; using Terraria;
using Terraria.ID;
using TerrariaApi.Server; using TerrariaApi.Server;
using TShockAPI.DB; using TShockAPI.DB;
using TShockAPI.Hooks; using TShockAPI.Hooks;
using TShockAPI.Net;
using TShockAPI.ServerSideCharacters; using TShockAPI.ServerSideCharacters;
namespace TShockAPI namespace TShockAPI
@ -1023,23 +1023,22 @@ namespace TShockAPI
{ {
if (args.Handled) if (args.Handled)
return; return;
if (!Config.AllowCrimsonCreep && (args.Type == 0 || args.Type == 199 || args.Type == 200 || args.Type == 203 if (!Config.AllowCrimsonCreep && (args.Type == TileID.Dirt || args.Type == TileID.FleshWeeds
|| args.Type == 234)) || TileID.Sets.Crimson[args.Type]))
{ {
args.Handled = true; args.Handled = true;
return; return;
} }
if (!Config.AllowCorruptionCreep && (args.Type == 23 || args.Type == 25 || args.Type == 0 || if (!Config.AllowCorruptionCreep && (args.Type == TileID.Dirt || args.Type == TileID.CorruptThorns
args.Type == 112 || args.Type == 32)) || TileID.Sets.Corrupt[args.Type]))
{ {
args.Handled = true; args.Handled = true;
return; return;
} }
if (!Config.AllowHallowCreep && (args.Type == 109 || args.Type == 117 || args.Type == 116 || args.Type == 115 if (!Config.AllowHallowCreep && (TileID.Sets.Hallow[args.Type]))
|| args.Type == 164))
{ {
args.Handled = true; args.Handled = true;
} }