Use less obsolete code

Disable XML comment warnings for the love of god
Fix some random tab/space conflict indentation
This commit is contained in:
Lucas Nicodemus 2015-02-28 19:09:02 -07:00
parent 008de9b28c
commit db6c09787d
4 changed files with 143 additions and 149 deletions

View file

@ -61,7 +61,7 @@ namespace TShockAPI
if (worldpath != null && !Directory.Exists(worldpath)) if (worldpath != null && !Directory.Exists(worldpath))
Directory.CreateDirectory(worldpath); Directory.CreateDirectory(worldpath);
TShock.Utils.Broadcast("Server map saving, potential lag spike."); TSPlayer.All.SendInfoMessage("Server map saving, potential lag spike.");
Console.WriteLine("Backing up world..."); Console.WriteLine("Backing up world...");
SaveManager.Instance.SaveWorld(); SaveManager.Instance.SaveWorld();

View file

@ -62,10 +62,10 @@ namespace TShockAPI
/// </summary> /// </summary>
public class TileEditEventArgs : HandledEventArgs public class TileEditEventArgs : HandledEventArgs
{ {
/// <summary> /// <summary>
/// The TSPlayer who made the tile edit /// The TSPlayer who made the tile edit
/// </summary> /// </summary>
public TSPlayer Player { get; set; } public TSPlayer Player { get; set; }
/// <summary> /// <summary>
/// The tile coordinate on the X plane /// The tile coordinate on the X plane
@ -87,10 +87,10 @@ namespace TShockAPI
/// </summary> /// </summary>
public EditAction Action { get; set; } public EditAction Action { get; set; }
/// <summary> /// <summary>
/// Did the tile get destroyed successfully. /// Did the tile get destroyed successfully.
/// </summary> /// </summary>
public EditType editDetail { get; set; } public EditType editDetail { get; set; }
/// <summary> /// <summary>
/// Used when a tile is placed to denote a subtype of tile. (e.g. for tile id 21: Chest = 0, Gold Chest = 1) /// Used when a tile is placed to denote a subtype of tile. (e.g. for tile id 21: Chest = 0, Gold Chest = 1)
@ -109,12 +109,12 @@ namespace TShockAPI
var args = new TileEditEventArgs var args = new TileEditEventArgs
{ {
Player = ply, Player = ply,
X = x, X = x,
Y = y, Y = y,
Action = action, Action = action,
EditData = editData, EditData = editData,
editDetail = editDetail, editDetail = editDetail,
Style = style Style = style
}; };
TileEdit.Invoke(null, args); TileEdit.Invoke(null, args);
@ -152,37 +152,37 @@ namespace TShockAPI
return args.Handled; return args.Handled;
} }
/// <summary> /// <summary>
/// For use in a PlayerTeam event /// For use in a PlayerTeam event
/// </summary> /// </summary>
public class PlayerTeamEventArgs : HandledEventArgs public class PlayerTeamEventArgs : HandledEventArgs
{ {
/// <summary> /// <summary>
/// The Terraria player ID of the player /// The Terraria player ID of the player
/// </summary> /// </summary>
public byte PlayerId { get; set; } public byte PlayerId { get; set; }
/// <summary> /// <summary>
/// Enable/disable pvp? /// Enable/disable pvp?
/// </summary> /// </summary>
public byte Team { get; set; } public byte Team { get; set; }
} }
/// <summary> /// <summary>
/// TogglePvp - called when a player toggles pvp /// TogglePvp - called when a player toggles pvp
/// </summary> /// </summary>
public static HandlerList<PlayerTeamEventArgs> PlayerTeam; public static HandlerList<PlayerTeamEventArgs> PlayerTeam;
private static bool OnPlayerTeam(byte _id, byte _team) private static bool OnPlayerTeam(byte _id, byte _team)
{ {
if (PlayerTeam == null) if (PlayerTeam == null)
return false; return false;
var args = new PlayerTeamEventArgs var args = new PlayerTeamEventArgs
{ {
PlayerId = _id, PlayerId = _id,
Team = _team, Team = _team,
}; };
PlayerTeam.Invoke(null, args); PlayerTeam.Invoke(null, args);
return args.Handled; return args.Handled;
} }
/// <summary> /// <summary>
/// For use in a PlayerSlot event /// For use in a PlayerSlot event
@ -1500,56 +1500,56 @@ namespace TShockAPI
string password = args.Data.ReadString(); string password = args.Data.ReadString();
if (Hooks.PlayerHooks.OnPlayerPreLogin(args.Player, args.Player.Name, password)) if (Hooks.PlayerHooks.OnPlayerPreLogin(args.Player, args.Player.Name, password))
return true; return true;
var user = TShock.Users.GetUserByName(args.Player.Name); var user = TShock.Users.GetUserByName(args.Player.Name);
if (user != null && !TShock.Config.DisableLoginBeforeJoin) if (user != null && !TShock.Config.DisableLoginBeforeJoin)
{ {
string encrPass = TShock.Utils.HashPassword(password); string encrPass = TShock.Utils.HashPassword(password);
if (user.Password.ToUpper() == encrPass.ToUpper()) if (user.Password.ToUpper() == encrPass.ToUpper())
{ {
args.Player.RequiresPassword = false; args.Player.RequiresPassword = false;
args.Player.PlayerData = TShock.CharacterDB.GetPlayerData(args.Player, TShock.Users.GetUserID(args.Player.Name)); args.Player.PlayerData = TShock.CharacterDB.GetPlayerData(args.Player, TShock.Users.GetUserID(args.Player.Name));
if (args.Player.State == 1) if (args.Player.State == 1)
args.Player.State = 2; args.Player.State = 2;
NetMessage.SendData((int) PacketTypes.WorldInfo, args.Player.Index); NetMessage.SendData((int) PacketTypes.WorldInfo, args.Player.Index);
var group = TShock.Utils.GetGroup(user.Group); var group = TShock.Utils.GetGroup(user.Group);
if (Main.ServerSideCharacter) if (Main.ServerSideCharacter)
{ {
if (group.HasPermission(Permissions.bypassssc)) if (group.HasPermission(Permissions.bypassssc))
{ {
args.Player.IgnoreActionsForClearingTrashCan = false; args.Player.IgnoreActionsForClearingTrashCan = false;
} }
args.Player.PlayerData.RestoreCharacter(args.Player); args.Player.PlayerData.RestoreCharacter(args.Player);
} }
args.Player.LoginFailsBySsi = false; args.Player.LoginFailsBySsi = false;
if (group.HasPermission(Permissions.ignorestackhackdetection)) if (group.HasPermission(Permissions.ignorestackhackdetection))
args.Player.IgnoreActionsForCheating = "none"; args.Player.IgnoreActionsForCheating = "none";
if (group.HasPermission(Permissions.usebanneditem)) if (group.HasPermission(Permissions.usebanneditem))
args.Player.IgnoreActionsForDisabledArmor = "none"; args.Player.IgnoreActionsForDisabledArmor = "none";
args.Player.Group = group; args.Player.Group = group;
args.Player.tempGroup = null; args.Player.tempGroup = null;
args.Player.UserAccountName = args.Player.Name; args.Player.UserAccountName = args.Player.Name;
args.Player.UserID = TShock.Users.GetUserID(args.Player.UserAccountName); args.Player.UserID = TShock.Users.GetUserID(args.Player.UserAccountName);
args.Player.IsLoggedIn = true; args.Player.IsLoggedIn = true;
args.Player.IgnoreActionsForInventory = "none"; args.Player.IgnoreActionsForInventory = "none";
if (!args.Player.IgnoreActionsForClearingTrashCan && Main.ServerSideCharacter) if (!args.Player.IgnoreActionsForClearingTrashCan && Main.ServerSideCharacter)
{ {
args.Player.PlayerData.CopyCharacter(args.Player); args.Player.PlayerData.CopyCharacter(args.Player);
TShock.CharacterDB.InsertPlayerData(args.Player); TShock.CharacterDB.InsertPlayerData(args.Player);
} }
args.Player.SendMessage("Authenticated as " + args.Player.Name + " successfully.", Color.LimeGreen); args.Player.SendMessage("Authenticated as " + args.Player.Name + " successfully.", Color.LimeGreen);
TShock.Log.ConsoleInfo(args.Player.Name + " authenticated successfully as user " + args.Player.Name + "."); TShock.Log.ConsoleInfo(args.Player.Name + " authenticated successfully as user " + args.Player.Name + ".");
TShock.Users.SetUserUUID(user, args.Player.UUID); TShock.Users.SetUserUUID(user, args.Player.UUID);
Hooks.PlayerHooks.OnPlayerPostLogin(args.Player); Hooks.PlayerHooks.OnPlayerPostLogin(args.Player);
return true; return true;
} }
TShock.Utils.ForceKick(args.Player, "Invalid user account password.", true); TShock.Utils.ForceKick(args.Player, "Invalid user account password.", true);
@ -1577,7 +1577,7 @@ namespace TShockAPI
{ {
if (args.Player.RequestedSection) if (args.Player.RequestedSection)
return true; return true;
args.Player.RequestedSection = true; args.Player.RequestedSection = true;
if (String.IsNullOrEmpty(args.Player.Name)) if (String.IsNullOrEmpty(args.Player.Name))
{ {
TShock.Utils.ForceKick(args.Player, "Blank name.", true); TShock.Utils.ForceKick(args.Player, "Blank name.", true);
@ -2180,15 +2180,15 @@ namespace TShockAPI
return false; return false;
} }
private static bool HandlePlayerTeam(GetDataHandlerArgs args) private static bool HandlePlayerTeam(GetDataHandlerArgs args)
{ {
byte id = args.Data.ReadInt8(); byte id = args.Data.ReadInt8();
byte team = args.Data.ReadInt8(); byte team = args.Data.ReadInt8();
if (OnPlayerTeam(id, team)) if (OnPlayerTeam(id, team))
return true; return true;
if (id != args.Player.Index) if (id != args.Player.Index)
return true; return true;
if ((DateTime.UtcNow - args.Player.LastPvPTeamChange).TotalSeconds < 5) if ((DateTime.UtcNow - args.Player.LastPvPTeamChange).TotalSeconds < 5)
{ {
@ -2197,8 +2197,8 @@ namespace TShockAPI
} }
args.Player.LastPvPTeamChange = DateTime.UtcNow; args.Player.LastPvPTeamChange = DateTime.UtcNow;
return false; return false;
} }
private static bool HandlePlayerUpdate(GetDataHandlerArgs args) private static bool HandlePlayerUpdate(GetDataHandlerArgs args)
{ {
@ -2232,7 +2232,7 @@ namespace TShockAPI
if (!pos.Equals(args.Player.LastNetPosition)) if (!pos.Equals(args.Player.LastNetPosition))
{ {
float distance = Vector2.Distance(new Vector2(pos.X/16f, pos.Y/16f), float distance = Vector2.Distance(new Vector2(pos.X/16f, pos.Y/16f),
new Vector2(args.Player.LastNetPosition.X/16f, args.Player.LastNetPosition.Y/16f)); new Vector2(args.Player.LastNetPosition.X/16f, args.Player.LastNetPosition.Y/16f));
if (TShock.CheckIgnores(args.Player)) if (TShock.CheckIgnores(args.Player))
{ {
if (distance > TShock.Config.MaxRangeForDisabled) if (distance > TShock.Config.MaxRangeForDisabled)
@ -2414,7 +2414,7 @@ namespace TShockAPI
var owner = args.Data.ReadInt8(); var owner = args.Data.ReadInt8();
var type = args.Data.ReadInt16(); var type = args.Data.ReadInt16();
var bits = (BitsByte) args.Data.ReadInt8(); var bits = (BitsByte) args.Data.ReadInt8();
owner = (byte)args.Player.Index; owner = (byte)args.Player.Index;
float[] ai = new float[Projectile.maxAI]; float[] ai = new float[Projectile.maxAI];
for (int i = 0; i < Projectile.maxAI; i++) for (int i = 0; i < Projectile.maxAI; i++)
@ -2444,15 +2444,8 @@ namespace TShockAPI
args.Player.RemoveProjectile(ident, owner); args.Player.RemoveProjectile(ident, owner);
return true; return true;
} }
// Server now checks owner + ident, if owner is different, server will create new projectile.
/*if (args.Player.Index != owner)
{
args.Player.Disable(String.Format("Owner ({0}) and player ID ({1}) does not match to update projectile", owner, args.Player.Index));
args.Player.RemoveProjectile(ident, owner);
return true;
}*/
if (dmg > TShock.Config.MaxProjDamage && !args.Player.Group.HasPermission(Permissions.ignoredamagecap)) if (dmg > TShock.Config.MaxProjDamage && !args.Player.Group.HasPermission(Permissions.ignoredamagecap))
{ {
args.Player.Disable(String.Format("Projectile damage is higher than {0}.", TShock.Config.MaxProjDamage)); args.Player.Disable(String.Format("Projectile damage is higher than {0}.", TShock.Config.MaxProjDamage));
args.Player.RemoveProjectile(ident, owner); args.Player.RemoveProjectile(ident, owner);
@ -2470,7 +2463,7 @@ namespace TShockAPI
{ {
if (type == 100 || type == 164 || type == 180 || type == 261 || (type > 289 && type < 298) || (type >= 325 && type <= 328) || (type >= 345 && type <= 352)) if (type == 100 || type == 164 || type == 180 || type == 261 || (type > 289 && type < 298) || (type >= 325 && type <= 328) || (type >= 345 && type <= 352))
{ {
Log.Debug("Certain projectiles have been ignored for cheat detection."); TShock.Log.Debug("Certain projectiles have been ignored for cheat detection.");
} }
else else
{ {
@ -2497,7 +2490,7 @@ namespace TShockAPI
{ {
if (type == 90 && TShock.Config.ProjIgnoreShrapnel) // Ignore crystal shards if (type == 90 && TShock.Config.ProjIgnoreShrapnel) // Ignore crystal shards
{ {
Log.Debug("Ignoring shrapnel per config.."); TShock.Log.Debug("Ignoring shrapnel per config..");
} }
else if (!Main.projectile[index].active) else if (!Main.projectile[index].active)
{ {
@ -2522,7 +2515,7 @@ namespace TShockAPI
{ {
var ident = args.Data.ReadInt16(); var ident = args.Data.ReadInt16();
var owner = args.Data.ReadInt8(); var owner = args.Data.ReadInt8();
owner = (byte)args.Player.Index; owner = (byte)args.Player.Index;
var index = TShock.Utils.SearchProjectile(ident, owner); var index = TShock.Utils.SearchProjectile(ident, owner);
if (index > Main.maxProjectiles || index < 0) if (index > Main.maxProjectiles || index < 0)
@ -2532,7 +2525,7 @@ namespace TShockAPI
var type = Main.projectile[index].type; var type = Main.projectile[index].type;
// Players can no longer destroy projectiles that are not theirs as of 1.1.2 // Players can no longer destroy projectiles that are not theirs as of 1.1.2
/*if (args.Player.Index != Main.projectile[index].owner && type != 102 && type != 100 && !TShock.Config.IgnoreProjKill) // workaround for skeletron prime projectiles /*if (args.Player.Index != Main.projectile[index].owner && type != 102 && type != 100 && !TShock.Config.IgnoreProjKill) // workaround for skeletron prime projectiles
{ {
args.Player.Disable(String.Format("Owner ({0}) and player ID ({1}) does not match to kill projectile of type: {3}", Main.projectile[index].owner, args.Player.Index, type)); args.Player.Disable(String.Format("Owner ({0}) and player ID ({1}) does not match to kill projectile of type: {3}", Main.projectile[index].owner, args.Player.Index, type));
@ -2546,7 +2539,7 @@ namespace TShockAPI
return true; return true;
} }
if (TShock.CheckProjectilePermission(args.Player, index, type) && type != 102 && type != 100 && !TShock.Config.IgnoreProjKill) if (TShock.CheckProjectilePermission(args.Player, index, type) && type != 102 && type != 100 && !TShock.Config.IgnoreProjKill)
{ {
args.Player.Disable("Does not have projectile permission to kill projectile."); args.Player.Disable("Does not have projectile permission to kill projectile.");
args.Player.RemoveProjectile(ident, owner); args.Player.RemoveProjectile(ident, owner);
@ -2574,7 +2567,7 @@ namespace TShockAPI
if (dmg > 20000) //Abnormal values have the potential to cause infinite loops in the server. if (dmg > 20000) //Abnormal values have the potential to cause infinite loops in the server.
{ {
TShock.Utils.ForceKick(args.Player, "Crash Exploit Attempt", true); TShock.Utils.ForceKick(args.Player, "Crash Exploit Attempt", true);
TShock.Log.ConsoleError("Death Exploit Attempt: Damage {0}", dmg); TShock.Log.ConsoleError("Death Exploit Attempt: Damage {0}", dmg);
return false; return false;
} }
@ -2605,18 +2598,18 @@ namespace TShockAPI
} }
} }
if (args.TPlayer.difficulty == 2 && (TShock.Config.KickOnHardcoreDeath || TShock.Config.BanOnHardcoreDeath)) if (args.TPlayer.difficulty == 2 && (TShock.Config.KickOnHardcoreDeath || TShock.Config.BanOnHardcoreDeath))
{ {
if (TShock.Config.BanOnHardcoreDeath) if (TShock.Config.BanOnHardcoreDeath)
{ {
if (!TShock.Utils.Ban(args.Player, TShock.Config.HardcoreBanReason, false, "hardcore-death")) if (!TShock.Utils.Ban(args.Player, TShock.Config.HardcoreBanReason, false, "hardcore-death"))
TShock.Utils.ForceKick(args.Player, "Death results in a ban, but can't ban you.", true); TShock.Utils.ForceKick(args.Player, "Death results in a ban, but can't ban you.", true);
} }
else else
{ {
TShock.Utils.ForceKick(args.Player, TShock.Config.HardcoreKickReason, true, false); TShock.Utils.ForceKick(args.Player, TShock.Config.HardcoreKickReason, true, false);
} }
} }
if (args.TPlayer.difficulty == 2 && Main.ServerSideCharacter && args.Player.IsLoggedIn) if (args.TPlayer.difficulty == 2 && Main.ServerSideCharacter && args.Player.IsLoggedIn)
{ {
@ -2681,32 +2674,32 @@ namespace TShockAPI
} }
if (type == 1 && !(bucket == 2 || bucket == 0)) if (type == 1 && !(bucket == 2 || bucket == 0))
{ {
args.Player.SendErrorMessage("You do not have permission to perform this action."); args.Player.SendErrorMessage("You do not have permission to perform this action.");
args.Player.Disable("Spreading lava without holding a lava bucket"); args.Player.Disable("Spreading lava without holding a lava bucket");
args.Player.SendTileSquare(tileX, tileY, 1); args.Player.SendTileSquare(tileX, tileY, 1);
return true; return true;
} }
if(type == 1 && TShock.Itembans.ItemIsBanned("Lava Bucket", args.Player)) if(type == 1 && TShock.Itembans.ItemIsBanned("Lava Bucket", args.Player))
{ {
args.Player.SendErrorMessage("You do not have permission to perform this action."); args.Player.SendErrorMessage("You do not have permission to perform this action.");
args.Player.Disable("Using banned lava bucket without permissions"); args.Player.Disable("Using banned lava bucket without permissions");
args.Player.SendTileSquare(tileX, tileY, 1); args.Player.SendTileSquare(tileX, tileY, 1);
return true; return true;
} }
if (type == 0 && !(bucket == 1 || bucket == 0)) if (type == 0 && !(bucket == 1 || bucket == 0))
{ {
args.Player.SendErrorMessage("You do not have permission to perform this action."); args.Player.SendErrorMessage("You do not have permission to perform this action.");
args.Player.Disable("Spreading water without holding a water bucket"); args.Player.Disable("Spreading water without holding a water bucket");
args.Player.SendTileSquare(tileX, tileY, 1); args.Player.SendTileSquare(tileX, tileY, 1);
return true; return true;
} }
if (type == 0 && TShock.Itembans.ItemIsBanned("Water Bucket", args.Player)) if (type == 0 && TShock.Itembans.ItemIsBanned("Water Bucket", args.Player))
{ {
args.Player.SendErrorMessage("You do not have permission to perform this action."); args.Player.SendErrorMessage("You do not have permission to perform this action.");
args.Player.Disable("Using banned water bucket without permissions"); args.Player.Disable("Using banned water bucket without permissions");
args.Player.SendTileSquare(tileX, tileY, 1); args.Player.SendTileSquare(tileX, tileY, 1);
return true; return true;
@ -2820,20 +2813,20 @@ namespace TShockAPI
args.Player.InitSpawn = true; args.Player.InitSpawn = true;
if ((Main.ServerSideCharacter) && (args.Player.sX > 0) && (args.Player.sY > 0) && (args.TPlayer.SpawnX > 0) && ((args.TPlayer.SpawnX != args.Player.sX) && (args.TPlayer.SpawnY != args.Player.sY))) if ((Main.ServerSideCharacter) && (args.Player.sX > 0) && (args.Player.sY > 0) && (args.TPlayer.SpawnX > 0) && ((args.TPlayer.SpawnX != args.Player.sX) && (args.TPlayer.SpawnY != args.Player.sY)))
{ {
args.Player.sX=args.TPlayer.SpawnX; args.Player.sX=args.TPlayer.SpawnX;
args.Player.sY=args.TPlayer.SpawnY; args.Player.sY=args.TPlayer.SpawnY;
if (((Main.tile[args.Player.sX, args.Player.sY - 1].active() && Main.tile[args.Player.sX, args.Player.sY - 1].type == 79)) && (WorldGen.StartRoomCheck(args.Player.sX, args.Player.sY -1))) if (((Main.tile[args.Player.sX, args.Player.sY - 1].active() && Main.tile[args.Player.sX, args.Player.sY - 1].type == 79)) && (WorldGen.StartRoomCheck(args.Player.sX, args.Player.sY -1)))
args.Player.Teleport(args.Player.sX * 16, (args.Player.sY * 16) -48); args.Player.Teleport(args.Player.sX * 16, (args.Player.sY * 16) -48);
} }
else if ((Main.ServerSideCharacter) && (args.Player.sX > 0) && (args.Player.sY > 0)) else if ((Main.ServerSideCharacter) && (args.Player.sX > 0) && (args.Player.sY > 0))
{ {
if (((Main.tile[args.Player.sX, args.Player.sY - 1].active() && Main.tile[args.Player.sX, args.Player.sY - 1].type == 79)) && (WorldGen.StartRoomCheck(args.Player.sX, args.Player.sY -1))) if (((Main.tile[args.Player.sX, args.Player.sY - 1].active() && Main.tile[args.Player.sX, args.Player.sY - 1].type == 79)) && (WorldGen.StartRoomCheck(args.Player.sX, args.Player.sY -1)))
args.Player.Teleport(args.Player.sX * 16, (args.Player.sY * 16) -48); args.Player.Teleport(args.Player.sX * 16, (args.Player.sY * 16) -48);
} }
args.Player.Dead = false; args.Player.Dead = false;
return false; return false;
@ -2973,13 +2966,13 @@ namespace TShockAPI
if (TShock.CheckTilePermission(args.Player, x, y)) if (TShock.CheckTilePermission(args.Player, x, y))
{ {
args.Player.SendErrorMessage( "You do not have access to modify this area."); args.Player.SendErrorMessage( "You do not have access to modify this area.");
args.Player.SendData(PacketTypes.UpdateNPCHome, "", id, Main.npc[id].homeTileX, Main.npc[id].homeTileY, args.Player.SendData(PacketTypes.UpdateNPCHome, "", id, Main.npc[id].homeTileX, Main.npc[id].homeTileY,
Convert.ToByte(Main.npc[id].homeless)); Convert.ToByte(Main.npc[id].homeless));
return true; return true;
} }
//removed until NPC Home packet actually sends their home coords. //removed until NPC Home packet actually sends their home coords.
/*if (TShock.CheckRangePermission(args.Player, x, y)) /*if (TShock.CheckRangePermission(args.Player, x, y))
{ {
args.Player.SendData(PacketTypes.UpdateNPCHome, "", id, Main.npc[id].homeTileX, Main.npc[id].homeTileY, args.Player.SendData(PacketTypes.UpdateNPCHome, "", id, Main.npc[id].homeTileX, Main.npc[id].homeTileY,
@ -3209,7 +3202,7 @@ namespace TShockAPI
if (Main.npc[id] == null) if (Main.npc[id] == null)
return true; return true;
if (dmg > TShock.Config.MaxDamage && !args.Player.Group.HasPermission(Permissions.ignoredamagecap)) if (dmg > TShock.Config.MaxDamage && !args.Player.Group.HasPermission(Permissions.ignoredamagecap))
{ {
if (TShock.Config.KickOnDamageThresholdBroken) if (TShock.Config.KickOnDamageThresholdBroken)
{ {

View file

@ -58,8 +58,8 @@ namespace TShockAPI
} }
catch (Exception ex) catch (Exception ex)
{ {
Log.Error("World saved notification failed"); TShock.Log.Error("World saved notification failed");
Log.Error(ex.ToString()); TShock.Log.Error(ex.ToString());
} }
} }
} }
@ -134,8 +134,8 @@ namespace TShockAPI
} }
catch (Exception e) catch (Exception e)
{ {
Log.Error("World saved failed"); TShock.Log.Error("World saved failed");
Log.Error(e.ToString()); TShock.Log.Error(e.ToString());
} }
} }
} }

View file

@ -39,6 +39,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>bin\Debug\TShockAPI.XML</DocumentationFile> <DocumentationFile>bin\Debug\TShockAPI.XML</DocumentationFile>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<NoWarn>1591</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@ -185,7 +186,7 @@
</PropertyGroup> </PropertyGroup>
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>
<UserProperties BuildVersion_IncrementBeforeBuild="False" BuildVersion_StartDate="2011/6/17" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_BuildAction="Both" BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" /> <UserProperties BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" BuildVersion_BuildAction="Both" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_StartDate="2011/6/17" BuildVersion_IncrementBeforeBuild="False" />
</VisualStudio> </VisualStudio>
</ProjectExtensions> </ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.