Fix World Save

This commit is contained in:
Enerdy 2015-07-04 23:02:31 +01:00
parent 46ed829312
commit cd5721481f

View file

@ -17,10 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Threading; using System.Threading;
using Terraria; using Terraria;
using Terraria.Map; using Terraria.IO;
using TerrariaApi.Server; using TerrariaApi.Server;
namespace TShockAPI namespace TShockAPI
@ -126,10 +125,10 @@ namespace TShockAPI
if (task.direct) if (task.direct)
{ {
OnSaveWorld(new WorldSaveEventArgs()); OnSaveWorld(new WorldSaveEventArgs());
Main.Map.Save(); WorldFile.saveWorld(WorldFile.IsWorldOnCloud, task.resetTime);
} }
else else
Main.Map.Save(); WorldFile.saveWorld(WorldFile.IsWorldOnCloud, task.resetTime);
TShock.Utils.Broadcast("World saved.", Color.Yellow); TShock.Utils.Broadcast("World saved.", Color.Yellow);
TShock.Log.Info(string.Format("World saved at ({0})", Main.worldPathName)); TShock.Log.Info(string.Format("World saved at ({0})", Main.worldPathName));
} }