Changed so the item cache file only gets created if there is data to add.

This commit is contained in:
Mini 2007-02-04 09:46:42 +00:00
parent 992f497ae2
commit 3d1a0e3d4d

View File

@ -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);