wpdev-commits Mailing List for Wolfpack Emu (Page 195)
Brought to you by:
rip,
thiagocorrea
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(121) |
Sep
(256) |
Oct
(59) |
Nov
(73) |
Dec
(120) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(259) |
Feb
(381) |
Mar
(501) |
Apr
(355) |
May
(427) |
Jun
(270) |
Jul
(394) |
Aug
(412) |
Sep
(724) |
Oct
(578) |
Nov
(65) |
Dec
|
|
From: <thi...@us...> - 2003-09-02 02:35:31
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv22051 Modified Files: wolfpack.pro Log Message: Added Item and Char iterators to python Index: wolfpack.pro =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v retrieving revision 1.144 retrieving revision 1.145 diff -C2 -d -r1.144 -r1.145 *** wolfpack.pro 2 Sep 2003 02:06:34 -0000 1.144 --- wolfpack.pro 2 Sep 2003 02:35:28 -0000 1.145 *************** *** 221,226 **** python/pytooltip.cpp \ python/socket.cpp \ ! HEADERS += python/content.h # SQLite Sources --- 221,228 ---- python/pytooltip.cpp \ python/socket.cpp \ + python/worlditerator.cpp ! HEADERS += python/content.h \ ! += python/worlditerator.h # SQLite Sources |
|
From: <dar...@us...> - 2003-09-02 02:32:24
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv21678
Modified Files:
basedef.cpp basedef.h
Log Message:
Fixed unload behaviour.
Index: basedef.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basedef.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** basedef.cpp 2 Sep 2003 02:07:23 -0000 1.1
--- basedef.cpp 2 Sep 2003 02:32:19 -0000 1.2
***************
*** 45,46 ****
--- 45,56 ----
memset( &chardefs, 0, 0x400 * sizeof( cCharBaseDef* ) );
}
+
+ cBaseDefManager::cBaseDefManager()
+ {
+ memset( &chardefs, 0, 0x400 * sizeof( cCharBaseDef* ) );
+ }
+
+ cBaseDefManager::~cBaseDefManager()
+ {
+ unload();
+ }
Index: basedef.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basedef.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** basedef.h 2 Sep 2003 02:07:23 -0000 1.1
--- basedef.h 2 Sep 2003 02:32:19 -0000 1.2
***************
*** 39,44 ****
public:
! cBaseDefManager() {}
! virtual ~cBaseDefManager() {}
cCharBaseDef *getCharBaseDef( unsigned short id );
--- 39,44 ----
public:
! cBaseDefManager();
! virtual ~cBaseDefManager();
cCharBaseDef *getCharBaseDef( unsigned short id );
|
|
From: <thi...@us...> - 2003-09-02 02:32:22
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands
In directory sc8-pr-cvs1:/tmp/cvs-serv21677/wolfpack/commands
Modified Files:
wipe.py
Log Message:
'wipe all, will remove all "in world" items
Index: wipe.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands/wipe.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** wipe.py 1 Sep 2003 04:56:45 -0000 1.1
--- wipe.py 2 Sep 2003 02:32:19 -0000 1.2
***************
*** 31,35 ****
def onCommand( socket, command, argstring ):
if len( argstring ) > 0:
! socket.sysmessage( "Argument handling not implemented [yet]")
else:
socket.sysmessage("Select the area to remove")
--- 31,37 ----
def onCommand( socket, command, argstring ):
if len( argstring ) > 0:
! if argstring.lower() == "all":
! gump = WarningGump( 1060635, 30720, "Wipping <i>all</i> items in the world.<br>Do you wish to proceed?", 0xFFC000, 420, 400, wipeAllWorld, [] )
! gump.send( socket )
else:
socket.sysmessage("Select the area to remove")
***************
*** 37,40 ****
--- 39,58 ----
return 1
+
+ def wipeAllWorld( player, accept, state ):
+ if not accept:
+ player.socket.sysmessage( "Wipe command have been canceled" )
+ return 1
+
+ player.socket.sysmessage( "Removing all items from world, this may take a while" )
+ iterator = wolfpack.itemiterator()
+ item = iterator.first
+ count = 0;
+ while item:
+ if item.container == None:
+ item.delete()
+ count += 1
+ item = iterator.next
+ player.socket.sysmessage( "%i items have been removed from world" % count )
def wipeBoundingBox( socket, target1, target2 ):
|
|
From: <thi...@us...> - 2003-09-02 02:32:22
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv21677/wolfpack Modified Files: __init__.py Log Message: 'wipe all, will remove all "in world" items Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/__init__.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** __init__.py 29 Aug 2003 17:58:11 -0000 1.31 --- __init__.py 2 Sep 2003 02:32:19 -0000 1.32 *************** *** 80,83 **** --- 80,89 ---- return _wolfpack.chars( x, y, map, range ) + def itemiterator(): + return _wolfpack.itemiterator() + + def chariterator(): + return _wolfpack.chariterator() + def allitemsserials(): return _wolfpack.allitemsserials() |
|
From: <thi...@us...> - 2003-09-02 02:31:38
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv21566 Modified Files: wolf.dsp Log Message: Added Item and Char iterators to python Index: wolf.dsp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v retrieving revision 1.212 retrieving revision 1.213 diff -C2 -d -r1.212 -r1.213 *** wolf.dsp 2 Sep 2003 02:09:41 -0000 1.212 --- wolf.dsp 2 Sep 2003 02:31:32 -0000 1.213 *************** *** 1,23 **** # Microsoft Developer Studio Project File - Name="wolf" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=wolf - Win32 Debug ! !MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE ! !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "wolf.mak". !MESSAGE ! !MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben ! !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "wolf.mak" CFG="wolf - Win32 Debug" !MESSAGE ! !MESSAGE Für die Konfiguration stehen zur Auswahl: !MESSAGE ! !MESSAGE "wolf - Win32 Release" (basierend auf "Win32 (x86) Console Application") ! !MESSAGE "wolf - Win32 Debug" (basierend auf "Win32 (x86) Console Application") !MESSAGE --- 1,23 ---- # Microsoft Developer Studio Project File - Name="wolf" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=wolf - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "wolf.mak". !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "wolf.mak" CFG="wolf - Win32 Debug" !MESSAGE ! !MESSAGE Possible choices for configuration are: !MESSAGE ! !MESSAGE "wolf - Win32 Release" (based on "Win32 (x86) Console Application") ! !MESSAGE "wolf - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE *************** *** 26,30 **** # PROP Scc_ProjName "wolf" # PROP Scc_LocalPath "." ! CPP=cl.exe RSC=rc.exe --- 26,30 ---- # PROP Scc_ProjName "wolf" # PROP Scc_LocalPath "." ! CPP=xicl6.exe RSC=rc.exe *************** *** 50,54 **** # ADD BASE BSC32 /nologo # ADD BSC32 /nologo ! LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt312.lib libmysql.lib /nologo /subsystem:console /map /machine:I386 /nodefaultlib:"libcmt MSVCRTD" /out:"D:\wolfpack\wolfpack.exe" /libpath:"lib\ZThread\lib" /libpath:"lib\Python\lib" /libpath:"lib\bugreport\lib" /libpath:"flatstore\Release" /opt:ref /opt:nowin98 --- 50,54 ---- # ADD BASE BSC32 /nologo # ADD BSC32 /nologo ! LINK32=xilink6.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt312.lib libmysql.lib /nologo /subsystem:console /map /machine:I386 /nodefaultlib:"libcmt MSVCRTD" /out:"D:\wolfpack\wolfpack.exe" /libpath:"lib\ZThread\lib" /libpath:"lib\Python\lib" /libpath:"lib\bugreport\lib" /libpath:"flatstore\Release" /opt:ref /opt:nowin98 *************** *** 75,79 **** # ADD BASE BSC32 /nologo # ADD BSC32 /nologo ! LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt312.lib /nologo /version:12.9 /subsystem:console /map /debug /machine:I386 /out:"..\Wolfpack.exe" /pdbtype:sept /libpath:"lib\bugreport\lib" /libpath:"flatstore\Debug" --- 75,79 ---- # ADD BASE BSC32 /nologo # ADD BSC32 /nologo ! LINK32=xilink6.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt312.lib /nologo /version:12.9 /subsystem:console /map /debug /machine:I386 /out:"..\Wolfpack.exe" /pdbtype:sept /libpath:"lib\bugreport\lib" /libpath:"flatstore\Debug" *************** *** 1234,1237 **** --- 1234,1245 ---- SOURCE=.\python\utilities.h + # End Source File + # Begin Source File + + SOURCE=.\python\worlditerator.cpp + # End Source File + # Begin Source File + + SOURCE=.\python\worlditerator.h # End Source File # End Group |
|
From: <thi...@us...> - 2003-09-02 02:31:38
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1:/tmp/cvs-serv21566/python Modified Files: global.cpp Added Files: worlditerator.cpp worlditerator.h Log Message: Added Item and Char iterators to python --- NEW FILE: worlditerator.cpp --- //================================================================================== // // Wolfpack Emu (WP) // UO Server Emulation Program // // Copyright 2001-2003 by holders identified in authors.txt // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Palace - Suite 330, Boston, MA 02111-1307, USA. // // * In addition to that license, if you are running this program or modified // * versions of it on a public system you HAVE TO make the complete source of // * the version used by you available or provide people with a location to // * download it. // // // // Wolfpack Homepage: http://wpdev.sf.net/ //================================================================================== #include "worlditerator.h" #include "../world.h" typedef struct { PyObject_HEAD; cItemIterator *iter; } wpItemIterator; static void wpItemIteratorDealloc( PyObject* self ) { delete ((wpItemIterator*)self)->iter; PyObject_Del( self ); } static PyObject *wpItemIterator_getAttr( wpItemIterator *self, char *name ) { if( !strcmp( name, "first" ) ) return PyGetItemObject( self->iter->first() ); else if( !strcmp( name, "next" ) ) return PyGetItemObject( self->iter->next() ); return PyFalse; } static PyTypeObject wpItemIteratorType = { PyObject_HEAD_INIT(NULL) 0, "wpItemIterator", sizeof(wpItemIteratorType), 0, wpItemIteratorDealloc, 0, (getattrfunc)wpItemIterator_getAttr, 0, 0, 0, 0, 0, }; PyObject* PyGetItemIterator() { wpItemIterator *returnVal = PyObject_New( wpItemIterator, &wpItemIteratorType ); returnVal->iter = new cItemIterator; return (PyObject*)returnVal; } /* * Character Region Iterator */ typedef struct { PyObject_HEAD; cCharIterator *iter; } wpCharIterator; static void wpCharIteratorDealloc( PyObject* self ) { delete ((wpCharIterator*)self)->iter; PyObject_Del( self ); } static PyObject *wpCharIterator_getAttr( wpCharIterator *self, char *name ) { if( !strcmp( name, "first" ) ) return PyGetCharObject( self->iter->first() ); else if( !strcmp( name, "next" ) ) return PyGetCharObject( self->iter->next() ); return PyFalse; } static PyTypeObject wpCharIteratorType = { PyObject_HEAD_INIT(NULL) 0, "wpIteratorChars", sizeof(wpCharIteratorType), 0, wpCharIteratorDealloc, 0, (getattrfunc)wpCharIterator_getAttr, 0, 0, 0, 0, 0, }; PyObject* PyGetCharIterator() { wpCharIterator *returnVal = PyObject_New( wpCharIterator, &wpCharIteratorType ); returnVal->iter = new cCharIterator; return (PyObject*)returnVal; } --- NEW FILE: worlditerator.h --- //================================================================================== // // Wolfpack Emu (WP) // UO Server Emulation Program // // Copyright 2001-2003 by holders identified in authors.txt // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Palace - Suite 330, Boston, MA 02111-1307, USA. // // * In addition to that license, if you are running this program or modified // * versions of it on a public system you HAVE TO make the complete source of // * the version used by you available or provide people with a location to // * download it. // // // // Wolfpack Homepage: http://wpdev.sf.net/ //================================================================================== #ifndef __WORLDITERATOR_H__ #define __WORLDITERATOR_H__ #include "utilities.h" #include "../world.h" PyObject* PyGetCharIterator(); PyObject* PyGetItemIterator(); #endif Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** global.cpp 2 Sep 2003 02:06:34 -0000 1.83 --- global.cpp 2 Sep 2003 02:31:32 -0000 1.84 *************** *** 65,68 **** --- 65,69 ---- #include "utilities.h" #include "tempeffect.h" + #include "worlditerator.h" // Library Includes *************** *** 550,553 **** --- 551,574 ---- /*! + Returns an iterator for all items in the world + */ + static PyObject *wpAllItemsIterator( PyObject* self, PyObject* args ) + { + Q_UNUSED(args); + Q_UNUSED(self); + return PyGetItemIterator(); + } + + /*! + Returns an iterator for all items in the world + */ + static PyObject *wpAllCharsIterator( PyObject* self, PyObject* args ) + { + Q_UNUSED(args); + Q_UNUSED(self); + return PyGetCharIterator(); + } + + /*! Returns a list of all chars serials */ *************** *** 671,681 **** Q_UNUSED(self); // Minimum is x, y, map ! if( !checkArgInt( 0 ) || !checkArgInt( 1 ) || !checkArgInt( 2 ) ) ! { ! PyErr_BadArgument(); return 0; - } ! map_st mTile = Map->seekMap( Coord_cl( getArgInt( 0 ), getArgInt( 1 ), 0, getArgInt( 2 ) ) ); PyObject *dict = PyDict_New(); --- 692,700 ---- Q_UNUSED(self); // Minimum is x, y, map ! uint x = 0, y = 0, map = 0; ! if ( !PyArg_ParseTuple( args, "iii:wolfpack.map", &x, &y, &map ) ) return 0; ! map_st mTile = Map->seekMap( Coord_cl( x, y, 0, map ) ); PyObject *dict = PyDict_New(); *************** *** 1106,1109 **** --- 1125,1130 ---- { "hasmap", wpHasMap, METH_VARARGS, "Returns true if the map specified is present" }, { "items", wpItems, METH_VARARGS, "Returns a list of items in a specific sector." }, + { "itemiterator", wpAllItemsIterator, METH_NOARGS, "Returns an iterator for all items in the world." }, + { "chariterator", wpAllCharsIterator, METH_NOARGS, "Returns an iterator for all chars in the world." }, { "chars", wpChars, METH_VARARGS, "Returns a list of chars in a specific sector." }, { "allcharsserials", wpAllCharsSerials, METH_VARARGS, "Returns a list of all chars serials" }, |
|
From: <dar...@us...> - 2003-09-02 02:23:55
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv20509
Modified Files:
dbl_single_click.cpp prototypes.h wolfpack.cpp
Log Message:
Reordering wolfpack.cpp and cleaning up some old code.
Index: dbl_single_click.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbl_single_click.cpp,v
retrieving revision 1.217
retrieving revision 1.218
diff -C2 -d -r1.217 -r1.218
*** dbl_single_click.cpp 30 Aug 2003 17:00:08 -0000 1.217
--- dbl_single_click.cpp 2 Sep 2003 02:23:51 -0000 1.218
***************
*** 674,682 ****
}
return;
- case 0x1057:
- case 0x1058: // sextants
- getSextantCords(pc_currchar->pos().x, pc_currchar->pos().y, socket->isT2A(), temp);
- socket->sysMessage( tr("You are at: %1").arg(temp) );
- return;
case 0x14FB:
case 0x14FC:
--- 674,677 ----
Index: prototypes.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/prototypes.h,v
retrieving revision 1.104
retrieving revision 1.105
diff -C2 -d -r1.104 -r1.105
*** prototypes.h 2 Sep 2003 02:06:34 -0000 1.104
--- prototypes.h 2 Sep 2003 02:23:51 -0000 1.105
***************
*** 51,56 ****
void Fame(P_CHAR pc_toChange, int nFame);
- int fielddir(P_CHAR pc, int x, int y, int z);
-
void endmessage(int x);
--- 51,54 ----
***************
*** 64,68 ****
int DeleBankItem( P_PLAYER pc, unsigned short itemid, unsigned short color, int amt );
- void getSextantCords(signed int x, signed int y, bool t2a, char *sextant);
int lineOfSight( const Coord_cl&, const Coord_cl&, int checkfor );
void reloadScripts();
--- 62,65 ----
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.448
retrieving revision 1.449
diff -C2 -d -r1.448 -r1.449
*** wolfpack.cpp 2 Sep 2003 02:06:34 -0000 1.448
--- wolfpack.cpp 2 Sep 2003 02:23:51 -0000 1.449
***************
*** 93,130 ****
#include "python/utilities.h"
-
using namespace std;
- #undef DBGFILE
- #define DBGFILE "wolfpack.cpp"
- #include "debug.h"
-
- ///////////
- // Name: inVisRange
- // Purpose: checks if position 1 and 2 are in visual range
- // history: by Duke, 18.11.2000
- //
- bool inVisRange(int x1, int y1, int x2, int y2)
- {
- return (QMAX(abs(x1-x2), abs(y1-y2)) <= VISRANGE);
- }
-
- bool inrange1p (PC_CHAR pca, P_CHAR pcb) // Are characters a and b in visual range
- {
- if (pca == NULL || pcb == NULL) return false;
-
- return inVisRange(pca->pos().x, pca->pos().y, pcb->pos().x, pcb->pos().y);
- }
-
- ///////////
- // Name: inRange
- // Purpose: checks if position 1 and 2 are in given range
- // history: by Duke, 19.11.2000
- //
- bool inRange(int x1, int y1, int x2, int y2, int range)
- {
- return (QMAX(abs(x1-x2), abs(y1-y2)) <= range);
- }
-
//================================================================================
//
--- 93,98 ----
***************
*** 181,230 ****
#endif
- void savelog(const char *msg, char *logfile)
- {
- FILE *file;
- file = fopen( logfile, "a" );
-
- QString logMessage = QString( "[%1] %2\n" ).arg( QDateTime::currentDateTime().toString() ).arg( msg );
-
- // Remove newlines
- logMessage = logMessage.replace( QRegExp( "\n" ), "" );
-
- fprintf( file, "%s", logMessage.ascii() );
-
- fclose( file );
- }
-
- int DeleBankItem( P_PLAYER pc, unsigned short itemid, unsigned short color, int amt )
- {
- if( pc == NULL )
- return amt;
-
- P_ITEM pBank = pc->getBankBox();
-
- if( pBank )
- return pBank->DeleteAmount( amt, itemid, color );
- else
- return 0;
- }
-
- void endmessage(int x) // If shutdown is initialized
- {
- x = 0;
- unsigned int igetclock = uiCurrentTime;
- if (endtime < igetclock)
- endtime = igetclock;
-
- QString message;
-
- if( ( ( ( endtime - igetclock ) / MY_CLOCKS_PER_SEC ) / 60 ) < 1 )
- message = tr( "Server going down in %1 secs." ).arg( ( endtime - igetclock ) / MY_CLOCKS_PER_SEC );
- else
- message = tr( "Server going down in %1 minutes." ).arg( ( ( endtime - igetclock ) / MY_CLOCKS_PER_SEC ) / 60 );
-
- cNetwork::instance()->broadcast( message );
- clConsole.send( message );
- }
-
void reloadScripts()
{
--- 149,152 ----
***************
*** 962,1087 ****
}
- int fielddir(P_CHAR pc, int x, int y, int z)
- {
- //WARNING: unreferenced formal parameter z
- int dir=chardirxyz(pc, x, y);
- switch (dir)
- {
- case 0:
- case 4:
- return 0;
- break;
- case 2:
- case 6:
- return 1;
- break;
- case 1:
- case 3:
- case 5:
- case 7:
- case -1:
- switch(pc->direction()) //crashfix, LB
- {
- case 0:
- case 4:
- return 0;
- break;
- case 2:
- case 6:
- return 1;
- break;
- case 1:
- case 3:
- case 5:
- case 7:
- return 1;
- default:
- clConsole.send("ERROR: Fallout of switch statement without default. wolfpack.cpp, fielddir()\n"); //Morrolan
- return 0;
- }
- default:
- clConsole.send("ERROR: Fallout of switch statement without default. wolfpack.cpp, fielddir()\n"); //Morrolan
- return 0;
- }
- return 1;
- }
-
- ////////////////////
- // Author : LB
- // purpose: converting x,y coords to sextant coords
- // input : x,y coords of object
- // output: sextant: sextant cords as string (char *)
- // memory for output string sextant has to be reserved by callee !
- // if not -> crash (has to be >=36 bytes !)
- // thanks goes to Balxan / UOAM for the basic alogithm
- // could be optimized a lot, but the freuqency of being called is probably very low
- /////////////////////
-
- void getSextantCords(signed int x, signed int y, bool t2a, char *sextant)
- {
- double Tx, Ty, Dx, Dy, Cx, Cy, Wx, Wy, Mx, My, Hx, Hy;
- signed int xH, xM, yH, yM;
- char xHs[20], yHs[20], xMs[20], yMs[20];
-
- if (t2a) // for t2a the center is in the middle
- {
- Cy = 3112.0;
- Cx = 5936.0;
- } else
- {
- // center, LB's throne *g*
- Cx = 1323.0;
- Cy = 1624.0;
- }
-
- // map dimensions
- Wx = 5120.0;
- Wy = 4096.0;
-
- // convert input ints to float;
- Tx = (double) x;
- Ty = (double) y;
-
- // main calculation
- Dx = ( (Tx - Cx) * 360.0 ) / Wx;
- Dy = ( (Ty - Cy) * 360.0 ) / Wy;
-
- ////// now let's get minutes, hours & directions from it
- Hx = (signed int) Dx; // get hours (cut off digits after comma, no idea if there's a cleaner/better way)
-
- Mx = Dx - Hx; // get minutes
- Mx = Mx * 60;
-
- Hy = (signed int) Dy;
- My = Dy - Hy;
- My = My * 60;
-
- // convert the results to ints;
- xH = (signed int) Hx;
- xM = (signed int) Mx;
- yH = (signed int) Hy;
- yM = (signed int) My;
-
- // now compose result string
-
- // numtostr(abs(xH),xHs);
- // numtostr(abs(xM),xMs);
- // numtostr(abs(yH),yHs);
- // numtostr(abs(yM),yMs);
-
- strcpy((char*)sextant, xHs);
- strcat((char*)sextant,"o ");
- strcat((char*)sextant, xMs);
- strcat((char*)sextant,"' ");
- if (xH>=0) strcat((char*)sextant,"E"); else strcat((char*)sextant,"W");
-
- strcat((char*)sextant, " ");
- strcat((char*)sextant, yHs);
- strcat((char*)sextant,"o ");
- strcat((char*)sextant, yMs);
- strcat((char*)sextant,"' ");
- if (yH>=0) strcat((char*)sextant,"S"); else strcat((char*)sextant,"N");
-
- }
void goldsfx( cUOSocket *socket, UINT16 amount, bool hearall )
{
--- 884,887 ----
***************
*** 1409,1411 ****
--- 1209,1282 ----
}
+ ///////////
+ // Name: inVisRange
+ // Purpose: checks if position 1 and 2 are in visual range
+ // history: by Duke, 18.11.2000
+ //
+ bool inVisRange(int x1, int y1, int x2, int y2)
+ {
+ return (QMAX(abs(x1-x2), abs(y1-y2)) <= VISRANGE);
+ }
+
+ bool inrange1p (PC_CHAR pca, P_CHAR pcb) // Are characters a and b in visual range
+ {
+ if (pca == NULL || pcb == NULL) return false;
+
+ return inVisRange(pca->pos().x, pca->pos().y, pcb->pos().x, pcb->pos().y);
+ }
+
+ ///////////
+ // Name: inRange
+ // Purpose: checks if position 1 and 2 are in given range
+ // history: by Duke, 19.11.2000
+ //
+ bool inRange(int x1, int y1, int x2, int y2, int range)
+ {
+ return (QMAX(abs(x1-x2), abs(y1-y2)) <= range);
+ }
+ void savelog(const char *msg, char *logfile)
+ {
+ FILE *file;
+ file = fopen( logfile, "a" );
+
+ QString logMessage = QString( "[%1] %2\n" ).arg( QDateTime::currentDateTime().toString() ).arg( msg );
+
+ // Remove newlines
+ logMessage = logMessage.replace( QRegExp( "\n" ), "" );
+
+ fprintf( file, "%s", logMessage.ascii() );
+
+ fclose( file );
+ }
+
+ int DeleBankItem( P_PLAYER pc, unsigned short itemid, unsigned short color, int amt )
+ {
+ if( pc == NULL )
+ return amt;
+
+ P_ITEM pBank = pc->getBankBox();
+
+ if( pBank )
+ return pBank->DeleteAmount( amt, itemid, color );
+ else
+ return 0;
+ }
+
+ void endmessage(int x) // If shutdown is initialized
+ {
+ x = 0;
+ unsigned int igetclock = uiCurrentTime;
+ if (endtime < igetclock)
+ endtime = igetclock;
+
+ QString message;
+
+ if( ( ( ( endtime - igetclock ) / MY_CLOCKS_PER_SEC ) / 60 ) < 1 )
+ message = tr( "Server going down in %1 secs." ).arg( ( endtime - igetclock ) / MY_CLOCKS_PER_SEC );
+ else
+ message = tr( "Server going down in %1 minutes." ).arg( ( ( endtime - igetclock ) / MY_CLOCKS_PER_SEC ) / 60 );
+
+ cNetwork::instance()->broadcast( message );
+ clConsole.send( message );
+ }
|
|
From: <dar...@us...> - 2003-09-02 02:15:28
|
Update of /cvsroot/wpdev/xmlscripts In directory sc8-pr-cvs1:/tmp/cvs-serv19201 Modified Files: definitions.xml Log Message: included creatures.xml Index: definitions.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions.xml,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** definitions.xml 19 Apr 2003 04:45:33 -0000 1.52 --- definitions.xml 2 Sep 2003 02:15:25 -0000 1.53 *************** *** 185,187 **** --- 185,190 ---- <!-- Encryption Keys --> <include file="definitions/encryption.xml" /> + + <!-- Creatures --> + <include file="definitions/creatures.xml"/> </definitions> |
|
From: <dar...@us...> - 2003-09-02 02:09:57
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv18382 Modified Files: wolf.dsp Log Message: Removed init_sounds Index: wolf.dsp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v retrieving revision 1.211 retrieving revision 1.212 diff -C2 -d -r1.211 -r1.212 *** wolf.dsp 2 Sep 2003 02:06:34 -0000 1.211 --- wolf.dsp 2 Sep 2003 02:09:41 -0000 1.212 *************** *** 43,47 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MD /GR /GX /O2 /Ob0 /I "lib/Python/PC" /I "lib/Python/include" /I "lib\ZThread\include" /I "$(QTDIR)\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ZTHREAD_SHARED" /D "QT_DLL" /D "QT_THREAD_SUPPORT" /Fr /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" --- 43,47 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MD /GR /GX /O2 /Ob0 /I "lib/Python/PC" /I "sqlite" /I "lib/Python/include" /I "lib\ZThread\include" /I "$(QTDIR)\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ZTHREAD_SHARED" /D "QT_DLL" /D "QT_THREAD_SUPPORT" /Fr /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" *************** *** 69,73 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /MD /Gm /GR /GX /ZI /Od /I "lib\bugreport" /I "$(QTDIR)\include" /D "_CONSOLE" /D "_MBCS" /D "_DEBUG" /D "WIN32" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /FR /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" --- 69,73 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /MD /Gm /GR /GX /ZI /Od /I "sqlite" /I "lib\bugreport" /I "$(QTDIR)\include" /D "_CONSOLE" /D "_MBCS" /D "_DEBUG" /D "WIN32" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /FR /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" |
|
From: <dar...@us...> - 2003-09-02 02:08:36
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1:/tmp/cvs-serv18105 Added Files: creatures.xml Log Message: Removed init_sounds --- NEW FILE: creatures.xml --- <definitions> <!-- BASESOUND: Offset of the sounds for the soundmode list below SOUNDMODES: 0: normal, 5 sounds (attack-started, idle, attack, defence, dying, see WOLFPACK.h) 1: birds .. only one "bird-shape" and zillions of sounds ... 2: only 3 sounds - /> (attack,defence,dying) 3: only 4 sounds - /> (attack-started,attack,defnce,dying) 4: only 1 sound !! FLAGS: Bit 1: Creature can Fly Bit 2: Anti-Blink (Creature is Missing Animation #4) SHRINK: Item id for the animal in shrinked form (numeric!) TYPE: 4: Anything Else 3: NPC (?) 2: Animals / Pets (Including all Mounts) 1: Sea Creature 0: Monster --> <charbase id="0x1" basesound="0x1ab" shrink="0x20df" /> <charbase id="0x2" basesound="0x16f" shrink="0x20d8" /> <charbase id="0x3" basesound="0x1d7" shrink="0x20ec" /> <charbase id="0x4" basesound="0x174" shrink="0x20d9" flags="0x1" /> <charbase id="0x5" basesound="0x8f" shrink="0x20f2" type="2" flags="0x3" /> <charbase id="0x6" basesound="0x7d" shrink="0x20ee" soundmode="1" type="2" flags="0x1" /> <charbase id="0x7" basesound="0x1b0" shrink="0x20e0" /> <charbase id="0x8" basesound="0x1ba" shrink="0x20d2" soundmode="3" /> <charbase id="0x9" basesound="0x165" shrink="0x20d3" flags="0x1" /> <charbase id="0xa" basesound="0x165" shrink="0x20d3" flags="0x1" /> <charbase id="0xb" basesound="0x183" shrink="0x20fd" /> <charbase id="0xc" basesound="0x16a" shrink="0x20d6" flags="0x1" /> <charbase id="0xd" basesound="0x107" shrink="0x20ed" /> <charbase id="0xe" basesound="0x10c" shrink="0x20d7" /> <charbase id="0xf" basesound="0x111" shrink="0x20f3" /> <charbase id="0x10" basesound="0x116" shrink="0x210b" /> <charbase id="0x11" basesound="0x1b0" shrink="0x20e0" /> <charbase id="0x12" basesound="0x16f" shrink="0x20d8" /> <charbase id="0x13" basesound="0x183" shrink="0x20fd" /> <charbase id="0x14" basesound="0x388" shrink="0x20fd" /> <charbase id="0x15" basesound="0xdb" shrink="0x20fe" /> <charbase id="0x16" basesound="0x179" shrink="0x20ea" /> <charbase id="0x17" basesound="0xe5" shrink="0x211c" type="2" /> <charbase id="0x18" basesound="0x19c" shrink="0x20f8" /> <charbase id="0x19" basesound="0xe5" shrink="0x211c" type="2" /> <charbase id="0x1a" basesound="0x17e" shrink="0x2109" /> <charbase id="0x1b" basesound="0xe5" shrink="0x211c" type="2" /> <charbase id="0x1c" basesound="0x183" shrink="0x20fd" /> <charbase id="0x1d" basesound="0x9e" shrink="0x20f5" type="2" /> <charbase id="0x1e" basesound="0x192" shrink="0x20dc" /> <charbase id="0x1f" basesound="0x197" shrink="0x210a" /> <charbase id="0x21" basesound="0x1a1" shrink="0x20de" /> <charbase id="0x22" basesound="0xe5" shrink="0x211c" type="2" /> <charbase id="0x23" basesound="0x1a1" shrink="0x20de" /> <charbase id="0x24" basesound="0x1a1" shrink="0x20de" /> <charbase id="0x25" basesound="0xe5" shrink="0x211c" type="2" /> <charbase id="0x26" basesound="0x2b8" shrink="0x2585" flags="0x1" /> <charbase id="0x27" basesound="0x1a6" shrink="0x20f9" flags="0x1" /> <charbase id="0x28" basesound="0x2b8" shrink="0x2586" flags="0x1" /> <charbase id="0x29" basesound="0x1b0" shrink="0x20e0" /> <charbase id="0x2a" basesound="0x1b5" shrink="0x20e3" /> <charbase id="0x2b" basesound="0x2b8" shrink="0x2587" flags="0x1" /> <charbase id="0x2c" basesound="0x1b5" shrink="0x20e3" /> <charbase id="0x2d" basesound="0x1b5" shrink="0x20e3" /> <charbase id="0x2e" basesound="0x16a" shrink="0x2104" flags="0x1" /> <charbase id="0x2f" basesound="0x1ba" shrink="0x20fa" /> <charbase id="0x30" basesound="0x18d" shrink="0x20e4" /> <charbase id="0x31" basesound="0x16a" shrink="0x2104" flags="0x1" /> <charbase id="0x32" basesound="0x1c4" shrink="0x20e7" /> <charbase id="0x33" basesound="0x1c8" shrink="0x20e8" /> <charbase id="0x34" basesound="0xdb" shrink="0x20fc" type="2" /> <charbase id="0x35" basesound="0x1cd" shrink="0x20e9" /> <charbase id="0x36" basesound="0x1cd" shrink="0x20e9" /> <charbase id="0x37" basesound="0x1cd" shrink="0x20e9" /> <charbase id="0x38" basesound="0x1c4" shrink="0x20e7" /> <charbase id="0x39" basesound="0x1c4" shrink="0x20e7" /> <charbase id="0x3a" basesound="0x1d2" shrink="0x2100" /> <charbase id="0x3b" basesound="0x16a" shrink="0x20d6" flags="0x1" /> <charbase id="0x3c" basesound="0x16a" shrink="0x20d6" flags="0x1" /> <charbase id="0x3d" basesound="0x16a" shrink="0x20d6" flags="0x1" /> <charbase id="0x3e" basesound="0x16a" shrink="0x25d4" flags="0x1" /> <charbase id="0x3f" basesound="0x73" shrink="0x2583" type="2" /> <charbase id="0x40" basesound="0x73" shrink="0x25a3" type="2" /> <charbase id="0x41" basesound="0x73" shrink="0x25a3" type="2" /> <charbase id="0x42" basesound="0x27f" shrink="0x25c8" /> <charbase id="0x43" basesound="0x174" shrink="0x258e" /> <charbase id="0x44" basesound="0x179" shrink="0x258f" /> <charbase id="0x45" basesound="0x36b" shrink="0x20f4" /> <charbase id="0x46" basesound="0x24e" shrink="0x25c9" /> <charbase id="0x47" basesound="0x24e" shrink="0x25ca" /> <charbase id="0x48" basesound="0x258" shrink="0x25cb" /> <charbase id="0x49" basesound="0x192" shrink="0x2594" flags="0x1" /> <charbase id="0x4a" basesound="0x3bf" shrink="0x259f" flags="0x1" /> <charbase id="0x4b" basesound="0x25c" shrink="0x212d" /> <charbase id="0x4c" basesound="0x261" shrink="0x25cd" /> <charbase id="0x4d" basesound="0x44c" shrink="0x25a2" /> <charbase id="0x4e" basesound="0x19c" shrink="0x20f8" /> <charbase id="0x4f" basesound="0x1a1" shrink="0x20f8" /> <charbase id="0x50" basesound="0x35a" shrink="0x212f" /> <charbase id="0x51" basesound="0x35f" shrink="0x2130" type="2" /> <charbase id="0x52" basesound="0x1a1" shrink="0x20f8" /> <charbase id="0x53" basesound="0x1ab" shrink="0x20cb" /> <charbase id="0x54" basesound="0x1ab" shrink="0x20cb" /> <charbase id="0x55" basesound="0x280" shrink="0x25ab" /> <charbase id="0x56" basesound="0x27b" shrink="0x25ac" /> <charbase id="0x57" basesound="0x285" shrink="0x25ad" /> <charbase id="0x58" basesound="0x99" shrink="0x2580" type="2" /> <charbase id="0x59" basesound="0x183" shrink="0x25c0" /> <charbase id="0x5a" basesound="0x183" shrink="0x25c1" /> <charbase id="0x5b" basesound="0x388" shrink="0x25c2" /> <charbase id="0x5c" basesound="0x388" shrink="0x25c2" /> <charbase id="0x5d" basesound="0x388" shrink="0x25c2" /> <charbase id="0x5e" basesound="0x1c8" shrink="0x20e8" /> <charbase id="0x60" basesound="0x1c8" shrink="0x20e8" /> <charbase id="0x61" basesound="0x85" shrink="0x2596" type="2" /> <charbase id="0x62" basesound="0x85" shrink="0x2596" type="2" /> <charbase id="0x63" basesound="0xe5" shrink="0x25cf" type="2" /> <charbase id="0x64" basesound="0xe5" shrink="0x25cf" type="2" /> <charbase id="0x65" basesound="0x2a7" shrink="0x2581" /> <charbase id="0x66" basesound="0x300" shrink="0x2105" flags="0x1" /> <charbase id="0x67" basesound="0x2c0" shrink="0x2593" flags="0x1" /> <charbase id="0x68" basesound="0x488" shrink="0x20d6" flags="0x1" /> <charbase id="0x69" basesound="0x2d2" shrink="0x20d6" flags="0x1" /> <charbase id="0x6a" basesound="0x2cd" shrink="0x20d6" flags="0x1" /> <charbase id="0x6b" basesound="0x10c" shrink="0x25d9" /> <charbase id="0x6c" basesound="0x10c" shrink="0x25d9" /> <charbase id="0x6d" basesound="0x10c" shrink="0x25d9" /> <charbase id="0x6e" basesound="0x10c" shrink="0x20d7" /> <charbase id="0x6f" basesound="0x10c" shrink="0x20d7" /> <charbase id="0x70" basesound="0x10c" shrink="0x20d7" /> <charbase id="0x71" basesound="0xa8" shrink="0x2121" type="2" /> <charbase id="0x72" basesound="0xa8" shrink="0x2120" type="2" /> <charbase id="0x73" basesound="0xa8" shrink="0x259c" type="2" /> <charbase id="0x74" basesound="0xa8" shrink="0x259d" type="2" /> <charbase id="0x75" basesound="0xa8" shrink="0x2121" type="2" /> <charbase id="0x76" basesound="0xa8" shrink="0x2121" type="2" /> <charbase id="0x77" basesound="0xa8" shrink="0x2121" type="2" /> <charbase id="0x78" basesound="0xa8" shrink="0x2121" type="2" /> <charbase id="0x79" basesound="0xa8" shrink="0x2121" type="2" /> <charbase id="0x7a" basesound="0x4bc" shrink="0x25ce" type="2" /> <charbase id="0x7b" basesound="0x2f5" shrink="0x2589" flags="0x1" /> <charbase id="0x7c" basesound="0x24d" shrink="0x258a" /> <charbase id="0x7d" basesound="0x27f" shrink="0x258b" /> <charbase id="0x7e" basesound="0x257" shrink="0x258b" /> <charbase id="0x7f" basesound="0x69" shrink="0x2597" type="2" /> <charbase id="0x80" basesound="0x46d" shrink="0x25b6" /> <charbase id="0x81" basesound="0x34e" shrink="0x25c8" /> <charbase id="0x82" basesound="0x174" shrink="0x20d9" /> <charbase id="0x83" basesound="0x370" shrink="0x2590" /> <charbase id="0x84" basesound="0x3c5" shrink="0x25a0" type="2" /> <charbase id="0x85" basesound="0x5a" shrink="0x211f" type="2" /> <charbase id="0x86" basesound="0x2c7" shrink="0x25a1" type="2" flags="0x1" /> <charbase id="0x87" basesound="0x1ab" shrink="0x25a8" /> <charbase id="0x88" basesound="0x280" shrink="0x25a9" /> <charbase id="0x89" basesound="0x27b" shrink="0x25aa" /> <charbase id="0x8a" basesound="0x459" shrink="0x25b0" /> <charbase id="0x8b" basesound="0x459" shrink="0x25b0" /> <charbase id="0x8c" basesound="0x1ab" shrink="0x25b1" /> <charbase id="0x8d" basesound="0x447" shrink="0x2106" /> <charbase id="0x8e" basesound="0x1b5" shrink="0x25b7" /> <charbase id="0x8f" basesound="0x1b5" shrink="0x25b7" /> <charbase id="0x90" basesound="0x478" shrink="0x25ba" type="1" /> <charbase id="0x91" basesound="0x3" shrink="0x20fb" type="1" /> <charbase id="0x92" basesound="0x47d" shrink="0x258a" /> <charbase id="0x93" basesound="0x48d" shrink="0x25bd" /> <charbase id="0x94" basesound="0x48d" shrink="0x25be" /> <charbase id="0x95" basesound="0x4b0" shrink="0x259f" /> <charbase id="0x96" basesound="0x3" shrink="0x20fb" type="1" /> <charbase id="0x97" basesound="0x8a" shrink="0x20f1" type="1" /> <charbase id="0x98" basesound="0x492" shrink="0x25ca" /> <charbase id="0x99" basesound="0x379" shrink="0x25c7" /> <charbase id="0x9a" basesound="0x1d7" shrink="0x25bb" /> <charbase id="0x9b" basesound="0x1d7" shrink="0x25a7" /> <charbase id="0x9d" basesound="0x388" shrink="0x25c3" /> <charbase id="0x9e" basesound="0x205" shrink="0x25d6" soundmode="2" /> <charbase id="0x9f" basesound="0x205" shrink="0x25d8" soundmode="2" /> <charbase id="0xa0" basesound="0x205" shrink="0x25d8" soundmode="2" /> <charbase id="0xa1" basesound="0x107" shrink="0x25da" /> <charbase id="0xa2" basesound="0x205" shrink="0x25db" soundmode="2" /> <charbase id="0xa3" basesound="0x10c" shrink="0x25dc" /> <charbase id="0xa4" basesound="0x107" shrink="0x25d8" /> <charbase id="0xa5" basesound="0x1d2" shrink="0x2100" /> <charbase id="0xa6" basesound="0x10c" shrink="0x25d9" /> <charbase id="0xa7" basesound="0x4c2" shrink="0x211e" type="2" /> <charbase id="0xa8" basesound="0x3bf" shrink="0x259f" /> <charbase id="0xaa" basesound="0x3f3" shrink="0x20f6" type="2" /> <charbase id="0xab" basesound="0xb7" shrink="0x25b4" soundmode="2" type="2" /> <charbase id="0xac" basesound="0x16a" shrink="0x20d6" flags="0x1" /> <charbase id="0xad" basesound="0x388" shrink="0x25c3" /> <charbase id="0xae" basesound="0x4b0" shrink="0x259f" flags="0x1" /> <charbase id="0xaf" basesound="0x2fa" shrink="0x2589" /> <charbase id="0xb0" basesound="0x46c" shrink="0x25b6" flags="0x1" /> <charbase id="0xb2" basesound="0xa8" shrink="0x259c" type="2" /> <charbase id="0xb3" basesound="0xa8" shrink="0x259c" type="2" /> <charbase id="0xb4" basesound="0x2c0" shrink="0x20d6" flags="0x1" /> <charbase id="0xb5" basesound="0x1b0" shrink="0x25af" /> <charbase id="0xb6" basesound="0x1b0" shrink="0x25b0" /> <charbase id="0xbb" basesound="0x365" shrink="0x25b2" type="2" /> <charbase id="0xbc" basesound="0x365" shrink="0x25b2" type="2" /> <charbase id="0xbd" basesound="0x45a" shrink="0x25b0" /> <charbase id="0xc8" basesound="0xa8" shrink="0x211f" type="2" /> <charbase id="0xc9" basesound="0x69" shrink="0x211b" type="2" flags="0x2" /> <charbase id="0xca" basesound="0x5a" shrink="0x20da" type="2" /> <charbase id="0xcb" basesound="0xc4" shrink="0x2101" type="2" /> <charbase id="0xcc" basesound="0xa8" shrink="0x2121" type="2" /> <charbase id="0xcd" basesound="0xc9" shrink="0x2125" soundmode="2" type="2" /> <charbase id="0xcf" basesound="0xd6" shrink="0x20eb" type="2" /> <charbase id="0xd0" basesound="0x6e" shrink="0x20d1" type="2" /> <charbase id="0xd1" basesound="0x99" shrink="0x20e6" type="2" /> <charbase id="0xd3" basesound="0x5f" shrink="0x20cf" type="2" /> <charbase id="0xd4" basesound="0x5f" shrink="0x20db" type="2" /> <charbase id="0xd5" basesound="0x5f" shrink="0x20e1" type="2" /> <charbase id="0xd6" basesound="0xba" shrink="0x2119" type="2" flags="0x2" /> <charbase id="0xd7" basesound="0x188" shrink="0x20d0" /> <charbase id="0xd8" basesound="0x78" shrink="0x20f0" type="2" /> <charbase id="0xd9" basesound="0x85" shrink="0x20d5" type="2" /> <charbase id="0xda" basesound="0x3f5" shrink="0x25b3" type="2" /> <charbase id="0xdb" basesound="0x3f5" shrink="0x25b4" type="2" /> <charbase id="0xdc" basesound="0xb7" shrink="0x20f6" soundmode="2" type="2" /> <charbase id="0xdd" basesound="0xe0" shrink="0x20ff" type="1" /> <charbase id="0xdf" basesound="0xd8" shrink="0x20e6" soundmode="2" type="2" /> <charbase id="0xe1" basesound="0xe5" shrink="0x20ea" type="2" flags="0x2" /> <charbase id="0xe2" basesound="0xa8" shrink="0x2124" type="2" /> <charbase id="0xe4" basesound="0xa8" shrink="0x2120" type="2" /> <charbase id="0xe7" basesound="0x78" shrink="0x20f0" type="2" flags="0x2" /> <charbase id="0xe8" basesound="0x64" shrink="0x20ef" type="2" flags="0x2" /> <charbase id="0xe9" basesound="0x78" shrink="0x2103" type="2" flags="0x2" /> <charbase id="0xea" basesound="0x82" shrink="0x20d4" soundmode="2" type="2" /> <charbase id="0xed" basesound="0x82" shrink="0x20d4" soundmode="2" type="2" /> <charbase id="0xee" basesound="0xcc" shrink="0x2123" type="2" /> <charbase id="0x122" basesound="0xc4" shrink="0x2101" type="2" /> <charbase id="0x123" basesound="0xa8" shrink="0x2126" type="2" /> <charbase id="0x124" basesound="0xb7" shrink="0x2127" soundmode="2" type="2" /> <charbase id="0x190" basesound="0x0" shrink="0x2106" /> <charbase id="0x191" basesound="0x0" shrink="0x2107" /> <charbase id="0x192" basesound="0x0" shrink="0x25f0" /> <charbase id="0x193" basesound="0x0" shrink="0x25f1" /> <charbase id="0x23d" basesound="0x107" /> <charbase id="0x23e" basesound="0x200" soundmode="4" /> <charbase id="0x2f0" basesound="0x10c" shrink="0x25b1" /> <charbase id="0x2f1" basesound="0x174" shrink="0x258d" flags="0x1" /> <charbase id="0x2f2" basesound="0x174" shrink="0x258d" flags="0x1" /> <charbase id="0x2f3" basesound="0x174" shrink="0x258d" flags="0x1" /> <charbase id="0x2f4" basesound="0x36d" shrink="0x258f" /> <charbase id="0x2f5" basesound="0x36d" shrink="0x258f" /> <charbase id="0x2f6" basesound="0x174" shrink="0x258d" flags="0x1" /> <charbase id="0x2fb" basesound="0x36d" shrink="0x258f" /> <charbase id="0x307" basesound="0x351" shrink="0x20e8" /> <charbase id="0x308" basesound="0x35f" shrink="0x212f" /> <charbase id="0x309" basesound="0x456" shrink="0x25d5" /> <charbase id="0x30a" basesound="0x36d" shrink="0x258f" /> <charbase id="0x30b" basesound="0x2f8" shrink="0x20d7" /> <charbase id="0x30c" basesound="0x300" shrink="0x2582" /> <charbase id="0x30d" basesound="0x346" shrink="0x25c9" /> <charbase id="0x30e" basesound="0x346" shrink="0x25ca" /> <charbase id="0x30f" basesound="0x346" shrink="0x25cb" /> <charbase id="0x310" basesound="0x165" shrink="0x2585" /> <charbase id="0x311" basesound="0x2b8" shrink="0x2586" /> <charbase id="0x312" basesound="0x388" shrink="0x25c3" /> <charbase id="0x313" basesound="0x18d" shrink="0x25b9" /> <charbase id="0x314" basesound="0x3ee" shrink="0x25cf" /> <charbase id="0x315" basesound="0x451" shrink="0x25c4" /> <charbase id="0x316" basesound="0x28f" shrink="0x25d9" /> <charbase id="0x317" basesound="0x2bd" shrink="0x25c3" type="2" /> <charbase id="0x318" basesound="0x165" shrink="0x2584" /> <charbase id="0x319" basesound="0xa8" shrink="0x259b" type="2" /> <charbase id="0x31a" basesound="0x16a" shrink="0x2593" type="2" flags="0x1" /> <charbase id="0x31b" basesound="0x2b9" shrink="0x2584" /> <charbase id="0x31c" basesound="0x2b9" shrink="0x2584" /> <charbase id="0x31d" basesound="0x111" shrink="0x20d6" flags="0x1" /> <charbase id="0x31e" basesound="0x16a" shrink="0x20d6" flags="0x1" /> <charbase id="0x31f" basesound="0x16a" shrink="0x20d6" type="2" flags="0x1" /> <charbase id="0x334" basesound="0xa8" shrink="0x2598" type="2" /> <charbase id="0x338" basesound="0xa8" shrink="0x259a" type="2" /> <charbase id="0x339" basesound="0x3f5" shrink="0x25b2" type="2" /> <charbase id="0x33a" basesound="0x3f5" shrink="0x25b3" type="2" /> <charbase id="0x33b" basesound="0x3f5" shrink="0x25b4" type="2" /> <charbase id="0x33c" basesound="0xb7" shrink="0x20f6" soundmode="2" type="2" /> <charbase id="0x33f" basesound="0xbf" shrink="0x211a" type="2" /> <charbase id="0x340" basesound="0x2ee" shrink="0x20f2" type="2" /> <charbase id="0x341" basesound="0x275" shrink="0x211a" type="2" /> <charbase id="0x342" basesound="0x2a2" shrink="0x2597" type="2" /> <charbase id="0x343" basesound="0xc9" shrink="0x2125" soundmode="2" type="2" /> <charbase id="0x345" basesound="0xdb" shrink="0x25c0" type="2" /> <charbase id="0x346" basesound="0xdb" shrink="0x25c1" type="2" /> <charbase id="0x347" basesound="0x365" shrink="0x25b2" type="2" /> <charbase id="0x348" basesound="0x365" shrink="0x25b2" type="2" /> <charbase id="0x349" basesound="0x365" shrink="0x25b2" type="2" /> <charbase id="0x34a" basesound="0x365" shrink="0x25b2" type="2" /> <charbase id="0x34b" basesound="0xcc" shrink="0x2123" type="2" /> <charbase id="0x34e" basesound="0xa8" shrink="0x2599" type="2" /> <charbase id="0x350" basesound="0xa8" shrink="0x259e" type="2" /> <charbase id="0x3e6" basesound="0xa8" shrink="0x25a0" type="2" /> </definitions> |
|
From: <dar...@us...> - 2003-09-02 02:07:28
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv17965
Added Files:
basedef.cpp basedef.h
Log Message:
Removed init_sounds
--- NEW FILE: basedef.cpp ---
#include "basedef.h"
#include "globals.h"
#include "wpdefmanager.h"
#include "prototypes.h"
#include <string.h>
cCharBaseDef *cBaseDefManager::getCharBaseDef( unsigned short id )
{
if( id >= 0x400 )
return 0;
return chardefs[ id ];
}
void cBaseDefManager::load()
{
for( unsigned int i = 0; i < 0x400; ++i )
{
// Check for <basechar id="">
const cElement *element = DefManager->getDefinition( WPDT_CHARBASE, "0x" + QString::number( i, 16 ) );
if( !element )
{
chardefs[i] = 0;
continue;
}
chardefs[i] = new cCharBaseDef;
chardefs[i]->basesound_ = hex2dec( element->getAttribute( "basesound", "0" ) ).toUShort();
chardefs[i]->soundmode_ = hex2dec( element->getAttribute( "soundmode", "0" ) ).toUShort();
chardefs[i]->shrinked_ = hex2dec( element->getAttribute( "shrinked", "0" ) ).toUShort();
chardefs[i]->flags_ = hex2dec( element->getAttribute( "flags", "0" ) ).toUInt();
chardefs[i]->type_ = hex2dec( element->getAttribute( "type", "0" ) ).toUShort();
}
}
void cBaseDefManager::unload()
{
unsigned short i = 0;
while( i < 0x400 )
delete chardefs[i++];
memset( &chardefs, 0, 0x400 * sizeof( cCharBaseDef* ) );
}
--- NEW FILE: basedef.h ---
#if !defined( __BASEDEF_H__ )
#define __BASEDEF_H__
#include "singleton.h"
/*
Class which contains information about characters that never changes.
*/
class cCharBaseDef
{
friend class cBaseDefManager;
protected:
// Sounds
unsigned short basesound_;
unsigned char soundmode_;
unsigned short shrinked_;
unsigned int flags_;
unsigned char type_;
public:
cCharBaseDef() {}
virtual ~cCharBaseDef() {}
// Getters ONLY
// These are READONLY PROPERTIES!
unsigned short basesound() const { return basesound_; }
unsigned char soundmode() const { return soundmode_; }
unsigned short shrinked() const { return shrinked_; }
unsigned int flags() const { return flags_; }
unsigned char type() const { return type_; }
};
class cBaseDefManager
{
protected:
cCharBaseDef *chardefs[0x400]; // 0x400 entries in anim.idx
public:
cBaseDefManager() {}
virtual ~cBaseDefManager() {}
cCharBaseDef *getCharBaseDef( unsigned short id );
void load();
void reload()
{
unload();
load();
}
void unload();
};
typedef SingletonHolder< cBaseDefManager > BaseDefManager;
#endif
|
|
From: <dar...@us...> - 2003-09-02 02:06:41
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv17837
Modified Files:
Timing.cpp combat.cpp globals.cpp globals.h makemenus.cpp
prototypes.h structs.h tracking.cpp wolf.dsp wolfpack.cpp
wolfpack.pro wpdefmanager.cpp wpdefmanager.h
Log Message:
Removed init_sounds
Index: Timing.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/Timing.cpp,v
retrieving revision 1.176
retrieving revision 1.177
diff -C2 -d -r1.176 -r1.177
*** Timing.cpp 30 Aug 2003 21:30:05 -0000 1.176
--- Timing.cpp 2 Sep 2003 02:06:33 -0000 1.177
***************
*** 345,359 ****
}
*/
-
- if( SrvParams->bgSound() >= 1 )
- {
- timer = SrvParams->bgSound() * 100;
- if( timer == 0 )
- timer = 1;
-
- if( socket && !pc->isDead() && ( (rand()%(timer) ) == (timer/2)))
- bgsound( pc );
- }
-
/*
// Reset spirit-speak
--- 345,348 ----
Index: combat.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/combat.cpp,v
retrieving revision 1.144
retrieving revision 1.145
diff -C2 -d -r1.144 -r1.145
*** combat.cpp 28 Aug 2003 20:56:16 -0000 1.144
--- combat.cpp 2 Sep 2003 02:06:34 -0000 1.145
***************
*** 53,56 ****
--- 53,57 ----
#include "npc.h"
#include "chars.h"
+ #include "basedef.h"
#include "debug.h"
***************
*** 83,87 ****
if( !pChar->isHuman() )
{
! id = creatures[ pChar->bodyID() ].basesound + RandomNum( 0, 1 );
break;
}
--- 84,91 ----
if( !pChar->isHuman() )
{
! cCharBaseDef *def = BaseDefManager::instance()->getCharBaseDef( pChar->bodyID() );
!
! if( def != 0 )
! id = def->basesound() + RandomNum( 0, 1 );
break;
}
***************
*** 103,107 ****
}
! pChar->soundEffect( id );
}
--- 107,112 ----
}
! if( id != 0 )
! pChar->soundEffect( id );
}
***************
*** 1092,1096 ****
{
UINT8 action = 4 + RandomNum( 0, 2 ); // some creatures dont have animation #4
! if( creatures[id].who_am_i & 0x2 ) // anti blink bit set ?
{
action++;
--- 1097,1103 ----
{
UINT8 action = 4 + RandomNum( 0, 2 ); // some creatures dont have animation #4
! cCharBaseDef *def = BaseDefManager::instance()->getCharBaseDef( id );
!
! if( def && def->flags() & 0x2 ) // anti blink bit set ?
{
action++;
Index: globals.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/globals.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -d -r1.98 -r1.99
*** globals.cpp 21 Aug 2003 05:04:35 -0000 1.98
--- globals.cpp 2 Sep 2003 02:06:34 -0000 1.99
***************
*** 54,61 ****
WPConsole_cl clConsole;
- unsigned short int doorbase[DOORTYPES]={
- 0x0675, 0x0685, 0x0695, 0x06A5, 0x06B5, 0x06C5, 0x06D5, 0x06E5, 0x0839, 0x084C,
- 0x0866, 0x00E8, 0x0314, 0x0324, 0x0334, 0x0344, 0x0354};
-
time_t oldtime, newtime;
--- 54,57 ----
***************
*** 139,147 ****
/// and the rest /
///////////////////////////////////////////
! creat_st creatures[2048];
!
! int npcshape[5]; //Stores the coords of the bouding shape for the NPC
!
! std::vector<std::string> clientsAllowed; // client version controll system
/////////////////////////////////////////
--- 135,139 ----
/// and the rest /
///////////////////////////////////////////
! std::vector<std::string> clientsAllowed; // client version controll system
/////////////////////////////////////////
Index: globals.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/globals.h,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -d -r1.72 -r1.73
*** globals.h 21 Aug 2003 05:04:35 -0000 1.72
--- globals.h 2 Sep 2003 02:06:34 -0000 1.73
***************
*** 117,130 ****
/******************************************************/
- ///////////////////////////////////////////
- /// and the rest /
- ///////////////////////////////////////////
-
- extern unsigned short int doorbase[DOORTYPES];
-
- extern creat_st creatures[2048]; //LB, stores the base-sound+sound flags of monsters, animals
-
- extern int npcshape[5]; //Stores the coords of the bouding shape for the NPC
-
/////////////////////////////////////////
///////////// global string vars /////////
--- 117,120 ----
Index: makemenus.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/makemenus.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** makemenus.cpp 27 Aug 2003 21:43:57 -0000 1.56
--- makemenus.cpp 2 Sep 2003 02:06:34 -0000 1.57
***************
*** 39,42 ****
--- 39,43 ----
#include "srvparams.h"
#include "python/utilities.h"
+ #include "basedef.h"
#include "debug.h"
***************
*** 1084,1088 ****
else if( TagName == "bodymodel" )
! model_ = creatures[ Value.toUShort() ].icon;
}
--- 1085,1092 ----
else if( TagName == "bodymodel" )
! {
! cCharBaseDef *bdef = BaseDefManager::instance()->getCharBaseDef( Value.toUShort() );
! model_ = bdef != 0 ? bdef->shrinked() : 0;
! }
}
***************
*** 1954,1958 ****
{
// generate cMakeAction object for the npc definition...
! cMakeAction* pNpc = new cMakeAction( current, creatures[model].icon, description, cMakeAction::NPC_SECTION, currentBaseMenu );
if( pNpc )
{
--- 1958,1965 ----
{
// generate cMakeAction object for the npc definition...
! cCharBaseDef *bdef = BaseDefManager::instance()->getCharBaseDef( model );
! model = bdef != 0 ? bdef->shrinked() : 0;
!
! cMakeAction* pNpc = new cMakeAction( current, model, description, cMakeAction::NPC_SECTION, currentBaseMenu );
if( pNpc )
{
Index: prototypes.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/prototypes.h,v
retrieving revision 1.103
retrieving revision 1.104
diff -C2 -d -r1.103 -r1.104
*** prototypes.h 27 Aug 2003 21:43:57 -0000 1.103
--- prototypes.h 2 Sep 2003 02:06:34 -0000 1.104
***************
*** 46,50 ****
QString hex2dec( const QString& value );
- extern void init_creatures(void);
void showPaperdoll( cUOSocket *socket, P_CHAR pTarget, bool hotkey );
void savelog(const char *msg, char *logfile);
--- 46,49 ----
***************
*** 61,69 ****
void delequan(P_CHAR pc, short id, int amount, int *not_deleted = NULL);
void playmonstersound(P_CHAR monster, unsigned short id, int sfx);
- void sellaction(int s);
-
- void clearalltrades();
- void trademsg(int s);
- void dotrade(P_ITEM cont1, P_ITEM cont2);
bool inVisRange(int x1, int y1, int x2, int y2);
--- 60,63 ----
***************
*** 71,76 ****
int DeleBankItem( P_PLAYER pc, unsigned short itemid, unsigned short color, int amt );
void getSextantCords(signed int x, signed int y, bool t2a, char *sextant);
- void bgsound(P_CHAR pc);
- int hexnumber(int countx);
int lineOfSight( const Coord_cl&, const Coord_cl&, int checkfor );
void reloadScripts();
--- 65,68 ----
Index: structs.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/structs.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** structs.h 20 Aug 2003 19:46:01 -0000 1.35
--- structs.h 2 Sep 2003 02:06:34 -0000 1.36
***************
*** 64,76 ****
};
- struct creat_st
- {
- int basesound;
- unsigned char soundflag;
- unsigned char who_am_i;
- int icon;
- unsigned char type;
- };
-
struct location_st
{
--- 64,67 ----
Index: tracking.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/tracking.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** tracking.cpp 20 Aug 2003 17:10:48 -0000 1.16
--- tracking.cpp 2 Sep 2003 02:06:34 -0000 1.17
***************
*** 42,45 ****
--- 42,46 ----
#include "basechar.h"
#include "player.h"
+ #include "basedef.h"
class cRefreshTracking: public cTempEffect
***************
*** 164,168 ****
}
! addTilePic( (pAmount*100)+20, 20, creatures[ pChar->bodyID() ].icon );
addButton( (pAmount*100)+20, 110, 0xFA5, 0xFA7, pChar->serial() );
addCroppedText( (pAmount*100)+20, 90, 100, 40, pChar->name() );
--- 165,173 ----
}
! cCharBaseDef *def = BaseDefManager::instance()->getCharBaseDef( pChar->bodyID() );
!
! if( def && def->shrinked() != 0 )
! addTilePic( (pAmount*100)+20, 20, def->shrinked() );
!
addButton( (pAmount*100)+20, 110, 0xFA5, 0xFA7, pChar->serial() );
addCroppedText( (pAmount*100)+20, 90, 100, 40, pChar->name() );
Index: wolf.dsp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v
retrieving revision 1.210
retrieving revision 1.211
diff -C2 -d -r1.210 -r1.211
*** wolf.dsp 1 Sep 2003 05:03:04 -0000 1.210
--- wolf.dsp 2 Sep 2003 02:06:34 -0000 1.211
***************
*** 1,23 ****
# Microsoft Developer Studio Project File - Name="wolf" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
! # ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=wolf - Win32 Debug
! !MESSAGE This is not a valid makefile. To build this project using NMAKE,
! !MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak".
!MESSAGE
! !MESSAGE You can specify a configuration when running NMAKE
! !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak" CFG="wolf - Win32 Debug"
!MESSAGE
! !MESSAGE Possible choices for configuration are:
!MESSAGE
! !MESSAGE "wolf - Win32 Release" (based on "Win32 (x86) Console Application")
! !MESSAGE "wolf - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
--- 1,23 ----
# Microsoft Developer Studio Project File - Name="wolf" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
! # ** NICHT BEARBEITEN **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=wolf - Win32 Debug
! !MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
! !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak".
!MESSAGE
! !MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
! !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak" CFG="wolf - Win32 Debug"
!MESSAGE
! !MESSAGE Für die Konfiguration stehen zur Auswahl:
!MESSAGE
! !MESSAGE "wolf - Win32 Release" (basierend auf "Win32 (x86) Console Application")
! !MESSAGE "wolf - Win32 Debug" (basierend auf "Win32 (x86) Console Application")
!MESSAGE
***************
*** 26,30 ****
# PROP Scc_ProjName "wolf"
# PROP Scc_LocalPath "."
! CPP=xicl6.exe
RSC=rc.exe
--- 26,30 ----
# PROP Scc_ProjName "wolf"
# PROP Scc_LocalPath "."
! CPP=cl.exe
RSC=rc.exe
***************
*** 50,54 ****
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt312.lib libmysql.lib /nologo /subsystem:console /map /machine:I386 /nodefaultlib:"libcmt MSVCRTD" /out:"D:\wolfpack\wolfpack.exe" /libpath:"lib\ZThread\lib" /libpath:"lib\Python\lib" /libpath:"lib\bugreport\lib" /libpath:"flatstore\Release" /opt:ref /opt:nowin98
--- 50,54 ----
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt312.lib libmysql.lib /nologo /subsystem:console /map /machine:I386 /nodefaultlib:"libcmt MSVCRTD" /out:"D:\wolfpack\wolfpack.exe" /libpath:"lib\ZThread\lib" /libpath:"lib\Python\lib" /libpath:"lib\bugreport\lib" /libpath:"flatstore\Release" /opt:ref /opt:nowin98
***************
*** 75,81 ****
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
! # ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt320.lib libmysql.lib /nologo /version:12.9 /subsystem:console /map /debug /machine:I386 /out:"..\Wolfpack.exe" /pdbtype:sept /libpath:"lib\bugreport\lib" /libpath:"flatstore\Debug"
# SUBTRACT LINK32 /pdb:none
--- 75,81 ----
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
! # ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt312.lib /nologo /version:12.9 /subsystem:console /map /debug /machine:I386 /out:"..\Wolfpack.exe" /pdbtype:sept /libpath:"lib\bugreport\lib" /libpath:"flatstore\Debug"
# SUBTRACT LINK32 /pdb:none
***************
*** 115,118 ****
--- 115,122 ----
# Begin Source File
+ SOURCE=.\basedef.cpp
+ # End Source File
+ # Begin Source File
+
SOURCE=.\basics.cpp
# End Source File
***************
*** 389,392 ****
--- 393,400 ----
SOURCE=.\basechar.h
# PROP Ignore_Default_Tool 1
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\basedef.h
# End Source File
# Begin Source File
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.447
retrieving revision 1.448
diff -C2 -d -r1.447 -r1.448
*** wolfpack.cpp 2 Sep 2003 01:07:44 -0000 1.447
--- wolfpack.cpp 2 Sep 2003 02:06:34 -0000 1.448
***************
*** 71,74 ****
--- 71,75 ----
#include "ai.h"
#include "sectors.h"
+ #include "basedef.h"
// Library Includes
***************
*** 766,771 ****
endtime = 0;
lclock = 0;
[...1174 lines suppressed...]
- case 2: basesound=288;break; // bigfoot 2
- case 3: basesound=639;break; // old snake sound
- case 4: basesound=179;break; // lion sound
- case 5: basesound=246;break; // mystic
- case 6: basesound=253;break; // mystic II
- }
-
- if (basesound !=0)
- {
- /*sfx[2] = (unsigned char) (basesound>>8);
- sfx[3] = (unsigned char) (basesound%256);
- sfx[6] = (unsigned char) (pc->pos().x>>8);
- sfx[7] = (unsigned char) (pc->pos().x%256);
- sfx[8] = (unsigned char) (pc->pos().y>>8);
- sfx[9] = (unsigned char) (pc->pos().y%256);
- Xsend(calcSocketFromChar(pc), sfx, 12); //bugfix LB*/
- }
}
}
--- 1149,1152 ----
Index: wolfpack.pro
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v
retrieving revision 1.143
retrieving revision 1.144
diff -C2 -d -r1.143 -r1.144
*** wolfpack.pro 2 Sep 2003 01:27:57 -0000 1.143
--- wolfpack.pro 2 Sep 2003 02:06:34 -0000 1.144
***************
*** 59,62 ****
--- 59,63 ----
basics.h \
basechar.h \
+ basedef.h \
boats.h \
coord.h \
***************
*** 126,129 ****
--- 127,131 ----
ai_vendors.cpp \
basechar.cpp \
+ basedef.cpp \
basics.cpp \
boats.cpp \
Index: wpdefmanager.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** wpdefmanager.cpp 20 Jul 2003 00:04:51 -0000 1.59
--- wpdefmanager.cpp 2 Sep 2003 02:06:34 -0000 1.60
***************
*** 38,41 ****
--- 38,42 ----
#include "commands.h"
#include "encryption.h"
+ #include "basedef.h"
// Library Includes
***************
*** 79,82 ****
--- 80,84 ----
{ "contextmenu", WPDT_CONTEXTMENU },
{ "ai", WPDT_AI },
+ { "charbase", WPDT_CHARBASE },
{ 0, WPDT_COUNT },
};
***************
*** 263,266 ****
--- 265,270 ----
impl->imports.clear();
+
+ BaseDefManager::instance()->unload();
}
***************
*** 289,292 ****
--- 293,297 ----
cCommands::instance()->loadACLs();
+ BaseDefManager::instance()->load();
}
Index: wpdefmanager.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** wpdefmanager.h 20 Jul 2003 00:04:51 -0000 1.30
--- wpdefmanager.h 2 Sep 2003 02:06:34 -0000 1.31
***************
*** 71,74 ****
--- 71,75 ----
WPDT_CONTEXTMENU,
WPDT_AI,
+ WPDT_CHARBASE,
WPDT_COUNT
};
|
|
From: <dar...@us...> - 2003-09-02 02:06:37
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv17837/python
Modified Files:
global.cpp
Log Message:
Removed init_sounds
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** global.cpp 2 Sep 2003 01:07:44 -0000 1.82
--- global.cpp 2 Sep 2003 02:06:34 -0000 1.83
***************
*** 59,62 ****
--- 59,63 ----
#include "../targetrequests.h"
#include "../utilsys.h"
+ #include "../basedef.h"
#include "pypacket.h"
***************
*** 1038,1041 ****
--- 1039,1070 ----
}
+ static PyObject* wpCharBase( PyObject* self, PyObject* args )
+ {
+ Q_UNUSED(self);
+ unsigned short id;
+
+ if( !PyArg_ParseTuple( args, "h:wolfpack.charbase( id )", &id ) )
+ return 0;
+
+ cCharBaseDef *def = BaseDefManager::instance()->getCharBaseDef( id );
+
+ if( !def )
+ {
+ Py_XINCREF( Py_None );
+ return Py_None;
+ }
+
+ // Create a Dictionary
+ PyObject *dict = PyDict_New();
+
+ PyDict_SetItemString( dict, "basesound", PyInt_FromLong( def->basesound() ) );
+ PyDict_SetItemString( dict, "soundmode", PyInt_FromLong( def->soundmode() ) );
+ PyDict_SetItemString( dict, "shrinked", PyInt_FromLong( def->shrinked() ) );
+ PyDict_SetItemString( dict, "flags", PyInt_FromLong( def->flags() ) );
+ PyDict_SetItemString( dict, "type", PyInt_FromLong( def->type() ) );
+
+ return dict;
+ }
+
static PyObject* wpPacket( PyObject* self, PyObject* args )
{
***************
*** 1094,1097 ****
--- 1123,1127 ----
{ "isclosing", wpIsClosing, METH_NOARGS, "Returns if the server is in closing state" },
{ "tickcount", wpTickcount, METH_NOARGS, "Returns the current Tickcount on Windows" },
+ { "charbase", wpCharBase, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL } // Terminator
};
|
|
From: <thi...@us...> - 2003-09-02 01:07:48
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv8062
Modified Files:
dbdriver.cpp dbdriver.h persistentbroker.cpp wolfpack.cpp
wpconsole.cpp
Log Message:
Some fixes for MySQL driver
Index: dbdriver.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbdriver.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** dbdriver.cpp 1 Sep 2003 21:14:20 -0000 1.19
--- dbdriver.cpp 2 Sep 2003 01:07:44 -0000 1.20
***************
*** 67,90 ****
/* dummy functions */
- cDBDriver::~cDBDriver() {}
- bool cDBDriver::open( int id ) { return true; }
- void cDBDriver::close() {}
- cDBResult cDBDriver::query( const QString &query ) { return cDBResult( NULL, NULL ); }
bool cDBDriver::exec( const QString &query ) { return true; }
void cDBDriver::lockTable( const QString& table ) {}
void cDBDriver::unlockTable( const QString& table ) {}
QString cDBDriver::error() { return QString::null; }
-
void cDBDriver::setActiveConnection( int id )
{
- if( connections.find( id ) == connections.end() )
- {
- connection = NULL;
- open( id );
- }
- else
- {
- connection = connections[ id ];
- }
}
--- 67,76 ----
***************
*** 332,335 ****
--- 318,334 ----
{
return QString::null;
+ }
+ }
+
+ void cMySQLDriver::setActiveConnection( int id )
+ {
+ if( connections.find( id ) == connections.end() )
+ {
+ connection = NULL;
+ open( id );
+ }
+ else
+ {
+ connection = connections[ id ];
}
}
Index: dbdriver.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbdriver.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** dbdriver.h 1 Sep 2003 21:14:20 -0000 1.12
--- dbdriver.h 2 Sep 2003 01:07:44 -0000 1.13
***************
*** 50,54 ****
friend class cDBResult;
protected:
- std::map< int, st_mysql* > connections;
void *connection;
--- 50,53 ----
***************
*** 60,71 ****
public:
cDBDriver() : connection(0) {}
! virtual ~cDBDriver();
virtual const char *name() const { return NULL; }
! virtual bool open( int id = CONN_MAIN );
! virtual void close();
virtual bool exec( const QString &query ); // Just execute some SQL code, no return!
! virtual cDBResult query( const QString &query ); // Executes a query
virtual void lockTable( const QString& table );
virtual void unlockTable( const QString& table );
--- 59,70 ----
public:
cDBDriver() : connection(0) {}
! virtual ~cDBDriver() {};
virtual const char *name() const { return NULL; }
! virtual bool open( int id = CONN_MAIN ) = 0;
! virtual void close() = 0;
virtual bool exec( const QString &query ); // Just execute some SQL code, no return!
! virtual cDBResult query( const QString &query ) = 0; // Executes a query
virtual void lockTable( const QString& table );
virtual void unlockTable( const QString& table );
***************
*** 73,77 ****
// Setters + Getters
! void setActiveConnection( int id = CONN_MAIN );
void setUserName( const QString &data ) { _username = data; }
void setPassword( const QString &data ) { _password = data; }
--- 72,76 ----
// Setters + Getters
! virtual void setActiveConnection( int id = CONN_MAIN );
void setUserName( const QString &data ) { _username = data; }
void setPassword( const QString &data ) { _password = data; }
***************
*** 105,108 ****
--- 104,108 ----
class cMySQLDriver : public cDBDriver
{
+ std::map< int, st_mysql* > connections;
public:
const char *name() const { return "mysql"; }
***************
*** 117,121 ****
void unlockTable( const QString& table );
QString error();
!
bool exec( const QString &query );
cDBResult query( const QString &query );
--- 117,121 ----
void unlockTable( const QString& table );
QString error();
! void setActiveConnection( int id );
bool exec( const QString &query );
cDBResult query( const QString &query );
Index: persistentbroker.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/persistentbroker.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** persistentbroker.cpp 1 Sep 2003 21:14:20 -0000 1.20
--- persistentbroker.cpp 2 Sep 2003 01:07:44 -0000 1.21
***************
*** 67,71 ****
else if( driver == "mysql" )
{
! connection = new cDBDriver;
sqlite = false;
}
--- 67,71 ----
else if( driver == "mysql" )
{
! connection = new cMySQLDriver;
sqlite = false;
}
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.446
retrieving revision 1.447
diff -C2 -d -r1.446 -r1.447
*** wolfpack.cpp 30 Aug 2003 17:00:10 -0000 1.446
--- wolfpack.cpp 2 Sep 2003 01:07:44 -0000 1.447
***************
*** 715,718 ****
--- 715,719 ----
if( !persistentBroker->openDriver( SrvParams->databaseDriver() ) )
{
+ clConsole.log( LOG_FATAL, QString("Error trying to open %1 database driver, check your wolfpack.xml").arg(SrvParams->databaseDriver()) );
exit( -1 );
}
Index: wpconsole.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wpconsole.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** wpconsole.cpp 4 Jul 2003 16:30:48 -0000 1.23
--- wpconsole.cpp 2 Sep 2003 01:07:44 -0000 1.24
***************
*** 143,147 ****
{
if (errorstrm != NULL)
! (*errorstrm) << sMessage;
}
--- 143,147 ----
{
if (errorstrm != NULL)
! (*errorstrm) << sMessage.latin1();
}
|
|
From: <thi...@us...> - 2003-09-02 01:07:48
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv8062/python
Modified Files:
global.cpp
Log Message:
Some fixes for MySQL driver
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -d -r1.81 -r1.82
*** global.cpp 29 Aug 2003 18:11:00 -0000 1.81
--- global.cpp 2 Sep 2003 01:07:44 -0000 1.82
***************
*** 687,696 ****
{
Q_UNUSED(self);
! if ( !checkArgInt(0) )
! {
! PyErr_BadArgument();
return 0;
! }
! return Map->hasMap( getArgInt(0) ) ? PyTrue : PyFalse;
}
--- 687,695 ----
{
Q_UNUSED(self);
! uint map = 0;
! if( !PyArg_ParseTuple( args, "i:wolfpack.hasmap", &map ) )
return 0;
!
! return Map->hasMap( map ) ? PyTrue : PyFalse;
}
***************
*** 814,828 ****
Q_UNUSED(self);
! if( !checkArgInt( 0 ) || !checkArgInt( 1 ) || !checkArgInt( 2 ) || !checkArgInt( 3 ) )
! {
! PyErr_BadArgument();
return 0;
- }
! Coord_cl pos;
! pos.x = getArgInt( 0 );
! pos.y = getArgInt( 1 );
! pos.z = getArgInt( 2 );
! pos.map = getArgInt( 3 );
return PyGetCoordObject( pos );
--- 813,822 ----
Q_UNUSED(self);
! uint x = 0, y = 0, z = 0;
! uchar map = 0;
! if( !PyArg_ParseTuple( args, "iiib:wolfpack.coord", &x, &y, &z, &map ) )
return 0;
! Coord_cl pos( x, y, z, map );
return PyGetCoordObject( pos );
***************
*** 836,845 ****
Q_UNUSED( self);
! if( !checkArgInt( 0 ) )
! {
! PyErr_BadArgument();
return 0;
! }
! uint type = getArgInt( 0 );
P_MULTI pMulti = NULL;
--- 830,837 ----
Q_UNUSED( self);
! uint type = 0;
! if( !PyArg_ParseTuple( args, "i:wolfpack.multi", &type ) )
return 0;
!
P_MULTI pMulti = NULL;
|
|
From: <dar...@us...> - 2003-09-01 23:07:00
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv22264 Removed Files: line.cpp line.h Log Message: Aaaaaaand removing it right away again. --- line.cpp DELETED --- --- line.h DELETED --- |
|
From: <dar...@us...> - 2003-09-01 22:15:42
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands In directory sc8-pr-cvs1:/tmp/cvs-serv14044/wolfpack/commands Modified Files: info.py Log Message: blabla Index: info.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands/info.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** info.py 28 Aug 2003 20:47:57 -0000 1.8 --- info.py 1 Sep 2003 22:15:11 -0000 1.9 *************** *** 560,565 **** gump.addText( 50, 120, "Name:", 0x834 ) gump.addInputField( 200, 120, 200, 16, 0x834, 1, item.name ) - gump.addText( 50, 140, "Name (identified):", 0x834 ) - gump.addInputField( 200, 140, 200, 16, 0x834, 2, item.name2 ) gump.addText( 50, 160, "ID:", 0x834 ) gump.addInputField( 200, 160, 200, 16, 0x834, 3, hex( item.id ) ) --- 560,563 ---- *************** *** 576,581 **** gump.addText( 50, 280, "Layer:", 0x834 ) gump.addInputField( 200, 280, 200, 16, 0x834, 9, str( item.layer ) ) - gump.addText( 50, 300, "Good:", 0x834 ) - gump.addInputField( 200, 300, 200, 16, 0x834, 10, str( item.good ) ) gump.addText( 310, 340, "Page "+str( page_ )+" of "+str( pages ), 0x834 ) --- 574,577 ---- *************** *** 611,620 **** gump.addText( 50, 240, "High damage:", 0x834 ) gump.addInputField( 200, 240, 200, 16, 0x834, 17, str( item.hidamage ) ) - gump.addText( 50, 260, "Str (required):", 0x834 ) - gump.addInputField( 200, 260, 200, 16, 0x834, 18, str( item.strength ) ) - gump.addText( 50, 280, "Dex (required):", 0x834 ) - gump.addInputField( 200, 280, 200, 16, 0x834, 19, str( item.dexterity ) ) - gump.addText( 50, 300, "Int (required):", 0x834 ) - gump.addInputField( 200, 300, 200, 16, 0x834, 20, str( item.intelligence ) ) gump.addText( 310, 340, "Page "+str( page_ )+" of "+str( pages ), 0x834 ) --- 607,610 ---- *************** *** 638,643 **** #gump.addResizeGump( 195, 300, 0xBB8, 215, 20 ) - gump.addText( 50, 120, "Dyable:", 0x834 ) - gump.addInputField( 200, 120, 200, 16, 0x834, 21, str( item.dye ) ) gump.addText( 50, 140, "Decay:", 0x834 ) gump.addInputField( 200, 140, 200, 16, 0x834, 22, str( item.decay ) ) --- 628,631 ---- *************** *** 648,653 **** gump.addText( 50, 200, "Visible:", 0x834 ) gump.addInputField( 200, 200, 200, 16, 0x834, 25, str( item.visible ) ) - gump.addText( 50, 220, "Rank:", 0x834 ) - gump.addInputField( 200, 220, 200, 16, 0x834, 26, str( item.rank ) ) gump.addText( 50, 240, "Price:", 0x834 ) if ( item.hastag( 'price' ) ): --- 636,639 ---- *************** *** 680,685 **** gump.addResizeGump( 195, 300, 0xBB8, 215, 20 ) - gump.addText( 50, 120, "Disabled:", 0x834 ) - gump.addInputField( 200, 120, 200, 16, 0x834, 31, str( item.disabled ) ) gump.addText( 50, 140, "Time unused:", 0x834 ) gump.addInputField( 200, 140, 200, 16, 0x834, 32, str( item.timeunused ) ) --- 666,669 ---- |
|
From: <dar...@us...> - 2003-09-01 22:15:42
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv14044 Modified Files: book.py Log Message: blabla Index: book.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/book.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** book.py 30 Aug 2003 17:07:59 -0000 1.1 --- book.py 1 Sep 2003 22:15:11 -0000 1.2 *************** *** 30,41 **** # Author / Title author = '' ! title = '' if item.hastag( 'author' ): author = str( item.gettag( 'author' ) ) ! ! if item.hastag( 'title' ): ! title = str( item.gettag( 'title' ) ) ! # Calculate Packet Length packetlength = 15 + len( author ) + 1 + len( title ) + 1 --- 30,38 ---- # Author / Title author = '' ! title = item.name if item.hastag( 'author' ): author = str( item.gettag( 'author' ) ) ! # Calculate Packet Length packetlength = 15 + len( author ) + 1 + len( title ) + 1 *************** *** 118,120 **** item.settag( 'author', author ) ! item.settag( 'title', title ) --- 115,117 ---- item.settag( 'author', author ) ! item.name = title |
|
From: <ri...@us...> - 2003-09-01 20:39:18
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands
In directory sc8-pr-cvs1:/tmp/cvs-serv28237/scripts/wolfpack/commands
Modified Files:
import.py
Log Message:
import fixes
Index: import.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands/import.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** import.py 26 Aug 2003 03:53:05 -0000 1.3
--- import.py 1 Sep 2003 20:39:14 -0000 1.4
***************
*** 122,127 ****
line = line.replace( "\n", "" )
! # SECTION WORLDITEM : 18 byte (including space)
! if line[:18] == 'SECTION WORLDITEM ':
item = {}
--- 122,127 ----
line = line.replace( "\n", "" )
! # SECTION WORLDITEM : 17 byte
! if line[:17] == 'SECTION WORLDITEM':
item = {}
***************
*** 152,167 ****
if not item.has_key( 'ID' ):
! warnings += 'Item (%s) has no ID property. Skipping.' % ( serial )
continue
id = int( item['ID'] )
! if not item.has_key( 'X' ) or not item.has_key( 'Y' ) or not item.has_key( 'Z' ):
! warnings += 'Item (Serial: %s, ID: %x) has no X,Y or Z property. Skipping.' % ( serial, id )
continue
!
! x = int( item['X'] )
! y = int( item['Y'] )
! z = int( item['Z'] )
color = 0
--- 152,172 ----
if not item.has_key( 'ID' ):
! warnings += 'Item (%s) has no ID property. Skipping.<br>' % ( serial )
continue
id = int( item['ID'] )
! if not item.has_key( 'X' ) or not item.has_key( 'Y' ):
! warnings += 'Item (Serial: %s, ID: %x) has no X or Y property. Skipping.<br>' % ( serial, id )
continue
! x = 0
! y = 0
! z = 0
! if item.has_key('X'):
! x = int( item['X'] )
! if item.has_key('Y'):
! y = int( item['Y'] )
! if item.has_key('Z'):
! z = int( item['Z'] )
color = 0
***************
*** 170,174 ****
if item.has_key( 'CONT' ) and item[ 'CONT' ] != '-1':
! warnings += 'Item (Serial: %s, ID: %x) is contained in container %s. Skipping' % ( serial, id, item[ 'CONT' ] )
continue
--- 175,179 ----
if item.has_key( 'CONT' ) and item[ 'CONT' ] != '-1':
! # warnings += 'Item (Serial: %s, ID: %x) is contained in container %s. Skipping' % ( serial, id, item[ 'CONT' ] )
continue
***************
*** 181,188 ****
name = item[ 'NAME' ]
! #warnings += 'Item %x, Color %x, Pos %i,%i,%i<br>' % ( id, color, x, y, z )
# REMEMBER: Set them to nodecay!!!
! newitem = wolfpack.newitem( 1 ) # Generate a new serial for us
newitem.decay = 0
--- 186,196 ----
name = item[ 'NAME' ]
! #print 'Item %x, Color %x, Pos %i,%i,%i<br>' % ( id, color, x, y, z )
# REMEMBER: Set them to nodecay!!!
! newitem = wolfpack.additem( "%x" % hex2dec( id ) ) # Generate a new serial for us
!
! if not newitem:
! newitem = wolfpack.newitem( 1 ) # Generate a new serial for us
newitem.decay = 0
***************
*** 190,194 ****
newitem.id = id
newitem.amount = amount
! newitem.name = name
newitem.moveto( x, y, z, map )
newitem.update()
--- 198,203 ----
newitem.id = id
newitem.amount = amount
! if name != "#":
! newitem.name = name
newitem.moveto( x, y, z, map )
newitem.update()
***************
*** 196,200 ****
count += 1
! elif line[:18] == 'SECTION WORLDCHAR ':
warning += "Found character in import file. Importing characters is not allowed.<br>"
--- 205,209 ----
count += 1
! elif line[:17] == 'SECTION WORLDCHAR':
warning += "Found character in import file. Importing characters is not allowed.<br>"
|
|
From: <dar...@us...> - 2003-09-01 14:08:46
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv20850
Added Files:
line.cpp line.h
Log Message:
Copied a handy class from NowWizard...
Calculates the Coordinates *between* two coordinates (including the raising or falling z level). Handy for Line of Sight.
--- NEW FILE: line.cpp ---
/*!
This code has been taken from NoxWizard's map.cpp/map.h
*/
#include "line.h"
#include "coord.h"
cLine::cLine( const Coord_cl &A, const Coord_cl &B )
{
m_xDist = (short)( A.x - B.x );
m_yDist = (short)( A.y - B.y );
m_zDist = (short)( A.z - B.z );
x1 = A.x;
y1 = A.y;
z1 = A.z;
map = A.map;
}
char cLine::calcZAtX( unsigned short x )
{
char z;
z = (char)( ( (float)( ( (short)(x - x1) * m_zDist ) + (z1 * m_xDist) ) / (float)( m_xDist ) ) + 0.5);
return z;
}
Coord_cl cLine::getPosAtX( unsigned short x )
{
Coord_cl pos( x, 0, 0, map );
pos.y = (unsigned short)( ( (float)( ( (short)(x - x1) * m_yDist ) + ( (short)(y1) * m_xDist) ) / (float)( m_xDist ) ) + 0.5);
pos.z = calcZAtX( pos.x );
return pos;
}
Coord_cl cLine::getPosAtY( unsigned short y )
{
Coord_cl pos( 0, y, 0, map );
pos.x = (unsigned short)( ( (float)( ( (short)(y - y1) * m_xDist ) + ( (short)(x1) * m_yDist) ) / (float)( m_yDist ) ) + 0.5);
pos.z = calcZAtX( pos.x );
return pos;
}
--- NEW FILE: line.h ---
/*
This code has been readapted from NoxWizard
*/
#if !defined( __LINE_H__ )
#define __LINE_H__
class Coord_cl;
class cLine
{
public:
cLine( const Coord_cl &A, const Coord_cl &B );
Coord_cl getPosAtX( unsigned short x );
Coord_cl getPosAtY( unsigned short y );
char calcZAtX( unsigned short x );
private:
unsigned short x1, y1;
char z1;
unsigned char map;
unsigned short m_xDist, m_yDist, m_zDist;
};
#endif
|
|
From: <thi...@us...> - 2003-09-01 05:03:07
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv1724
Modified Files:
commands.cpp sectors.cpp targetrequests.h wolf.dsp
Log Message:
moved 'nuke to python script. Also made 'wipe an alias to it.
Index: commands.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v
retrieving revision 1.196
retrieving revision 1.197
diff -C2 -d -r1.196 -r1.197
*** commands.cpp 31 Aug 2003 20:06:42 -0000 1.196
--- commands.cpp 1 Sep 2003 05:03:03 -0000 1.197
***************
*** 1018,1030 ****
}
- void commandNuke( cUOSocket *socket, const QString &command, QStringList &args ) throw()
- {
- Q_UNUSED(args);
- Q_UNUSED(command);
- // Nuke does not take any parameters (At least for now it does not.)
- socket->sysMessage( tr( "Please select first corner of the box you want to nuke." ) );
- socket->attachTarget( new cNukeTarget );
- }
-
void commandTile( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
--- 1018,1021 ----
***************
*** 1248,1252 ****
{ "MAKEMENU", commandMakeMenu },
{ "MOVE", commandMove },
- { "NUKE", commandNuke },
{ "PAGES", commandPages },
{ "PAGENOTIFY", commandPageNotify },
--- 1239,1242 ----
Index: sectors.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/sectors.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** sectors.cpp 20 Aug 2003 17:16:00 -0000 1.13
--- sectors.cpp 1 Sep 2003 05:03:03 -0000 1.14
***************
*** 14,17 ****
--- 14,18 ----
#include <math.h>
+ #include <algorithm>
// 8 uses more memory but is faster
***************
*** 386,389 ****
--- 387,397 ----
unsigned int gridSize = sector->gridWidth() * sector->gridHeight();
unsigned int xBlock, yBlock;
+
+ if ( x1 > x2 )
+ {
+ std::swap(x1, x2);
+ std::swap(y1, y2);
+ }
+
for( xBlock = x1 / SECTOR_SIZE; xBlock <= x2 / SECTOR_SIZE; xBlock++ )
Index: targetrequests.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/targetrequests.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** targetrequests.h 28 Aug 2003 20:56:16 -0000 1.44
--- targetrequests.h 1 Sep 2003 05:03:03 -0000 1.45
***************
*** 574,640 ****
};
- class cNukeTarget: public cTargetRequest
- {
- Q_OBJECT
- private:
- INT16 x1, y1;
- public:
- cNukeTarget( INT16 _x1 = -1, INT16 _y1 = -1 ): x1( _x1 ), y1( _y1 ) {}
-
- virtual bool responsed( cUOSocket *socket, cUORxTarget *target )
- {
- // Set the first corner and readd ourself
- if( x1 == -1 || y1 == -1 )
- {
- x1 = target->x();
- y1 = target->y();
- socket->sysMessage( tr( "Please select the second corner of the box you want to nuke." ) );
- return false;
- }
- else
- {
- INT16 x2;
- if( target->x() < x1 )
- {
- x2 = x1;
- x1 = target->x();
- }
- else
- x2 = target->x();
-
- INT16 y2;
- if( target->y() < y1 )
- {
- y2 = y1;
- y1 = target->y();
- }
- else
- y2 = target->y();
-
- socket->sysMessage( tr( "Nuking from %1,%2 to %3,%4" ).arg( x1 ).arg( y1 ).arg( x2 ).arg( y2 ) );
- UINT16 dCount = 0;
- std::vector< P_ITEM > toDelete;
-
- // This could eventually be optimized
- cItemIterator iter;
- for( P_ITEM pItem = iter.first(); pItem; pItem = iter.next() )
- {
- if( pItem && pItem->isInWorld() && pItem->pos().x >= x1 && pItem->pos().x <= x2 && pItem->pos().y >= y1 && pItem->pos().y <= y2 )
- {
- // Delete the item
- toDelete.push_back( pItem );
- dCount++;
- }
- }
-
- for( std::vector< P_ITEM >::iterator sIter = toDelete.begin(); sIter != toDelete.end(); ++sIter )
- (*sIter)->remove();
-
- socket->sysMessage( tr( "Deleted %1 items." ).arg( dCount ) );
- return true;
- }
- }
- };
-
class cTileTarget: public cTargetRequest
{
--- 574,577 ----
Index: wolf.dsp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v
retrieving revision 1.209
retrieving revision 1.210
diff -C2 -d -r1.209 -r1.210
*** wolf.dsp 30 Aug 2003 17:00:09 -0000 1.209
--- wolf.dsp 1 Sep 2003 05:03:04 -0000 1.210
***************
*** 1,23 ****
# Microsoft Developer Studio Project File - Name="wolf" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
! # ** NICHT BEARBEITEN **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=wolf - Win32 Debug
! !MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
! !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak".
!MESSAGE
! !MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
! !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak" CFG="wolf - Win32 Debug"
!MESSAGE
! !MESSAGE Für die Konfiguration stehen zur Auswahl:
!MESSAGE
! !MESSAGE "wolf - Win32 Release" (basierend auf "Win32 (x86) Console Application")
! !MESSAGE "wolf - Win32 Debug" (basierend auf "Win32 (x86) Console Application")
!MESSAGE
--- 1,23 ----
# Microsoft Developer Studio Project File - Name="wolf" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
! # ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=wolf - Win32 Debug
! !MESSAGE This is not a valid makefile. To build this project using NMAKE,
! !MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak".
!MESSAGE
! !MESSAGE You can specify a configuration when running NMAKE
! !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "wolf.mak" CFG="wolf - Win32 Debug"
!MESSAGE
! !MESSAGE Possible choices for configuration are:
!MESSAGE
! !MESSAGE "wolf - Win32 Release" (based on "Win32 (x86) Console Application")
! !MESSAGE "wolf - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
***************
*** 26,30 ****
# PROP Scc_ProjName "wolf"
# PROP Scc_LocalPath "."
! CPP=cl.exe
RSC=rc.exe
--- 26,30 ----
# PROP Scc_ProjName "wolf"
# PROP Scc_LocalPath "."
! CPP=xicl6.exe
RSC=rc.exe
***************
*** 50,54 ****
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt312.lib libmysql.lib /nologo /subsystem:console /map /machine:I386 /nodefaultlib:"libcmt MSVCRTD" /out:"D:\wolfpack\wolfpack.exe" /libpath:"lib\ZThread\lib" /libpath:"lib\Python\lib" /libpath:"lib\bugreport\lib" /libpath:"flatstore\Release" /opt:ref /opt:nowin98
--- 50,54 ----
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt312.lib libmysql.lib /nologo /subsystem:console /map /machine:I386 /nodefaultlib:"libcmt MSVCRTD" /out:"D:\wolfpack\wolfpack.exe" /libpath:"lib\ZThread\lib" /libpath:"lib\Python\lib" /libpath:"lib\bugreport\lib" /libpath:"flatstore\Release" /opt:ref /opt:nowin98
***************
*** 75,81 ****
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
! # ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt312.lib libmysql.lib /nologo /version:12.9 /subsystem:console /map /debug /machine:I386 /out:"..\Wolfpack.exe" /pdbtype:sept /libpath:"lib\bugreport\lib" /libpath:"flatstore\Debug"
# SUBTRACT LINK32 /pdb:none
--- 75,81 ----
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
! LINK32=xilink6.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
! # ADD LINK32 kernel32.lib user32.lib advapi32.lib ws2_32.lib $(QTDIR)\lib\qt-mt320.lib libmysql.lib /nologo /version:12.9 /subsystem:console /map /debug /machine:I386 /out:"..\Wolfpack.exe" /pdbtype:sept /libpath:"lib\bugreport\lib" /libpath:"flatstore\Debug"
# SUBTRACT LINK32 /pdb:none
***************
*** 120,127 ****
SOURCE=.\boats.cpp
- # End Source File
- # Begin Source File
-
- SOURCE=.\books.cpp
# End Source File
# Begin Source File
--- 120,123 ----
|
|
From: <thi...@us...> - 2003-09-01 04:56:48
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands
In directory sc8-pr-cvs1:/tmp/cvs-serv669/wolfpack/commands
Added Files:
wipe.py
Log Message:
moved 'nuke to python script. Also made 'wipe an alias to it.
--- NEW FILE: wipe.py ---
#===============================================================#
# ) (\_ | WOLFPACK 13.0.0 Scripts #
# (( _/{ "-; | Created by: Correa #
# )).-' {{ ;'` | Revised by: #
# ( ( ;._ \\ ctr | Last Modification: Created #
#===============================================================#
# .wipe/nuke Commands #
#===============================================================#
import wolfpack
import string
import wolfpack.gumps
from wolfpack.gumps import *
from wolfpack.utilities import *
from wolfpack import *
def getBoundingBox( socket, callback ) :
socket.attachtarget( "wolfpack.commands.wipe.getBoundingBoxResponse", [0, callback] )
def getBoundingBoxResponse( char, args, target ):
if args[0] == 0:
char.socket.attachtarget("wolfpack.commands.wipe.getBoundingBoxResponse", [1, args[1], target] )
else:
args[1]( char.socket, args[2], target )
def onLoad():
wolfpack.registercommand( "wipe", "wolfpack.commands.wipe" )
wolfpack.registercommand( "nuke", "wolfpack.commands.wipe" )
def onCommand( socket, command, argstring ):
if len( argstring ) > 0:
socket.sysmessage( "Argument handling not implemented [yet]")
else:
socket.sysmessage("Select the area to remove")
getBoundingBox( socket, wipeBoundingBox )
return 1
def wipeBoundingBox( socket, target1, target2 ):
count = 0
iterator = wolfpack.itemregion( target1.pos.x, target1.pos.y, target2.pos.x, target2.pos.y, target2.pos.map )
item = iterator.first
while item:
item.delete()
item = iterator.next
count += 1;
socket.sysmessage( "%i items removed" % count )
return 1
|
|
From: <thi...@us...> - 2003-09-01 04:56:48
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv669/wolfpack Modified Files: utilities.py Log Message: moved 'nuke to python script. Also made 'wipe an alias to it. Index: utilities.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/utilities.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** utilities.py 21 Jul 2003 14:29:24 -0000 1.15 --- utilities.py 1 Sep 2003 04:56:44 -0000 1.16 *************** *** 155,159 **** if item.id in clothes: return 1 - else: return 0 --- 155,158 ---- *************** *** 167,171 **** if item.id in hats: return 1 - else: return 0 --- 166,169 ---- *************** *** 188,192 **** if item.id in armors: return 1 - else: return 0 --- 186,189 ---- *************** *** 198,202 **** if item.type in weapontypes: return 1 - else: return 0 --- 195,198 ---- *************** *** 208,212 **** if item.id in shields: return 1 - else: return 0 --- 204,207 ---- *************** *** 217,224 **** if item.id in sbids and item.type in sbtypes: return 1 - else: ! return 0 def isinstrument( item ): return item.id in [ 0xE9C, 0xE9D, 0xE9E, 0xEB1, 0xEB2, 0xEB3, 0xEB4 ] --- 212,219 ---- if item.id in sbids and item.type in sbtypes: return 1 else: ! return 0 def isinstrument( item ): return item.id in [ 0xE9C, 0xE9D, 0xE9E, 0xEB1, 0xEB2, 0xEB3, 0xEB4 ] + |
|
From: <thi...@us...> - 2003-09-01 04:56:14
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1:/tmp/cvs-serv600 Modified Files: scripts.xml Log Message: moved 'nuke to python script. Also made 'wipe an alias to it. Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** scripts.xml 30 Aug 2003 17:07:34 -0000 1.56 --- scripts.xml 1 Sep 2003 04:56:10 -0000 1.57 *************** *** 36,44 **** <script>wolfpack.commands.action</script> <script>wolfpack.commands.bank</script> <script>wolfpack.commands.export</script> <script>wolfpack.commands.import</script> <script>wolfpack.commands.info</script> <script>wolfpack.commands.where</script> ! <script>wolfpack.commands.decoration</script> <!-- Magic --> --- 36,45 ---- <script>wolfpack.commands.action</script> <script>wolfpack.commands.bank</script> + <script>wolfpack.commands.decoration</script> <script>wolfpack.commands.export</script> <script>wolfpack.commands.import</script> <script>wolfpack.commands.info</script> <script>wolfpack.commands.where</script> ! <script>wolfpack.commands.wipe</script> <!-- Magic --> |
|
From: <dar...@us...> - 2003-08-31 20:06:47
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv17417
Modified Files:
accounts.cpp accounts.h commands.cpp player.cpp
Log Message:
Added ability to toggle gm mode by using
.staff
Index: accounts.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/accounts.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** accounts.cpp 11 Jun 2003 10:54:06 -0000 1.62
--- accounts.cpp 31 Aug 2003 20:06:42 -0000 1.63
***************
*** 189,192 ****
--- 189,197 ----
}
+ bool AccountRecord::isStaff() const
+ {
+ return flags_&0x00000020;
+ }
+
void AccountRecord::setBlocked( bool data )
{
***************
*** 227,230 ****
--- 232,243 ----
else
flags_ &= 0xFFFFFFEF;
+ }
+
+ void AccountRecord::setStaff( bool data )
+ {
+ if( data )
+ flags_ |= 0x00000020;
+ else
+ flags_ &= 0xFFFFFFDF;
}
Index: accounts.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/accounts.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** accounts.h 24 May 2003 12:44:01 -0000 1.28
--- accounts.h 31 Aug 2003 20:06:42 -0000 1.29
***************
*** 72,75 ****
--- 72,76 ----
// 0x00000008 showserials
// 0x00000010 pagenotify
+ // 0x00000020 staff - gm mode on/off
UINT32 flags_;
int attempts_;
***************
*** 114,117 ****
--- 115,119 ----
bool isShowSerials() const;
bool isPageNotify() const;
+ bool isStaff() const;
void setBlocked( bool data );
***************
*** 120,123 ****
--- 122,126 ----
void setShowSerials( bool data );
void setPageNotify( bool data );
+ void setStaff( bool data );
};
Index: commands.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v
retrieving revision 1.195
retrieving revision 1.196
diff -C2 -d -r1.195 -r1.196
*** commands.cpp 20 Aug 2003 17:10:48 -0000 1.195
--- commands.cpp 31 Aug 2003 20:06:42 -0000 1.196
***************
*** 830,833 ****
--- 830,848 ----
}
+ void commandStaff( cUOSocket *socket, const QString &command, QStringList &args ) throw()
+ {
+ Q_UNUSED(command);
+ if( socket->account()->isStaff() || ( args.count() > 0 && args[0].toInt() == 0 ) )
+ {
+ socket->account()->setStaff( false );
+ socket->sysMessage( tr( "Staff is now '0'." ) );
+ }
+ else if( !socket->account()->isStaff() || ( args.count() > 0 && args[0].toInt() == 1 ) )
+ {
+ socket->account()->setStaff( true );
+ socket->sysMessage( tr( "Staff is now '1'." ) );
+ }
+ }
+
void commandReload( cUOSocket *socket, const QString &command, QStringList &args ) throw()
{
***************
*** 1249,1252 ****
--- 1264,1268 ----
{ "SHOWSERIALS", commandShowSerials },
{ "SHUTDOWN", commandShutDown },
+ { "STAFF", commandStaff },
{ "SPAWNREGION", commandSpawnRegion },
{ "TAGS", commandTags },
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** player.cpp 28 Aug 2003 20:56:16 -0000 1.32
--- player.cpp 31 Aug 2003 20:06:42 -0000 1.33
***************
*** 828,837 ****
bool cPlayer::isGM() const
{
! return account() && ( account()->acl() == "admin" || account()->acl() == "gm" );
}
bool cPlayer::isCounselor() const
{
! return account() && account()->acl() == "counselor";
}
--- 828,837 ----
bool cPlayer::isGM() const
{
! return account() && ( account()->acl() == "admin" || account()->acl() == "gm" ) && account()->isStaff();
}
bool cPlayer::isCounselor() const
{
! return account() && ( account()->acl() == "counselor" ) && account()->isStaff();
}
|