From 3d1a0e3d4dce2726f7a5b126153990d006c6c8c7 Mon Sep 17 00:00:00 2001 From: Mini Date: Sun, 4 Feb 2007 09:46:42 +0000 Subject: [PATCH] Changed so the item cache file only gets created if there is data to add. --- src/Client/World/CacheHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Client/World/CacheHandler.cpp b/src/Client/World/CacheHandler.cpp index af1465a..a2f8270 100644 --- a/src/Client/World/CacheHandler.cpp +++ b/src/Client/World/CacheHandler.cpp @@ -222,6 +222,9 @@ void ItemProtoCache_InsertDataToSession(WorldSession *session) void ItemProtoCache_WriteDataToCache(WorldSession *session) { + if (session->objmgr.GetItemProtoCount() <= 0) + return; + char* fn = "./cache/ItemPrototypes.cache"; std::fstream fh; fh.open(fn, std::ios_base::out | std::ios_base::binary);