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/jail.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 
00015 #ifndef __JAIL_H__
00016 #define __JAIL_H__
00017 
00018  /*
00019 \class cJailed
00020 \author Endymion
00021 
00022 the jailed
00023 */
00024 class cJailed
00025 {
00026 public:
00027         cJailed();
00028         ~cJailed();
00029         
00030         SERIAL  serial;         
00031         Location oldpos;        
00032         std::string     why;    
00033         UI32    sec;            
00034         UI32    timer;          
00035         SERIAL  cell;           
00036 
00037 };
00038 
00039 typedef std::vector< cJailed > JAILEDVECTOR;
00040 
00041 /*
00042 \class cPrisonCell
00043 \author Endymion
00044 
00045 a cell of the prison
00046 */
00047 class cPrisonCell
00048 {
00049 public:
00050         cPrisonCell();
00051         ~cPrisonCell();
00052 
00053         SERIAL serial;          
00054         Location pos;           
00055         bool free;              
00056 
00057 };
00058 
00059         
00060 typedef std::vector<cPrisonCell> PRISONCELLVECTOR;
00061 typedef std::vector<cJailed> JAILEDVECTOR;
00062 
00063 /*
00064 \class cPrison
00065 \author Endymion
00066 
00067 manage the jail
00068 */
00069 namespace prison {
00070 
00071         extern PRISONCELLVECTOR cells;  
00072         extern JAILEDVECTOR jailed;     
00073 
00074         void archive();
00075         void safeoldsave();
00076         void jail( P_CHAR jailer, P_CHAR pc, UI32 secs );
00077         void release( P_CHAR releaser, P_CHAR pc );
00078         void checkForFree();
00079         void freePrisonCell( SERIAL cell );
00080         void addCell( SERIAL serial, UI16 x, UI16 y, SI08 z );
00081         void standardJailxyz (int jailnum, int& x, int& y, int& z);
00082 
00083 };
00084 
00085 #endif
SourceForge.net Logo