Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/home/groups/n/no/noxwizard/cvs/src/globals.h

Go to the documentation of this file.
00001   /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
00002     || NoX-Wizard UO Server Emulator (NXW) [http://noxwizard.sourceforge.net]  ||
00003     ||                                                                         ||
00004     || This software is free software released under GPL2 license.             ||
00005     || You can find detailed license information in nox-wizard.cpp file.       ||
00006     ||                                                                         ||
00007     || For any question post to NoX-Wizard forums.                             ||
00008     -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
00009 
00010 
00016 #ifndef __GLOBALS_H__
00017 #define __GLOBALS_H__
00018 
00019 #include "amx/amxvarserver.h"
00020 #include "regions.h"
00021 #include "scp_parser.h"
00022 #include "client.h"
00023 
00024 
00025 // GOOD GLOBALZ (Those which are just fine)
00026 
00027 extern server_st server_data;
00028 
00029 
00030 #ifdef __unix__
00031 extern unsigned long int oldtime, newtime;
00032 #define SLPMULTI 1000
00033 #else
00034 extern WSADATA wsaData;
00035 extern WORD wVersionRequested;
00036 extern long int oldtime, newtime;
00037 #endif
00038 
00039 extern bool g_nShowLayers;
00040 
00041 extern int dummy__; //used for default parameters of type int& and int*
00042 
00043 extern repsys_st repsys;
00044 extern resource_st resource;
00045 
00046 extern class cGuilds            *Guilds;
00047 extern struct teffect_st        *teffects;
00048 
00049 extern std::vector<std::string> clientsAllowed;
00050 extern class cRegion *mapRegions; //setup map regions Tauriel
00051 
00052 extern  std::multimap <int, tele_locations_st> tele_locations; // can't use a map here :(
00053 // Profiling
00054 extern int networkTime;
00055 extern int timerTime;
00056 extern int autoTime;
00057 extern int loopTime;
00058 extern int networkTimeCount;
00059 extern int timerTimeCount;
00060 extern int autoTimeCount;
00061 extern int loopTimeCount;
00062 
00063 //server.cfg/scp things :)
00064 extern begging_st begging_data;
00065 extern fishing_st fishing_data;
00066 extern spiritspeak_st spiritspeak_data;
00067 extern speed_st speed;//Lag Fix -- Zippy
00068 
00069 
00070 extern char n_scripts[NUM_SCRIPTS][512] ; // array of script filenames
00071 
00072 extern short g_nMainTCPPort;
00073 
00074 
00075 /*****************************************************************************
00076  EVIL GLOBALZ (Those to be cut from NXW whenever possible)
00077  *****************************************************************************/
00078 extern char script1[512];
00079 extern char script2[512];
00080 extern char script3[512];
00081 extern char script4[512]; // added to use for newbie items
00082 
00083 
00084 
00085 /*****************************************************************************
00086  NEUTRAL GLOBALZ (Those We've not yet evaluated if risky or fine)
00087  *****************************************************************************/
00088 
00089 
00090 extern int escortRegions;
00094 // maximum too cause maxclient = maximum +1
00095 
00096 
00097 
00098 extern P_CLIENT clientInfo[MAXCLIENT];
00099 
00100 extern bool cryptedClient[MAXCLIENT];
00101 
00102 extern unsigned char  buffer[MAXCLIENT][MAXBUFFER];
00103 extern char  outbuffer[MAXCLIENT][MAXBUFFER];
00104 extern int client[MAXCLIENT];
00105 extern short int walksequence[MAXCLIENT];
00106 extern int acctno[MAXCLIENT];
00107 extern unsigned char clientip[MAXCLIENT][4];
00108 extern int binlength[MAXIMUM+1];
00109 extern int boutlength[MAXIMUM+1];
00110 extern unsigned char clientDimension[MAXCLIENT]; // stores if the client is the new 3d or old 2d one
00111 
00112 
00113 
00114 
00116 //              MAxBuffer                  //
00118 
00119 extern char tbuffer[MAXBUFFER];
00120 extern char xoutbuffer[MAXBUFFER*5];
00121 
00122 
00123 
00124 
00125 
00126 extern gmpage_st gmpages[MAXPAGES];
00127 extern gmpage_st counspages[MAXPAGES];
00128 extern skill_st skillinfo[SKILLS+1];
00129 extern unsigned short int doorbase[DOORTYPES];
00130 extern char skillname[SKILLS+1][20];
00131 extern char serv[MAXSERV][3][30]; // Servers list
00132 
00133 extern char saveip[30];
00134 extern char start[MAXSTART][5][30]; // Startpoints list
00135 extern title_st title[ALLSKILLS+1];
00136 extern unsigned char *comm[CMAX];
00137 extern int layers[MAXLAYERS];
00138 
00139 extern location_st location[4000];
00140 extern logout_st logout[1024];//Instalog
00141 extern region_st region[256];
00142 extern advance_st wpadvance[1000];
00143 extern char spellname[71][25];
00144 extern unsigned int metagm[256][7]; // for meta gm script
00145 extern int validEscortRegion[256];
00146 
00147 extern int npcshape[5]; //Stores the coords of the bouding shape for the NPC
00148 
00149 //extern jail_st jails[11];
00150 
00154 
00155 extern char idname[256];
00156 extern char pass1[256];
00157 extern char pass2[256];
00158 extern char fametitle[128];
00159 extern char skilltitle[50];
00160 extern char prowesstitle[50];
00161 extern char *completetitle;
00162 extern char gettokenstr[256];
00163 
00164 #define TEMP_STR_SIZE 1024
00165 
00166 namespace Unicode {
00167 extern char temp[TEMP_STR_SIZE];
00168 extern char temp2[TEMP_STR_SIZE];
00169 }
00170 
00171 
00172 
00173 
00175 //  small packet-arrays
00177 
00178 extern unsigned char w_anim[3];
00179 
00180 #ifdef __unix__
00181 extern termios termstate ;
00182 #endif
00183 extern int g_nCurrentSocket;
00184 
00185 
00186 // Global Variables
00187 extern unsigned long uiCurrentTime;
00188 extern unsigned int polyduration;
00189 
00190 
00191 extern int gDecayItem; //Last item that was checked for decay Tauriel 3/7/99
00192 extern int gRespawnItem; //Last item that was checked for respawn Tauriel 3/7/99
00193 
00194 extern int save_counter;//LB, world backup rate
00195 
00196 extern int gatecount;
00197 //Time variables
00198 //extern int day, hour, minute, ampm; //Initial time is noon.
00199 extern int day;
00200 extern int secondsperuominute; //Number of seconds for a UO minute.
00201 extern UI32 uotickcount;
00202 extern int moon1update;
00203 extern int moon2update;
00204 
00205 extern unsigned char moon1;
00206 extern unsigned char moon2;
00207 extern unsigned char dungeonlightlevel;
00208 extern unsigned char worldfixedlevel;
00209 extern unsigned char worldcurlevel;
00210 extern unsigned char worldbrightlevel;
00211 extern unsigned char worlddarklevel;
00212 
00213 extern int goldamount;
00214 
00215 extern UI08 defaultpriv1;
00216 extern UI08 defaultpriv2;
00217 
00218 extern unsigned int teffectcount; // No temp effects to start with
00219 extern unsigned int nextfieldeffecttime;
00220 extern unsigned int nextnpcaitime;
00221 extern unsigned int nextdecaytime;
00222 
00223 //extern int autosaved, saveinterval,dosavewarning;
00224 extern bool heartbeat;
00225 extern int len_connection_addr;
00226 extern struct sockaddr_in connection;
00227 extern struct sockaddr_in client_addr;
00228 extern struct hostent *he;
00229 extern int err, error;
00230 extern bool keeprun;
00231 extern int a_socket;
00232 extern fd_set conn ;
00233 extern fd_set all ;
00234 extern fd_set errsock ;
00235 extern int nfds;
00236 extern timeval nettimeout;
00237 extern int now;
00238 
00239 
00240 extern FILE *wscfile;
00241 extern unsigned int servcount;
00242 extern unsigned int startcount;
00243 
00244 
00245 extern unsigned long itemCount;
00246 extern unsigned long npcCount;
00247 extern unsigned long charCount;
00248 extern int secure; // Secure mode
00249 
00250 extern unsigned char season;
00251 
00252 //extern int xycount;
00253 
00254 extern int locationcount;
00255 extern unsigned int logoutcount;//Instalog
00256 
00257 extern unsigned long int updatepctime;
00258 
00259 
00260 
00261 extern int global_lis;
00262 
00263 extern char *cline;
00264 
00265 extern int tnum;
00266 extern unsigned int starttime, endtime, lclock;
00267 extern bool overflow;
00268 
00269 //extern unsigned char globallight;
00270 extern unsigned char wtype;
00271 
00272 extern int executebatch;
00273 extern int openings;
00274 
00275 extern unsigned int respawntime;
00276 extern unsigned int gatedesttime;
00277 
00278 extern int donpcupdate;
00279 extern unsigned int hungerdamagetimer; // Used for hunger damage
00280 
00281 extern unsigned long int serverstarttime;
00282 
00283 
00284 
00285 
00286 extern unsigned long initialserversec ;
00287 extern unsigned long initialservermill ;
00288 
00289 
00290 
00291 
00292 
00293 #endif //__GLOBALS_H__
SourceForge.net Logo