// WorldMain.cpp: implementation of the CWorldMain class. // ////////////////////////////////////////////////////////////////////// #include "uox3.h" #include "worldmain.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CWorldMain::CWorldMain() { announce(false/*0*/); } CWorldMain::~CWorldMain() { } //o---------------------------------------------------------------------------o //| Class : CWorldMain::savenewworld(char x) //| Date : Unknown //| Programmer : Unknown (Moved from uox3.cpp by EviLDeD - Dec 22, 1998) //o---------------------------------------------------------------------------o //| Purpose : Save current world state. Stores all values in an easily //| readable script file "*.wsc". This stores all world items //| and NPC/PC character information for a given shard //o---------------------------------------------------------------------------o void CWorldMain::savenewworld(char x) { int j; unsigned int i; // Dupois - If shard op has defined an ARCHIVEPATH in SERVER.SCP // then archive the WSC to the directory specified. // Added Oct 29, 1998 if (strlen(server_data.archivepath)>1) fileArchive("uox3.wsc", server_data.archivepath); // End - Dupois // EviLDeD - Put in the ability to toggle the display of WorldState // for those operators that dont like it // December 22, 1998 if(announce()) sysbroadcast("World Saving.[TEXT]"); // EviLDeD - END tempeffectsoff(); gcollect(); wscfile=fopen("uox3.wsc", "w"); if (wscfile) { fprintf(wscfile, "// UOX3 World Script (WSC)[TEXT]\n"); fprintf(wscfile, "// Generated by UOX3 Version %s\n\n[TEXT]",VER); fprintf(wscfile, "// This file replaces the function of the *.UOX files in pre-0.50 versions[TEXT]\n\n"); for (i=0;i1)) fprintf(wscfile, "SKILL%i %i\n", j, chars[i].baseskill[j]); } for (j=0;j