wpdev-commits Mailing List for Wolfpack Emu (Page 194)
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
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv32559
Modified Files:
Timing.cpp Timing.h Trade.cpp Trade.h ai.cpp basedef.cpp
basedef.h basics.h boats.cpp chars.h combat.cpp commands.cpp
contextmenu.cpp coord.cpp customtags.cpp dbl_single_click.cpp
dragdrop.cpp encryption.cpp globals.cpp globals.h gumps.cpp
house.cpp house.h itemid.cpp items.cpp makemenus.cpp npc.cpp
pagesystem.h platform.h player.cpp prototypes.h
pythonscript.cpp scriptmanager.cpp scriptmanager.h
serbinfile.cpp serxmlfile.cpp skills.cpp spawnregions.cpp
speech.cpp speech.h targetactions.cpp targetrequests.cpp
targetrequests.h tmpeff.cpp tracking.cpp typedefs.h
uobject.cpp walking.cpp walking.h wolf.dsp wolfpack.cpp
wolfpack.pro
Removed Files:
debug.cpp debug.h storage.cpp storage.h
Log Message:
Removed wolfpack.h
Index: Timing.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/Timing.cpp,v
retrieving revision 1.177
retrieving revision 1.178
diff -C2 -d -r1.177 -r1.178
*** Timing.cpp 2 Sep 2003 02:06:33 -0000 1.177
--- Timing.cpp 7 Sep 2003 19:07:46 -0000 1.178
***************
*** 53,56 ****
--- 53,59 ----
#include "chars.h"
#include "ai.h"
+ #include "inlines.h"
+ #include "world.h"
+ #include "utilsys.h"
// Library Includes
***************
*** 251,256 ****
{
decayed_houses++;
- sprintf((char*)temp,"%s decayed! not refreshed for > %i seconds!\n",pi->name().ascii(), SrvParams->housedecay_secs());
- LogMessage((char*)temp);
(dynamic_cast< cHouse* >(pi))->remove();
}
--- 254,257 ----
***************
*** 351,355 ****
*/
! #pragma note("TODO: jail reimplementation with python")
/*
// Jail stuff
--- 352,356 ----
*/
! #pragma message("TODO: jail reimplementation with python")
/*
// Jail stuff
Index: Timing.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/Timing.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Timing.h 12 Jan 2003 18:11:31 -0000 1.10
--- Timing.h 7 Sep 2003 19:07:46 -0000 1.11
***************
*** 33,53 ****
#define __TIMING_H__
- //Platform specifics
- #include "platform.h"
-
- //system includes
-
- #include <iostream>
-
- //Forward Class Decl
-
-
- //Wolfpack Includes
-
- #include "wolfpack.h"
- #include "basics.h"
- #include "utilsys.h"
- #include "debug.h"
-
void checkauto(); // Check automatic/timer controlled stuff (Like fighting and regeneration)
void checktimers(); // Check shutdown timers
--- 33,36 ----
Index: Trade.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/Trade.cpp,v
retrieving revision 1.87
retrieving revision 1.88
diff -C2 -d -r1.87 -r1.88
*** Trade.cpp 3 Sep 2003 20:58:16 -0000 1.87
--- Trade.cpp 7 Sep 2003 19:07:46 -0000 1.88
***************
*** 43,47 ****
--- 43,50 ----
#include "basechar.h"
#include "player.h"
+ #include "world.h"
+ #include "wpconsole.h"
#include "network.h"
+ #include "items.h"
#include "network/uorxpackets.h"
#include "network/uotxpackets.h"
Index: Trade.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/Trade.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** Trade.h 3 Sep 2003 20:58:17 -0000 1.16
--- Trade.h 7 Sep 2003 19:07:46 -0000 1.17
***************
*** 35,38 ****
--- 35,39 ----
//Platform specifics
#include "platform.h"
+ #include "inlines.h"
//system includes
***************
*** 40,46 ****
// Wolfpack includes
- #include "wolfpack.h"
#include "itemid.h"
- #include "debug.h"
class cUORxBuy;
--- 41,45 ----
Index: ai.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ai.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** ai.cpp 3 Sep 2003 14:44:21 -0000 1.16
--- ai.cpp 7 Sep 2003 19:07:46 -0000 1.17
***************
*** 40,43 ****
--- 40,45 ----
#include "walking.h"
#include "itemid.h"
+ #include "items.h"
+ #include "wpconsole.h"
#include "world.h"
Index: basedef.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basedef.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** basedef.cpp 2 Sep 2003 02:32:19 -0000 1.2
--- basedef.cpp 7 Sep 2003 19:07:46 -0000 1.3
***************
*** 1,2 ****
--- 1,32 ----
+ //==================================================================================
+ //
+ // Wolfpack Emu (WP)
+ // UO Server Emulation Program
+ //
+ // Copyright 1997, 98 by Marcus Rating (Cironian)
+ // 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 "basedef.h"
***************
*** 4,7 ****
--- 34,38 ----
#include "wpdefmanager.h"
#include "prototypes.h"
+ #include "basics.h"
#include <string.h>
Index: basedef.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basedef.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** basedef.h 2 Sep 2003 02:32:19 -0000 1.2
--- basedef.h 7 Sep 2003 19:07:46 -0000 1.3
***************
*** 1,2 ****
--- 1,32 ----
+ //==================================================================================
+ //
+ // Wolfpack Emu (WP)
+ // UO Server Emulation Program
+ //
+ // Copyright 1997, 98 by Marcus Rating (Cironian)
+ // 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/
+ //==================================================================================
#if !defined( __BASEDEF_H__ )
Index: basics.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basics.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** basics.h 12 Jan 2003 18:11:31 -0000 1.14
--- basics.h 7 Sep 2003 19:07:46 -0000 1.15
***************
*** 79,82 ****
--- 79,84 ----
int RandomNum(int nLowNum, int nHighNum);
+ QString hex2dec( const QString& value );
+
float RandomFloatNum(float nLowNum, float nHighNum);
Index: boats.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/boats.cpp,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -d -r1.112 -r1.113
*** boats.cpp 5 Sep 2003 00:03:45 -0000 1.112
--- boats.cpp 7 Sep 2003 19:07:46 -0000 1.113
***************
*** 50,53 ****
--- 50,54 ----
#include "player.h"
#include "inlines.h"
+ #include "basics.h"
#undef DBGFILE
Index: chars.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/chars.h,v
retrieving revision 1.201
retrieving revision 1.202
diff -C2 -d -r1.201 -r1.202
*** chars.h 11 Jun 2003 10:54:06 -0000 1.201
--- chars.h 7 Sep 2003 19:07:46 -0000 1.202
***************
*** 36,42 ****
#include "platform.h"
- // just temporary
- #include "debug.h"
-
#include "typedefs.h"
#include "structs.h"
--- 36,39 ----
Index: combat.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/combat.cpp,v
retrieving revision 1.148
retrieving revision 1.149
diff -C2 -d -r1.148 -r1.149
*** combat.cpp 5 Sep 2003 00:03:45 -0000 1.148
--- combat.cpp 7 Sep 2003 19:07:46 -0000 1.149
***************
*** 35,39 ****
// Wolfpack Includes
- #include "wolfpack.h"
#include "itemid.h"
#include "utilsys.h"
--- 35,38 ----
***************
*** 54,66 ****
#include "chars.h"
#include "basedef.h"
!
! #include "debug.h"
// System Includes
#include <math.h>
- #undef DBGFILE
- #define DBGFILE "combat.cpp"
-
#define SWINGAT (unsigned int)1.75 * MY_CLOCKS_PER_SEC // changed from signed to unsigned, LB
--- 53,64 ----
#include "chars.h"
#include "basedef.h"
! #include "items.h"
! #include "inlines.h"
! #include "world.h"
! #include "basics.h"
// System Includes
#include <math.h>
#define SWINGAT (unsigned int)1.75 * MY_CLOCKS_PER_SEC // changed from signed to unsigned, LB
***************
*** 883,887 ****
{
// Guards beam to their target if they are out of range
! #pragma note("reimplement with new npc ai!")
/* if( pAttacker->npcaitype() == 4 && pDefender->inGuardedArea() )
{
--- 881,885 ----
{
// Guards beam to their target if they are out of range
! #pragma message("reimplement with new npc ai!")
/* if( pAttacker->npcaitype() == 4 && pDefender->inGuardedArea() )
{
***************
*** 1013,1017 ****
if( pDefender->isDead() ) // Highlight // Repsys
{
! #pragma note("reimplement with new npc ai sys")
/* if( ( pAttacker->npcaitype() == 4 || pAttacker->npcaitype() == 9 ) && pDefender->isNpc() )
{
--- 1011,1015 ----
if( pDefender->isDead() ) // Highlight // Repsys
{
! #pragma message("reimplement with new npc ai sys")
/* if( ( pAttacker->npcaitype() == 4 || pAttacker->npcaitype() == 9 ) && pDefender->isNpc() )
{
Index: commands.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v
retrieving revision 1.197
retrieving revision 1.198
diff -C2 -d -r1.197 -r1.198
*** commands.cpp 1 Sep 2003 05:03:03 -0000 1.197
--- commands.cpp 7 Sep 2003 19:07:46 -0000 1.198
***************
*** 53,56 ****
--- 53,57 ----
#include "contextmenu.h"
#include "pythonscript.h"
+ #include "network.h"
// System Includes
Index: contextmenu.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/contextmenu.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** contextmenu.cpp 20 Jul 2003 00:04:51 -0000 1.14
--- contextmenu.cpp 7 Sep 2003 19:07:46 -0000 1.15
***************
*** 38,45 ****
#include "player.h"
- #include "debug.h"
- #undef DBGFILE
- #define DBGFILE "contextmenu.cpp"
-
cConMenu::cConMenu( const cElement *Tag )
{
--- 38,41 ----
Index: coord.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/coord.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** coord.cpp 3 Sep 2003 14:44:21 -0000 1.26
--- coord.cpp 7 Sep 2003 19:07:46 -0000 1.27
***************
*** 34,38 ****
#include "coord.h"
- #include "debug.h"
#include "player.h"
#include "network.h"
--- 34,37 ----
Index: customtags.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/customtags.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** customtags.cpp 30 Aug 2003 17:00:08 -0000 1.29
--- customtags.cpp 7 Sep 2003 19:07:46 -0000 1.30
***************
*** 31,35 ****
#include "customtags.h"
- #include "wolfpack.h"
#include "items.h"
#include "basechar.h"
--- 31,34 ----
***************
*** 38,41 ****
--- 37,41 ----
#include "basics.h"
#include "globals.h"
+ #include "world.h"
#include <math.h>
Index: dbl_single_click.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbl_single_click.cpp,v
retrieving revision 1.220
retrieving revision 1.221
diff -C2 -d -r1.220 -r1.221
*** dbl_single_click.cpp 3 Sep 2003 20:58:17 -0000 1.220
--- dbl_single_click.cpp 7 Sep 2003 19:07:46 -0000 1.221
***************
*** 50,53 ****
--- 50,54 ----
#include "npc.h"
#include "itemid.h"
+ #include "basics.h"
#undef DBGFILE
Index: dragdrop.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v
retrieving revision 1.197
retrieving revision 1.198
diff -C2 -d -r1.197 -r1.198
*** dragdrop.cpp 3 Sep 2003 20:58:17 -0000 1.197
--- dragdrop.cpp 7 Sep 2003 19:07:46 -0000 1.198
***************
*** 30,36 ****
//==================================================================================
- #include "debug.h"
#include "basics.h"
- #include "wolfpack.h"
#include "tilecache.h"
#include "speech.h"
--- 30,34 ----
***************
*** 48,52 ****
#include "player.h"
#include "npc.h"
!
#undef DBGFILE
--- 46,51 ----
#include "player.h"
#include "npc.h"
! #include "world.h"
! #include "inlines.h"
#undef DBGFILE
Index: encryption.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/encryption.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** encryption.cpp 5 Sep 2003 00:03:45 -0000 1.12
--- encryption.cpp 7 Sep 2003 19:07:46 -0000 1.13
***************
*** 43,46 ****
--- 43,47 ----
#include "prototypes.h"
#include "log.h"
+ #include "basics.h"
/*!
Index: globals.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/globals.cpp,v
retrieving revision 1.99
retrieving revision 1.100
diff -C2 -d -r1.99 -r1.100
*** globals.cpp 2 Sep 2003 02:06:34 -0000 1.99
--- globals.cpp 7 Sep 2003 19:07:46 -0000 1.100
***************
*** 32,36 ****
// Global Variables
- #include "wolfpack.h"
#include "verinfo.h"
#include "walking.h"
--- 32,35 ----
***************
*** 39,42 ****
--- 38,46 ----
#include "wptargetrequests.h"
#include "typedefs.h"
+ #include "wpconsole.h"
+ #include "srvparams.h"
+ #include "skills.h"
+ #include "maps.h"
+ #include "speech.h"
unsigned int uiCurrentTime;
***************
*** 125,130 ****
// - the below structure is for looking up items based on serial #
// - item's serial, owner's serial, char's serial, and container's serial
-
- Container_cl stablesp;
list<SERIAL> guilds;
--- 129,132 ----
Index: globals.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/globals.h,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -d -r1.73 -r1.74
*** globals.h 2 Sep 2003 02:06:34 -0000 1.73
--- globals.h 7 Sep 2003 19:07:46 -0000 1.74
***************
*** 56,62 ****
#include "structs.h"
- #include "storage.h"
-
- enum enServerState { STARTUP = 0, RUNNING, SCRIPTRELOAD, SHUTDOWN };
// Global Variables
--- 56,59 ----
***************
*** 112,116 ****
// - item's serial, owner's serial, char's serial, and container's serial
- extern Container_cl stablesp;
extern std::list<SERIAL> guilds;
--- 109,112 ----
Index: gumps.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/gumps.cpp,v
retrieving revision 1.142
retrieving revision 1.143
diff -C2 -d -r1.142 -r1.143
*** gumps.cpp 3 Sep 2003 20:58:17 -0000 1.142
--- gumps.cpp 7 Sep 2003 19:07:46 -0000 1.143
***************
*** 30,34 ****
- #include "wolfpack.h"
#include "accounts.h"
#include "prototypes.h"
--- 30,33 ----
***************
*** 45,56 ****
#include "basechar.h"
#include "player.h"
! #include "debug.h"
// System Includes
#include <math.h>
- #undef DBGFILE
- #define DBGFILE "gumps.cpp"
-
cGump::cGump() : noMove_( false ), noClose_( false ),
noDispose_( false ), x_( 50 ), y_( 50 ), serial_( INVALID_SERIAL ),
--- 44,52 ----
#include "basechar.h"
#include "player.h"
! #include "world.h"
// System Includes
#include <math.h>
cGump::cGump() : noMove_( false ), noClose_( false ),
noDispose_( false ), x_( 50 ), y_( 50 ), serial_( INVALID_SERIAL ),
***************
*** 126,130 ****
Q_UNUSED(socket);
Q_UNUSED(choice);
! #pragma note("This is a good candidate for pure virtual")
}
--- 122,126 ----
Q_UNUSED(socket);
Q_UNUSED(choice);
! #pragma message("This is a good candidate for pure virtual")
}
Index: house.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/house.cpp,v
retrieving revision 1.113
retrieving revision 1.114
diff -C2 -d -r1.113 -r1.114
*** house.cpp 27 Aug 2003 23:20:56 -0000 1.113
--- house.cpp 7 Sep 2003 19:07:47 -0000 1.114
***************
*** 37,41 ****
#include "srvparams.h"
#include "maps.h"
- #include "debug.h"
#include "tilecache.h"
#include "utilsys.h"
--- 37,40 ----
***************
*** 49,52 ****
--- 48,55 ----
#include "customtags.h"
#include "territories.h"
+ #include "world.h"
+ #include "srvparams.h"
+ #include "inlines.h"
+ #include "globals.h"
// System Include Files
***************
*** 55,61 ****
// Namespaces for this module
using namespace std;
-
- #undef DBGFILE
- #define DBGFILE "house.cpp"
void cHouse::processHouseItemNode( const cElement *Tag )
--- 58,61 ----
Index: house.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/house.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** house.h 27 Aug 2003 20:35:10 -0000 1.30
--- house.h 7 Sep 2003 19:07:47 -0000 1.31
***************
*** 33,37 ****
#define __HOUSE_H__
- #include "wolfpack.h"
#include "items.h"
#include "multis.h"
--- 33,36 ----
Index: itemid.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/itemid.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** itemid.cpp 12 Jan 2003 18:11:31 -0000 1.9
--- itemid.cpp 7 Sep 2003 19:07:47 -0000 1.10
***************
*** 40,44 ****
#include "platform.h"
- #include "debug.h"
#undef DBGFILE
#define DBGFILE "itemid.cpp"
--- 40,43 ----
Index: items.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v
retrieving revision 1.346
retrieving revision 1.347
diff -C2 -d -r1.346 -r1.347
*** items.cpp 5 Sep 2003 00:03:45 -0000 1.346
--- items.cpp 7 Sep 2003 19:07:47 -0000 1.347
***************
*** 34,38 ****
// Wolfpack Includes
- #include "wolfpack.h"
#include "accounts.h"
#include "network/uosocket.h"
--- 34,37 ----
***************
*** 40,44 ****
#include "utilsys.h"
#include "iserialization.h"
- #include "debug.h"
#include "items.h"
#include "tilecache.h"
--- 39,42 ----
***************
*** 58,61 ****
--- 56,64 ----
#include "basechar.h"
#include "player.h"
+ #include "basics.h"
+ #include "srvparams.h"
+ #include "globals.h"
+ #include "inlines.h"
+ #include "wpconsole.h"
// System Includes
***************
*** 334,343 ****
void cItem::SetRandPosInCont(cItem* pCont)
{
! int k=pCont->GetContGumpType();
! if (k==-1)
! {
! LogWarningVar("trying to put something INTO a non container, id=0x%X",pCont->id());
! k=1;
! }
Coord_cl position = pos();
position.x = RandomNum(18, 118);
--- 337,341 ----
void cItem::SetRandPosInCont(cItem* pCont)
{
! int k = pCont->GetContGumpType();
Coord_cl position = pos();
position.x = RandomNum(18, 118);
Index: makemenus.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/makemenus.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** makemenus.cpp 2 Sep 2003 02:06:34 -0000 1.57
--- makemenus.cpp 7 Sep 2003 19:07:47 -0000 1.58
***************
*** 30,34 ****
#include "makemenus.h"
- #include "wolfpack.h"
#include "network/uosocket.h"
#include "skills.h"
--- 30,33 ----
***************
*** 40,45 ****
#include "python/utilities.h"
#include "basedef.h"
!
! #include "debug.h"
// System Includes
--- 39,45 ----
#include "python/utilities.h"
#include "basedef.h"
! #include "basics.h"
! #include "network.h"
! #include "wpconsole.h"
// System Includes
Index: npc.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** npc.cpp 5 Sep 2003 00:03:45 -0000 1.39
--- npc.cpp 7 Sep 2003 19:07:47 -0000 1.40
***************
*** 53,56 ****
--- 53,58 ----
#include "skills.h"
#include "ai.h"
+ #include "inlines.h"
+ #include "basics.h"
cNPC::cNPC()
***************
*** 200,209 ****
static void npcRegisterAfterLoading( P_NPC pc )
{
! if( pc->stablemasterSerial() == INVALID_SERIAL )
! {
! MapObjects::instance()->add(pc);
! }
! else
! stablesp.insert(pc->stablemasterSerial(), pc->serial());
}
--- 202,206 ----
static void npcRegisterAfterLoading( P_NPC pc )
{
! MapObjects::instance()->add(pc);
}
***************
*** 353,357 ****
UINT8 cNPC::notority( P_CHAR pChar ) // Gets the notority toward another char
{
! // 0x01 Blue, 0x02 Green, 0x03 Grey, 0x05 Orange, 0x06 Red
UINT8 result;
--- 350,364 ----
UINT8 cNPC::notority( P_CHAR pChar ) // Gets the notority toward another char
{
! /*
! Hard to tell because the ai-types are now string based
! 0 = invalid/across server line
! 1 = innocent (blue)
! 2 = guilded/ally (green)
! 3 = attackable but not criminal (gray)
! 4 = criminal (gray)
! 5 = enemy (orange)
! 6 = murderer (red)
! 7 = unknown use (translucent (like 0x4000 hue))
! */
UINT8 result;
***************
*** 379,383 ****
if( isHuman() )
{
! if( karma_ >= 0 )
result = 0x01;
else
--- 386,390 ----
if( isHuman() )
{
! if( karma_ > 0 )
result = 0x01;
else
***************
*** 387,391 ****
// Everything else
else
! result = 0x03;
}
--- 394,403 ----
// Everything else
else
! {
! if( karma_ >= 0 )
! return 0x03;
! else
! return 0x01;
! }
}
***************
*** 480,484 ****
P_ITEM pi_backpack = getBackpack();
! #pragma note("Implement here tradewindow closing and disposal of it's cItem*")
// Close here the trade window... we still not sure how this will work, so I took out
//the old code
--- 492,496 ----
P_ITEM pi_backpack = getBackpack();
! #pragma message("Implement here tradewindow closing and disposal of it's cItem*")
// Close here the trade window... we still not sure how this will work, so I took out
//the old code
Index: pagesystem.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/pagesystem.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** pagesystem.h 26 Aug 2003 15:36:44 -0000 1.10
--- pagesystem.h 7 Sep 2003 19:07:47 -0000 1.11
***************
*** 39,42 ****
--- 39,43 ----
#include "persistentbroker.h"
#include "dbdriver.h"
+ #include "basics.h"
// Library includes
Index: platform.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/platform.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** platform.h 20 Jun 2003 22:44:30 -0000 1.10
--- platform.h 7 Sep 2003 19:07:47 -0000 1.11
***************
*** 121,124 ****
--- 121,125 ----
//========================================================================
//========================================================================
+
#endif
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** player.cpp 5 Sep 2003 00:03:45 -0000 1.35
--- player.cpp 7 Sep 2003 19:07:47 -0000 1.36
***************
*** 491,495 ****
unmount();
! #pragma note("Implement here tradewindow closing and disposal of it's cItem*")
// Close here the trade window... we still not sure how this will work, so I took out
//the old code
--- 491,495 ----
unmount();
! #pragma message("Implement here tradewindow closing and disposal of it's cItem*")
// Close here the trade window... we still not sure how this will work, so I took out
//the old code
***************
*** 653,657 ****
corpse->update();
! #pragma note( "Deathshroud has to be defined as 204e in the scripts" )
P_ITEM pItem = cItem::createFromScript( "204e" );
if( pItem )
--- 653,657 ----
corpse->update();
! #pragma message( "Deathshroud has to be defined as 204e in the scripts" )
P_ITEM pItem = cItem::createFromScript( "204e" );
if( pItem )
***************
*** 1004,1008 ****
if( !pi )
{
! LogCritical( "cChar::canPickUp() - bad parm" );
return false;
}
--- 1004,1008 ----
if( !pi )
{
! clConsole.log( LOG_ERROR, "cChar::canPickUp() - bad parm" );
return false;
}
Index: prototypes.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/prototypes.h,v
retrieving revision 1.109
retrieving revision 1.110
diff -C2 -d -r1.109 -r1.110
*** prototypes.h 5 Sep 2003 00:03:45 -0000 1.109
--- prototypes.h 7 Sep 2003 19:07:47 -0000 1.110
***************
*** 36,40 ****
class cUOSocket;
- QString hex2dec( const QString& value );
void showPaperdoll( cUOSocket *socket, P_CHAR pTarget, bool hotkey );
--- 36,39 ----
Index: pythonscript.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/pythonscript.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** pythonscript.cpp 30 Aug 2003 17:00:09 -0000 1.7
--- pythonscript.cpp 7 Sep 2003 19:07:47 -0000 1.8
***************
*** 41,44 ****
--- 41,45 ----
#include "maps.h"
#include "network.h"
+ #include "wpconsole.h"
// Library Includes
Index: scriptmanager.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/scriptmanager.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** scriptmanager.cpp 20 Jul 2003 00:04:51 -0000 1.4
--- scriptmanager.cpp 7 Sep 2003 19:07:47 -0000 1.5
***************
*** 29,36 ****
//==================================================================================
! #include "wolfpack.h"
#include "scriptmanager.h"
#include "wpdefmanager.h"
#include "basechar.h"
#include "pythonscript.h"
#include "python/engine.h"
--- 29,40 ----
//==================================================================================
! #include "qapplication.h"
#include "scriptmanager.h"
#include "wpdefmanager.h"
#include "basechar.h"
+ #include "globals.h"
+ #include "wpconsole.h"
+ #include "world.h"
+ #include "items.h"
#include "pythonscript.h"
#include "python/engine.h"
***************
*** 44,52 ****
cScriptManager::~cScriptManager()
{
! map< QString, cPythonScript* >::iterator ScriptIterator;
for( ScriptIterator = Scripts.begin(); ScriptIterator != Scripts.end(); ++ScriptIterator )
{
! delete( ScriptIterator->second );
}
}
--- 48,56 ----
cScriptManager::~cScriptManager()
{
! QMap< QString, cPythonScript* >::iterator ScriptIterator;
for( ScriptIterator = Scripts.begin(); ScriptIterator != Scripts.end(); ++ScriptIterator )
{
! delete( ScriptIterator.data() );
}
}
***************
*** 55,61 ****
cPythonScript* cScriptManager::find( const QString& Name ) const
{
! map< QString, cPythonScript* >::const_iterator it = Scripts.find( Name );
if ( it != Scripts.end() )
! return (*it).second;
else
return 0;
--- 59,65 ----
cPythonScript* cScriptManager::find( const QString& Name ) const
{
! QMap< QString, cPythonScript* >::const_iterator it = Scripts.find( Name );
if ( it != Scripts.end() )
! return it.data();
else
return 0;
***************
*** 68,72 ****
Script->setName( Name );
! Scripts.insert( make_pair(Name, Script) );
}
--- 72,76 ----
Script->setName( Name );
! Scripts.insert( Name, Script );
}
***************
*** 76,80 ****
if( it != Scripts.end() )
{
! delete (*it).second;
Scripts.erase( it );
}
--- 80,84 ----
if( it != Scripts.end() )
{
! delete it.data();
Scripts.erase( it );
}
***************
*** 119,124 ****
for( myIter = Scripts.begin(); myIter != Scripts.end(); ++myIter )
{
! myIter->second->unload();
! delete myIter->second;
}
--- 123,128 ----
for( myIter = Scripts.begin(); myIter != Scripts.end(); ++myIter )
{
! myIter.data()->unload();
! delete myIter.data();
}
***************
*** 190,198 ****
void cScriptManager::onServerStart()
{
! map< QString, cPythonScript* >::iterator ScriptIterator;
for( ScriptIterator = Scripts.begin(); ScriptIterator != Scripts.end(); ++ScriptIterator )
{
! ScriptIterator->second->onServerstart();
}
}
--- 194,202 ----
void cScriptManager::onServerStart()
{
! QMap< QString, cPythonScript* >::iterator ScriptIterator;
for( ScriptIterator = Scripts.begin(); ScriptIterator != Scripts.end(); ++ScriptIterator )
{
! ScriptIterator.data()->onServerstart();
}
}
Index: scriptmanager.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/scriptmanager.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** scriptmanager.h 27 Aug 2003 01:39:59 -0000 1.3
--- scriptmanager.h 7 Sep 2003 19:07:47 -0000 1.4
***************
*** 34,39 ****
// System Includes
- #include <map>
#include <qmap.h>
// Forward definitions
--- 34,39 ----
// System Includes
#include <qmap.h>
+ #include <qvaluevector.h>
// Forward definitions
***************
*** 82,86 ****
{
private:
! std::map< QString, cPythonScript* > Scripts;
// map< OBJECT, map< EVENT, vector< cPythonScript
--- 82,86 ----
{
private:
! QMap< QString, cPythonScript* > Scripts;
// map< OBJECT, map< EVENT, vector< cPythonScript
***************
*** 91,95 ****
public:
! typedef std::map< QString, cPythonScript* >::iterator iterator;
virtual ~cScriptManager();
--- 91,95 ----
public:
! typedef QMap< QString, cPythonScript* >::iterator iterator;
virtual ~cScriptManager();
Index: serbinfile.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/serbinfile.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** serbinfile.cpp 13 Jan 2003 18:09:15 -0000 1.25
--- serbinfile.cpp 7 Sep 2003 19:07:47 -0000 1.26
***************
*** 33,37 ****
// Wolfpack Includes
! #include "wolfpack.h"
#include "srvparams.h"
#include "serbinfile.h"
--- 33,37 ----
// Wolfpack Includes
! #include "globals.h"
#include "srvparams.h"
#include "serbinfile.h"
Index: serxmlfile.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/serxmlfile.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** serxmlfile.cpp 12 Jan 2003 18:11:32 -0000 1.21
--- serxmlfile.cpp 7 Sep 2003 19:07:47 -0000 1.22
***************
*** 36,40 ****
// Save Path
! #include "wolfpack.h"
#include "srvparams.h"
--- 36,40 ----
// Save Path
! #include "globals.h"
#include "srvparams.h"
Index: skills.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/skills.cpp,v
retrieving revision 1.206
retrieving revision 1.207
diff -C2 -d -r1.206 -r1.207
*** skills.cpp 5 Sep 2003 00:03:45 -0000 1.206
--- skills.cpp 7 Sep 2003 19:07:47 -0000 1.207
***************
*** 33,37 ****
*/
- #include "wolfpack.h"
#include "wpdefmanager.h"
#include "basics.h"
--- 33,36 ----
***************
*** 53,63 ****
#include "makemenus.h"
#include "npc.h"
// System Includes
#include <math.h>
-
- #undef DBGFILE
- #define DBGFILE "skills.cpp"
- #include "debug.h"
void cSkills::Hide( cUOSocket *socket )
--- 52,59 ----
#include "makemenus.h"
#include "npc.h"
+ #include "wpconsole.h"
// System Includes
#include <math.h>
void cSkills::Hide( cUOSocket *socket )
Index: spawnregions.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/spawnregions.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** spawnregions.cpp 5 Sep 2003 00:03:45 -0000 1.46
--- spawnregions.cpp 7 Sep 2003 19:07:47 -0000 1.47
***************
*** 48,51 ****
--- 48,54 ----
#include "chars.h"
#include "npc.h"
+ #include "world.h"
+ #include "basics.h"
+ #include "wpconsole.h"
//#include "wolfpack.h" // needed for objects Npcs and Items
Index: speech.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/speech.cpp,v
retrieving revision 1.155
retrieving revision 1.156
diff -C2 -d -r1.155 -r1.156
*** speech.cpp 3 Sep 2003 20:58:17 -0000 1.155
--- speech.cpp 7 Sep 2003 19:07:47 -0000 1.156
***************
*** 52,55 ****
--- 52,58 ----
#include "chars.h"
#include "ai.h"
+ #include "world.h"
+ #include "inlines.h"
+ #include "wpconsole.h"
// Library Includes
Index: speech.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/speech.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** speech.h 15 Jun 2003 18:46:24 -0000 1.19
--- speech.h 7 Sep 2003 19:07:47 -0000 1.20
***************
*** 40,56 ****
#include "platform.h"
-
// System includes
#include <vector>
#include <iostream>
! // Class Declaration
! class cSpeech;
//Wolfpack Includes
- #include "wolfpack.h"
- #include "debug.h"
#include "speech.h"
#include "utilsys.h"
bool VendorChkName( P_CHAR pVendor, const QString& comm );
--- 40,54 ----
#include "platform.h"
// System includes
#include <vector>
#include <iostream>
! // QT
! #include <qvaluevector.h>
//Wolfpack Includes
#include "speech.h"
#include "utilsys.h"
+ #include "typedefs.h"
bool VendorChkName( P_CHAR pVendor, const QString& comm );
Index: targetactions.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/targetactions.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** targetactions.cpp 28 Aug 2003 20:56:16 -0000 1.28
--- targetactions.cpp 7 Sep 2003 19:07:47 -0000 1.29
***************
*** 42,46 ****
#include "basechar.h"
#include "player.h"
- #include "debug.h"
bool cSkHealing::responsed( cUOSocket *socket, cUORxTarget *target )
--- 42,45 ----
Index: targetrequests.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/targetrequests.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** targetrequests.cpp 3 Sep 2003 20:58:17 -0000 1.76
--- targetrequests.cpp 7 Sep 2003 19:07:47 -0000 1.77
***************
*** 50,54 ****
#include "npc.h"
#include "chars.h"
!
// System Includes
--- 50,55 ----
#include "npc.h"
#include "chars.h"
! #include "basics.h"
! #include "network.h"
// System Includes
Index: targetrequests.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/targetrequests.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** targetrequests.h 1 Sep 2003 05:03:03 -0000 1.45
--- targetrequests.h 7 Sep 2003 19:07:47 -0000 1.46
***************
*** 33,37 ****
#define __TARGETREQUEST_H__
! #include "wolfpack.h"
#include "wptargetrequests.h"
#include "items.h"
--- 33,39 ----
#define __TARGETREQUEST_H__
! #include "inlines.h"
! #include "network/uosocket.h"
! #include "network/uorxpackets.h"
#include "wptargetrequests.h"
#include "items.h"
Index: tmpeff.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/tmpeff.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** tmpeff.cpp 20 Aug 2003 17:10:48 -0000 1.60
--- tmpeff.cpp 7 Sep 2003 19:07:47 -0000 1.61
***************
*** 40,46 ****
#include "items.h"
#include "globals.h"
- #include "debug.h"
#include "srvparams.h"
- #include "wolfpack.h"
#include "iserialization.h"
#include "network.h"
--- 40,44 ----
***************
*** 53,56 ****
--- 51,55 ----
#include "npc.h"
#include "ai.h"
+ #include "world.h"
#include <algorithm>
Index: tracking.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/tracking.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** tracking.cpp 2 Sep 2003 02:06:34 -0000 1.17
--- tracking.cpp 7 Sep 2003 19:07:47 -0000 1.18
***************
*** 36,40 ****
#include "skills.h"
#include "globals.h"
- #include "wolfpack.h"
#include "TmpEff.h"
#include "sectors.h"
--- 36,39 ----
***************
*** 43,46 ****
--- 42,47 ----
#include "player.h"
#include "basedef.h"
+ #include "world.h"
+ #include "inlines.h"
class cRefreshTracking: public cTempEffect
Index: typedefs.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/typedefs.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** typedefs.h 3 Sep 2003 20:58:17 -0000 1.21
--- typedefs.h 7 Sep 2003 19:07:47 -0000 1.22
***************
*** 46,49 ****
--- 46,51 ----
class cPlayer;
class cUObject;
+ class cUOSocket;
+ class Coord_cl;
// Typedefs
***************
*** 141,144 ****
--- 143,148 ----
enNumberOfWanderTypes
};
+
+ enum enServerState { STARTUP = 0, RUNNING, SCRIPTRELOAD, SHUTDOWN };
#endif
Index: uobject.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/uobject.cpp,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -d -r1.111 -r1.112
*** uobject.cpp 27 Aug 2003 23:20:56 -0000 1.111
--- uobject.cpp 7 Sep 2003 19:07:47 -0000 1.112
***************
*** 39,43 ****
#include "globals.h"
#include "network.h"
- #include "wolfpack.h"
#include "defines.h"
#include "pythonscript.h"
--- 39,42 ----
***************
*** 51,60 ****
#include "sectors.h"
#include "player.h"
// Library Includes
-
- // Debug includes and defines
- #undef DBGFILE
- #define DBGFILE "uobject.cpp"
cUObject::cUObject() :
--- 50,59 ----
#include "sectors.h"
#include "player.h"
+ #include "basics.h"
+ #include "items.h"
+ #include "basics.h"
+ #include "world.h"
// Library Includes
cUObject::cUObject() :
Index: walking.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/walking.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** walking.cpp 4 Sep 2003 01:22:54 -0000 1.90
--- walking.cpp 7 Sep 2003 19:07:47 -0000 1.91
***************
*** 35,40 ****
// Wolfpack Includes
#include "walking.h"
- #include "wolfpack.h"
- #include "debug.h"
#include "sectors.h"
#include "srvparams.h"
--- 35,38 ----
***************
*** 50,53 ****
--- 48,54 ----
#include "npc.h"
#include "player.h"
+ #include "globals.h"
+ #include "inlines.h"
+ #include "world.h"
// Library Includes
***************
*** 1312,1316 ****
// Try to find your way to a specified position
/* case enGoToPosition:
! #pragma note("Implement pathfinding for this!")
if( pc_i->pos().map != pc_i->wanderDestination().map )
{
--- 1313,1317 ----
// Try to find your way to a specified position
/* case enGoToPosition:
! #pragma message("Implement pathfinding for this!")
if( pc_i->pos().map != pc_i->wanderDestination().map )
{
Index: walking.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/walking.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** walking.h 3 Sep 2003 20:58:17 -0000 1.19
--- walking.h 7 Sep 2003 19:07:47 -0000 1.20
***************
*** 33,39 ****
#define __WALKING2_H__
! #include "wolfpack.h"
!
! class cUOSocket;
struct unitile_st
--- 33,38 ----
#define __WALKING2_H__
! #include "typedefs.h"
! #include "singleton.h"
struct unitile_st
Index: wolf.dsp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v
retrieving revision 1.217
retrieving revision 1.218
diff -C2 -d -r1.217 -r1.218
*** wolf.dsp 5 Sep 2003 00:03:45 -0000 1.217
--- wolf.dsp 7 Sep 2003 19:07:47 -0000 1.218
***************
*** 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
***************
*** 163,170 ****
# Begin Source File
- SOURCE=.\debug.cpp
- # End Source File
- # Begin Source File
-
SOURCE=.\definable.cpp
# End Source File
--- 163,166 ----
***************
*** 482,489 ****
SOURCE=.\dbl_single_click.h
- # End Source File
- # Begin Source File
-
- SOURCE=.\debug.h
# End Source File
# Begin Source File
--- 478,481 ----
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.455
retrieving revision 1.456
diff -C2 -d -r1.455 -r1.456
*** wolfpack.cpp 5 Sep 2003 00:03:46 -0000 1.455
--- wolfpack.cpp 7 Sep 2003 19:07:47 -0000 1.456
***************
*** 30,34 ****
//==================================================================================
- #include "wolfpack.h"
#include "world.h"
#include "verinfo.h"
--- 30,33 ----
***************
*** 71,74 ****
--- 70,74 ----
#include "sectors.h"
#include "basedef.h"
+ #include "wpconsole.h"
// Library Includes
***************
*** 150,154 ****
void reloadScripts()
{
! clConsole.send( "Reloading definitions, scripts and wolfpack.xml\n" );
SrvParams->reload(); // Reload wolfpack.xml
--- 150,154 ----
void reloadScripts()
{
! clConsole.send( "Reloading scripts...\n" );
SrvParams->reload(); // Reload wolfpack.xml
***************
*** 205,209 ****
try
{
-
while( keeprun )
{
--- 205,208 ----
***************
*** 236,344 ****
int i;
char c = command.latin1()[0];
! if (c != 0)
{
! c = toupper(c);
! if (c == 'S')
! {
! if (secure)
! {
! clConsole.send("WOLFPACK: Secure mode disabled. Press ? for a commands list.\n");
! secure=0;
! return;
! }
! else
! {
! clConsole.send("WOLFPACK: Secure mode re-enabled.\n");
! secure=1;
! return;
! }
! } else {
! if (secure && c != '?') //Allows help in secure mode.
! {
! clConsole.send("WOLFPACK: Secure mode prevents keyboard commands! Press 'S' to disable.\n");
! return;
! }
! switch(c)
! {
! case '\x1B':
! keeprun=0;
! break;
! case 'Q':
! case 'q':
! clConsole.send("WOLFPACK: Immediate Shutdown initialized!\n");
! keeprun=0;
! break;
! case '#':
! World::instance()->save();
!
! SrvParams->flush();
! break;
! case 'D': // Disconnect account 0 (useful when client crashes)
! case 'd':
! break;
! case 'P':
! case 'p': // Display profiling information
! // clConsole.send("Performace Dump:\n");
! // clConsole.send("Network code: %fmsec [%i samples]\n" _ (float)((float)networkTime/(float)networkTimeCount) _ networkTimeCount);
! // clConsole.send("Timer code: %fmsec [%i samples]\n" _ (float)((float)timerTime/(float)timerTimeCount) _ timerTimeCount);
! // clConsole.send("Auto code: %fmsec [%i samples]\n" _ (float)((float)autoTime/(float)autoTimeCount) _ autoTimeCount);
! // clConsole.send("Loop Time: %fmsec [%i samples]\n" _ (float)((float)loopTime/(float)loopTimeCount) _ loopTimeCount);
! // clConsole.send("Characters: %i/%i (Dynamic) Items: %i/%i (Dynamic)\n" _ charcount _ cmem _ itemcount _ imem);
! // clConsole.send("Simulation Cycles: %f per sec\n" _ (1000.0*(1.0/(float)((float)loopTime/(float)loopTimeCount))));
! break;
! case 'W':
! case 'w': // Display logged in chars
! clConsole.send( "Current Users in the World:\n" );
! mSock = cNetwork::instance()->first();
! i = 0;
!
! for( mSock = cNetwork::instance()->first(); mSock; mSock = cNetwork::instance()->next() )
! {
! if( mSock->player() )
! {
! clConsole.send( QString("%1) %2 [%3]\n").arg(++i).arg(mSock->player()->name()).arg(QString::number( mSock->player()->serial(), 16) ) );
! }
! }
! clConsole.send( tr("Total Users Online: %1\n").arg(cNetwork::instance()->count()) );
! break;
! case 'A': //reload the accounts file
! case 'a':
! Accounts::instance()->reload();
! break;
! case 'r':
! case 'R':
! reloadScripts();
! break;
! case '?':
! clConsole.send("Console commands:\n");
! clConsole.send(" <Esc> or Q: Shutdown the server.\n");
! clConsole.send(" T - System Message: The server is shutting down in 10 minutes.\n");
! clConsole.send(" # - Save world\n");
! clConsole.send(" D - Disconnect Account 0\n");
! clConsole.send(" 1 - Sysmessage: Attention Players Server being brought down!\n");
! clConsole.send(" 2 - Broadcast Message 2\n");
! clConsole.send(" P - Preformance Dump\n");
! clConsole.send(" W - Display logged in characters\n");
! clConsole.send(" A - Reload accounts\n");
! clConsole.send(" R - Reload scripts\n");
! clConsole.send(" S - Toggle Secure mode ");
! if (secure)
! clConsole.send("[enabled]\n");
! else
! clConsole.send("[disabled]\n");
! clConsole.send(" ? - Commands list (this)\n");
! clConsole.send("End of commands list.\n");
! break;
! default:
! clConsole.send(tr("WOLFPACK: Key %1 [%2] does not preform a function.\n").arg( c > 32 ? c : '¿' ).arg(QString::number(c)));
! break;
! }
}
}
}
--- 235,308 ----
int i;
char c = command.latin1()[0];
+ c = toupper(c);
! if( c == 'S' )
{
! secure = !secure;
! if( !secure )
! clConsole.send("WOLFPACK: Secure mode disabled. Press ? for a commands list.\n");
! else
! clConsole.send("WOLFPACK: Secure mode re-enabled.\n");
! return;
! }
! // Allow Help in Secure Mode
! if( secure && c != '?' )
! {
! clConsole.send( "WOLFPACK: Secure mode prevents keyboard commands! Press 'S' to disable.\n" );
! return;
! }
! switch( c )
! {
! case 'Q':
! clConsole.send("WOLFPACK: Immediate Shutdown initialized!\n");
! keeprun=0;
! break;
! case '#':
! World::instance()->save();
! SrvParams->flush();
! break;
!
! case 'W':
! clConsole.send( "Current Users in the World:\n" );
!
! mSock = cNetwork::instance()->first();
! i = 0;
!
! for( mSock = cNetwork::instance()->first(); mSock; mSock = cNetwork::instance()->next() )
! {
! if( mSock->player() )
! clConsole.send( QString("%1) %2 [%3]\n").arg(++i).arg(mSock->player()->name()).arg(QString::number( mSock->player()->serial(), 16) ) );
}
+
+ clConsole.send( tr("Total Users Online: %1\n").arg(cNetwork::instance()->count()) );
+ break;
+ case 'A': //reload the accounts file
+ Accounts::instance()->reload();
+ break;
+ case 'R':
+ reloadScripts();
+ break;
+ case '?':
+ clConsole.send("Console commands:\n");
+ clConsole.send(" Q: Shutdown the server.\n");
+ clConsole.send(" # - Save world\n" );
+ clConsole.send(" W - Display logged in characters\n" );
+ clConsole.send(" A - Reload accounts\n" );
+ clConsole.send(" R - Reload scripts\n" );
+ clConsole.send(" S - Toggle Secure mode " );
+ if( secure )
+ clConsole.send( "[enabled]\n" );
+ else
+ clConsole.send( "[disabled]\n" );
+ clConsole.send( " ? - Commands list (this)\n" );
+ clConsole.send( "End of commands list.\n" );
+ break;
+ default:
+ break;
}
}
Index: wolfpack.pro
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v
retrieving revision 1.152
retrieving revision 1.153
diff -C2 -d -r1.152 -r1.153
*** wolfpack.pro 5 Sep 2003 00:03:46 -0000 1.152
--- wolfpack.pro 7 Sep 2003 19:07:48 -0000 1.153
***************
*** 69,73 ****
dbl_single_click.h \
dbdriver.h \
- debug.h \
definable.h \
defines.h \
--- 69,72 ----
***************
*** 142,146 ****
dbl_single_click.cpp \
dbdriver.cpp \
- debug.cpp \
definable.cpp \
dragdrop.cpp \
--- 141,144 ----
--- debug.cpp DELETED ---
--- debug.h DELETED ---
--- storage.cpp DELETED ---
--- storage.h DELETED ---
|
|
From: <ri...@us...> - 2003-09-06 20:44:46
|
Update of /cvsroot/wpdev/xmlscripts/definitions/npcs/humans In directory sc8-pr-cvs1:/tmp/cvs-serv20734/definitions/npcs/humans Modified Files: civilists.xml Log Message: adding clothes lists Index: civilists.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/humans/civilists.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** civilists.xml 5 Sep 2003 00:26:51 -0000 1.3 --- civilists.xml 6 Sep 2003 20:44:40 -0000 1.4 *************** *** 21,25 **** <item inherit="e75" /> <!-- Backpack --> <item inheritlist="HAIR" /> <!-- Random Hair --> ! <item inherit="1efd" /> <!-- Fancy Shirts --> <item inheritlist="PANTS" /> <!-- Random Pants --> <item inheritlist="SHOES" /> <!-- Random Shoes --> --- 21,25 ---- <item inherit="e75" /> <!-- Backpack --> <item inheritlist="HAIR" /> <!-- Random Hair --> ! <item inheritlist="SHIRTS" /> <!-- Random Shirts --> <item inheritlist="PANTS" /> <!-- Random Pants --> <item inheritlist="SHOES" /> <!-- Random Shoes --> *************** *** 42,48 **** <!-- The Equipment of a standard human --> <equipped> ! <item inherit="e75" /> <!-- Backpack --> <item inheritlist="HAIR_FEMALE" /> <!-- Random Hair --> ! <item inherit="1efd" /> <!-- Fancy Shirts --> <item inheritlist="PANTS" /> <!-- Random Pants --> <item inheritlist="SHOES" /> <!-- Random Shoes --> --- 42,48 ---- <!-- The Equipment of a standard human --> <equipped> ! <item inherit="e75" /> <!-- Backpack --> <item inheritlist="HAIR_FEMALE" /> <!-- Random Hair --> ! <item inheritlist="DRESS" /> <!-- Random Dress`s --> <item inheritlist="PANTS" /> <!-- Random Pants --> <item inheritlist="SHOES" /> <!-- Random Shoes --> |
|
From: <ri...@us...> - 2003-09-06 20:44:46
|
Update of /cvsroot/wpdev/xmlscripts/definitions/lists In directory sc8-pr-cvs1:/tmp/cvs-serv20734/definitions/lists Modified Files: itemids.xml Log Message: adding clothes lists Index: itemids.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/lists/itemids.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** itemids.xml 20 Dec 2002 21:51:32 -0000 1.4 --- itemids.xml 6 Sep 2003 20:44:40 -0000 1.5 *************** *** 8,11 **** --- 8,23 ---- --> <definitions> + <!-- IDs of Shirts --> + <list id="SHIRTS"> + <item>1efd</item> <!-- Fancy --> + <item>1517</item> <!-- Plain --> + </list> + + <!-- IDs of Dress`s --> + <list id="DRESS"> + <item>1eff</item> <!-- Fancy --> + <item>1f01</item> <!-- Plain --> + </list> + <!-- IDs of Pants --> <list id="PANTS"> |
|
From: <thi...@us...> - 2003-09-06 16:12:36
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv3075
Modified Files:
log.cpp
Log Message:
small usability enhancement.
Index: log.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/log.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** log.cpp 5 Sep 2003 00:03:46 -0000 1.1
--- log.cpp 6 Sep 2003 16:12:33 -0000 1.2
***************
*** 66,69 ****
--- 66,77 ----
path.append( QDir::separator() );
+ QDir d;
+ if ( !d.exists(path) )
+ {
+ clConsole.send( QString("Warning: log path (%1) doesn't exist, creating\n").arg(path) );
+ QDir d;
+ d.mkdir( path );
+ }
+
QString filename;
filename.sprintf( "wolfpack-%04u-%02u-%02u.log", today.year(), today.month(), today.day() );
|
|
From: <thi...@us...> - 2003-09-05 20:21:35
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv25723
Modified Files:
global.cpp
Log Message:
Clean up
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -d -r1.86 -r1.87
*** global.cpp 5 Sep 2003 20:12:38 -0000 1.86
--- global.cpp 5 Sep 2003 20:21:32 -0000 1.87
***************
*** 692,702 ****
{
Q_UNUSED(self);
! if( !checkArgInt( 0 ) )
! {
! PyErr_BadArgument();
return 0;
- }
! tile_st tile = TileCache::instance()->getTile( getArgInt( 0 ) );
PyObject *dict = PyDict_New();
--- 692,700 ----
{
Q_UNUSED(self);
! uint tileid = 0;
! if ( !PyArg_ParseTuple( args, "i:wolfpack.tiledata", &tileid ) )
return 0;
! tile_st tile = TileCache::instance()->getTile( tileid );
PyObject *dict = PyDict_New();
|
|
From: <thi...@us...> - 2003-09-05 20:15:43
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills
In directory sc8-pr-cvs1:/tmp/cvs-serv24693
Added Files:
tracking.py
Log Message:
Starting to do tracking skill, completely non-functional yet.
--- NEW FILE: tracking.py ---
#################################################################
# ) (\_ # WOLFPACK 13.0.0 Scripts #
# (( _/{ "-; # Created by: Correa #
# )).-' {{ ;'` # Revised by: #
# ( ( ;._ \\ ctr # Last Modification: Created #
#################################################################
from wolfpack.consts import *
from wolfpack.utilities import *
from wolfpack.time import *
from wolfpack.gumps import *
import wolfpack
STEALTH_DELAY = 5000
# the hiding skill before you can use the stealth skill
MIN_HIDING = 800
def onLoad():
wolfpack.registerglobal( HOOK_CHAR, EVENT_SKILLUSE, "skills.tracking" )
def onSkillUse( char, skill ):
if skill != TRACKING:
return 0
if char.hastag( 'skill_delay' ):
cur_time = servertime()
if cur_time < char.gettag( 'skill_delay' ):
char.socket.clilocmessage( 500118, "", 0x3b2, 3 )
return 1
else:
char.deltag( 'skill_delay' )
char.socket.cloclocmessage( 1011350 ) # What do you wish to track?
char.socket.closegump( 0x87651592 ) # What to track
gump = cGump( x = 20, y = 30, callback="skills.tracking.trackWhatResponse", type=0x87651592 )
gump.startPage( 0 )
gump.addBackground( 5054, 440, 135 )
gump.addResizeGump( 10, 10, 2620, 420, 75 )
gump.addResizeGump( 10, 85, 3000, 420, 25 )
gump.addTilePic( 20, 20, 9682 )
gump.addButton( 20, 110, 4005, 4007, 1 )
gump.addXmfHtmlGump( 20, 90, 100, 20, 1018087 ) # Animals
gump.addTilePic( 120, 20, 9607 )
gump.addButton( 120, 110, 4005, 4007, 2 )
gump.addXmfHtmlGump( 120, 90, 100, 20, 1018088 ) # Monsters
gump.addTilePic( 220, 20, 8454 )
gump.addButton( 220, 110, 4005, 4007, 3 )
gump.addXmfHtmlGump( 220, 90, 100, 20, 1018089 ) # Human NPCs
gump.addTilePic( 320, 20, 8455 )
gump.addButton( 320, 110, 4005, 4007, 4 )
gump.addXmfHtmlGump( 320, 90, 100, 20, 1018090 ) # Players
gump.send( char )
cur_time = servertime()
char.settag( 'skill_delay', cur_time + STEALTH_DELAY )
return 1
def trackWhatResponse( char, args, target ):
return 1
|
|
From: <thi...@us...> - 2003-09-05 20:12:50
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv24095/python
Modified Files:
global.cpp
Log Message:
Clean up
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** global.cpp 4 Sep 2003 01:22:54 -0000 1.85
--- global.cpp 5 Sep 2003 20:12:38 -0000 1.86
***************
*** 381,391 ****
{
Q_UNUSED(self);
- if( PyTuple_Size( args ) < 1 || !PyInt_Check( PyTuple_GetItem( args, 0 ) ) )
- {
- PyErr_BadArgument();
- return NULL;
- }
! SERIAL serial = PyInt_AsLong( PyTuple_GetItem( args, 0 ) );
return PyGetItemObject( FindItemBySerial( serial ) );
}
--- 381,389 ----
{
Q_UNUSED(self);
! SERIAL serial = INVALID_SERIAL;
! if ( !PyArg_ParseTuple( args, "i:wolfpack.finditem", &serial ) )
! return 0;
!
return PyGetItemObject( FindItemBySerial( serial ) );
}
***************
*** 398,413 ****
{
Q_UNUSED(self);
! if( PyTuple_Size( args ) < 1 || !PyInt_Check( PyTuple_GetItem( args, 0 ) ) )
! {
! PyErr_BadArgument();
! return NULL;
! }
- SERIAL serial = PyInt_AsLong( PyTuple_GetItem( args, 0 ) );
return PyGetCharObject( FindCharBySerial( serial ) );
}
! /*
! * Creates a multi object based on the passed pos
*/
static PyObject* wpFindmulti( PyObject* self, PyObject* args )
--- 396,408 ----
{
Q_UNUSED(self);
! SERIAL serial = INVALID_SERIAL;
! if ( !PyArg_ParseTuple( args, "i:wolfpack.finditem", &serial ) )
! return 0;
return PyGetCharObject( FindCharBySerial( serial ) );
}
! /*!
! Creates a multi object based on the passed pos
*/
static PyObject* wpFindmulti( PyObject* self, PyObject* args )
***************
*** 432,436 ****
return PyGetMultiObject( pMulti );
-
}
--- 427,430 ----
***************
*** 473,483 ****
Q_UNUSED(self);
// Three arguments
! if( !checkArgInt( 0 ) || !checkArgInt( 1 ) || !checkArgInt( 2 ) )
! {
! PyErr_BadArgument();
return 0;
- }
! return PyGetRegionObject( AllTerritories::instance()->region( getArgInt( 0 ), getArgInt( 1 ), getArgInt(2) ) );
}
--- 467,475 ----
Q_UNUSED(self);
// Three arguments
! int x = 0, y = 0, map = 0;
! if ( !PyArg_ParseTuple( args, "iii:wolfpack.region", &x, &y, &map ) )
return 0;
! return PyGetRegionObject( AllTerritories::instance()->region( x, y, map ) );
}
***************
*** 587,602 ****
Q_UNUSED(self);
// Minimum is x, y, map
! if( !checkArgInt( 0 ) || !checkArgInt( 1 ) || !checkArgInt( 2 ) )
! {
! PyErr_BadArgument();
return 0;
- }
! UINT32 range = 1;
!
! if( checkArgInt( 3 ) && getArgInt( 3 ) > 1 )
! range = getArgInt( 3 );
!
! Coord_cl pos( getArgInt( 0 ), getArgInt( 1 ), 0, getArgInt( 2 ) );
RegionIterator4Items iter( pos, range );
--- 579,587 ----
Q_UNUSED(self);
// Minimum is x, y, map
! uint x = 0, y = 0, map = 0, range = 1;
! if ( !PyArg_ParseTuple( args, "iii|i:wolfpack.items", &x, &y, &map, &range ) )
return 0;
! Coord_cl pos( x, y, 0, map );
RegionIterator4Items iter( pos, range );
***************
*** 620,635 ****
Q_UNUSED(self);
// Minimum is x, y, map
! if( !checkArgInt( 0 ) || !checkArgInt( 1 ) || !checkArgInt( 2 ) )
! {
! PyErr_BadArgument();
return 0;
- }
! UINT32 range = 1;
!
! if( checkArgInt( 3 ) && getArgInt( 3 ) > 1 )
! range = getArgInt( 3 );
!
! Coord_cl pos( getArgInt( 0 ), getArgInt( 1 ), 0, getArgInt( 2 ) );
RegionIterator4Chars iter( pos, range );
--- 605,613 ----
Q_UNUSED(self);
// Minimum is x, y, map
! uint x = 0, y = 0, map = 0, range = 1;
! if ( !PyArg_ParseTuple( args, "iii|i:wolfpack.chars", &x, &y, &map, &range ) )
return 0;
! Coord_cl pos( x, y, 0, map );
RegionIterator4Chars iter( pos, range );
|
|
From: <ri...@us...> - 2003-09-05 11:04:34
|
Update of /cvsroot/wpdev/xmlscripts/definitions/npcs/humans In directory sc8-pr-cvs1:/tmp/cvs-serv6616/definitions/npcs/humans Modified Files: vendors.xml Log Message: no message Index: vendors.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/humans/vendors.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** vendors.xml 5 Sep 2003 00:26:51 -0000 1.18 --- vendors.xml 5 Sep 2003 11:04:30 -0000 1.19 *************** *** 102,106 **** <npc id="tanner_male"> <inherit>base_male</inherit> - <ai>Human_Vendor</ai> <title>the Tanner</title> <ai>Human_Vendor</ai> --- 102,105 ---- |
|
From: <ri...@us...> - 2003-09-05 00:26:57
|
Update of /cvsroot/wpdev/xmlscripts/definitions/npcs/humans In directory sc8-pr-cvs1:/tmp/cvs-serv7117/definitions/npcs/humans Modified Files: civilists.xml vendors.xml Log Message: fixes for npcs ai Index: civilists.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/humans/civilists.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** civilists.xml 20 Dec 2002 21:51:32 -0000 1.2 --- civilists.xml 5 Sep 2003 00:26:51 -0000 1.3 *************** *** 11,14 **** --- 11,15 ---- <npc id="base_male"> <id>0x190</id> + <ai></ai> <name><random list="NAMES_MALE" /></name> <skin><random list="SKINS_HUMAN" /></skin> *************** *** 33,36 **** --- 34,38 ---- <npc id="base_female"> <id>0x191</id> + <ai></ai> <name><random list="NAMES_FEMALE" /></name> <skin><random list="SKINS_HUMAN" /></skin> Index: vendors.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/humans/vendors.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** vendors.xml 16 Jun 2003 13:35:34 -0000 1.17 --- vendors.xml 5 Sep 2003 00:26:51 -0000 1.18 *************** *** 15,18 **** --- 15,19 ---- <events>speech_banker</events> <bindmenu>banker_menu</bindmenu> + <ai>Human_Vendor</ai> <swordsmanship> <random min="150" max="380"/> *************** *** 31,34 **** --- 32,36 ---- <events>speech_banker</events> <bindmenu>banker_menu</bindmenu> + <ai>Human_Vendor</ai> <swordsmanship> <random min="150" max="380"/> *************** *** 100,103 **** --- 102,106 ---- <npc id="tanner_male"> <inherit>base_male</inherit> + <ai>Human_Vendor</ai> <title>the Tanner</title> <ai>Human_Vendor</ai> |
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv3552 Modified Files: basechar.cpp basechar.h boats.cpp chars.cpp combat.cpp encryption.cpp items.cpp network.cpp npc.cpp npc.h persistentbroker.cpp player.cpp player.h prototypes.h sectors.cpp skills.cpp spawnregions.cpp srvparams.cpp srvparams.h wolf.dsp wolfpack.cpp wolfpack.pro world.cpp wpconsole.cpp wpconsole.h wpdefmanager.cpp Added Files: log.cpp log.h Log Message: Moved logging to cLog.cpp (further cleanup of wolfpack.cpp). --- NEW FILE: log.cpp --- //================================================================================== // // Wolfpack Emu (WP) // UO Server Emulation Program // // Copyright 1997, 98 by Marcus Rating (Cironian) // 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/ //================================================================================== // Wolfpack Includes #include "log.h" #include "globals.h" #include "srvparams.h" #include "network/uosocket.h" #include "wpconsole.h" // QT Includes #include <qdatetime.h> #include <qdir.h> cLog::~cLog() { if( logfile.isOpen() ) logfile.close(); } bool cLog::checkLogFile() { QDate today = QDate::currentDate(); /* Try to open the logfile for today if: a) Our filedescriptor is invalid b) We don't have today anymore */ if( !logfile.isOpen() || currentday != today.day() ) { logfile.close(); // Just to be sure QString path = SrvParams->logPath(); if( !path.endsWith( QChar( QDir::separator() ) ) ) path.append( QDir::separator() ); QString filename; filename.sprintf( "wolfpack-%04u-%02u-%02u.log", today.year(), today.month(), today.day() ); logfile.setName( path + filename ); if( !logfile.open( IO_WriteOnly | IO_Append | IO_Translate ) ) { clConsole.send( QString( "Couldn't open logfile '%1'\n" ).arg( path ) ); return false; } } return true; } /* Log to the logfile only. */ void cLog::log( eLogLevel loglevel, cUOSocket *sock, const QString &string, bool timestamp ) { if( loglevel > this->loglevel ) return; if( !checkLogFile() ) return; // Timestamp the data QTime now = QTime::currentTime(); QCString utfdata = string.utf8(); QCString prelude; if( timestamp ) { prelude.sprintf( "%02u:%02u:", now.hour(), now.minute() ); if( sock ) prelude.append( QString( "%1:" ).arg( sock->uniqueId(), 0, 16 ) ); } // LogLevel switch( loglevel ) { case LOG_ERROR: prelude.append( "ERROR: " ); break; case LOG_WARNING: prelude.append( "WARNING: " ); break; default: prelude.append( " " ); } utfdata.prepend( prelude ); logfile.writeBlock( utfdata.data(), utfdata.length() ); logfile.flush(); } // Sends to the console and logs too void cLog::print( eLogLevel loglevel, const QString &string, bool timestamp ) { // Send to the Console too print( loglevel, 0, string, timestamp ); log( loglevel, 0, string, timestamp ); } void cLog::print( eLogLevel loglevel, cUOSocket *sock, const QString &string, bool timestamp ) { // send to the logfile log( loglevel, sock, string, timestamp ); // Timestamp the data QTime now = QTime::currentTime(); QCString prelude; if( timestamp ) { prelude.sprintf( "%02u:%02u:", now.hour(), now.minute() ); clConsole.ChangeColor( WPC_WHITE ); clConsole.send( prelude ); clConsole.ChangeColor( WPC_NORMAL ); if( sock ) clConsole.send( QString( "%1:" ).arg( sock->uniqueId(), 0, 16 ) ); } // LogLevel switch( loglevel ) { case LOG_ERROR: clConsole.ChangeColor( WPC_RED ); clConsole.send( "ERROR: " ); clConsole.ChangeColor( WPC_NORMAL ); break; case LOG_WARNING: clConsole.ChangeColor( WPC_YELLOW ); clConsole.send( "WARNING: " ); clConsole.ChangeColor( WPC_NORMAL ); break; default: if( !prelude.isEmpty() ) clConsole.send( " " ); } clConsole.send( string ); } --- NEW FILE: log.h --- //================================================================================== // // Wolfpack Emu (WP) // UO Server Emulation Program // // Copyright 1997, 98 by Marcus Rating (Cironian) // 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/ //================================================================================== #if !defined( __LOG_H__ ) #define __LOG_H__ // QT Includes #include <qfile.h> // Wolfpack Includes #include "singleton.h" // Log Levels enum eLogLevel { LOG_MESSAGE = 0, LOG_ERROR, LOG_WARNING, LOG_NOTICE, LOG_TRACE, LOG_DEBUG }; class cUOSocket; class cLog { protected: eLogLevel loglevel; QFile logfile; bool checkLogFile(); unsigned char currentday; // Day of the month our current logfile is for public: cLog(): loglevel( LOG_DEBUG ) {} virtual ~cLog(); // Prints to the logfile only void log( eLogLevel, cUOSocket*, const QString&, bool timestamp = true ); // Sends to the console and logs too void print( eLogLevel, const QString&, bool timestamp = true ); void print( eLogLevel, cUOSocket*, const QString&, bool timestamp = true ); }; typedef SingletonHolder< cLog > Log; #define DEBUG_LOG( value ) Log::instance()->log( LOG_DEBUG, QString( "%1 (%2:%3)" ).arg( value ).arg( __FILE__ ).arg( __LINE__ ) ); #endif Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** basechar.cpp 3 Sep 2003 14:44:21 -0000 1.39 --- basechar.cpp 5 Sep 2003 00:03:44 -0000 1.40 *************** *** 50,53 **** --- 50,54 ---- #include "pythonscript.h" #include "scriptmanager.h" + #include "log.h" #include "skills.h" #include "wpdefmanager.h" *************** *** 1463,1468 **** // DoubleEquip is *NOT* allowed if ( atLayer( layer ) != 0 ) ! { ! clConsole.log( LOG_WARNING, QString( "Trying to put an item on layer %1 which is already occupied\n" ).arg( layer ) ); pi->setContainer( 0 ); return; --- 1464,1469 ---- // DoubleEquip is *NOT* allowed if ( atLayer( layer ) != 0 ) ! { ! log( LOG_WARNING, QString( "Trying to put an item on layer %1 which is already occupied\n" ).arg( layer ) ); pi->setContainer( 0 ); return; Index: basechar.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** basechar.h 3 Sep 2003 14:44:21 -0000 1.29 --- basechar.h 5 Sep 2003 00:03:45 -0000 1.30 *************** *** 47,50 **** --- 47,51 ---- class cUOTxTooltipList; + enum eLogLevel; enum eDamageType *************** *** 101,104 **** --- 102,107 ---- virtual void giveGold( Q_UINT32 amount, bool inBank = false ) = 0; virtual uint takeGold( uint amount, bool useBank = false ) = 0; + virtual void log( eLogLevel, const QString &string ) = 0; + virtual void log( const QString &string ) = 0; unsigned int damage( eDamageType type, unsigned int amount, cUObject *source = 0 ); Index: boats.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/boats.cpp,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** boats.cpp 28 Aug 2003 20:56:16 -0000 1.111 --- boats.cpp 5 Sep 2003 00:03:45 -0000 1.112 *************** *** 47,50 **** --- 47,51 ---- #include "globals.h" #include "wpconsole.h" + #include "log.h" #include "player.h" #include "inlines.h" Index: chars.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/chars.cpp,v retrieving revision 1.329 retrieving revision 1.330 diff -C2 -d -r1.329 -r1.330 *** chars.cpp 27 Aug 2003 20:35:10 -0000 1.329 --- chars.cpp 5 Sep 2003 00:03:45 -0000 1.330 *************** *** 45,48 **** --- 45,49 ---- #include "wpdefmanager.h" #include "wpconsole.h" + #include "log.h" // Qt Includes Index: combat.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/combat.cpp,v retrieving revision 1.147 retrieving revision 1.148 diff -C2 -d -r1.147 -r1.148 *** combat.cpp 3 Sep 2003 20:58:17 -0000 1.147 --- combat.cpp 5 Sep 2003 00:03:45 -0000 1.148 *************** *** 49,52 **** --- 49,53 ---- #include "wpdefmanager.h" #include "basechar.h" + #include "log.h" #include "player.h" #include "npc.h" *************** *** 1042,1052 **** } } - - if( SrvParams->pvpLog() ) - { - sprintf((char*)temp,"%s was killed by %s!\n",pDefender->name().latin1(), pAttacker->name().latin1()); - savelog((char*)temp,"PvP.log"); - } } if( pAttacker->objectType() == enNPC && pAttacker->isAtWar() ) --- 1043,1049 ---- } } } + + Log::instance()->print( LOG_NOTICE, QString( "%1 was killed by %2\n" ).arg( pDefender->name() ).arg( pAttacker->name() ) ); if( pAttacker->objectType() == enNPC && pAttacker->isAtWar() ) Index: encryption.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/encryption.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** encryption.cpp 5 Jul 2003 19:02:13 -0000 1.11 --- encryption.cpp 5 Sep 2003 00:03:45 -0000 1.12 *************** *** 42,45 **** --- 42,46 ---- #include "globals.h" #include "prototypes.h" + #include "log.h" /*! *************** *** 221,225 **** if( elements.size() < 3 ) { ! clConsole.log( LOG_WARNING, QString( "Invalid encryption key line: %1" ).arg( *it ) ); continue; } --- 222,226 ---- if( elements.size() < 3 ) { ! Log::instance()->print( LOG_WARNING, QString( "Invalid encryption key: %1" ).arg( *it ) ); continue; } *************** *** 233,237 **** if( !ok ) { ! clConsole.log( LOG_WARNING, QString( "Couldn't parse key value: %1" ).arg( elements[1].stripWhiteSpace() ) ); continue; } --- 234,238 ---- if( !ok ) { ! Log::instance()->print( LOG_WARNING, QString( "Couldn't parse key value: %1" ).arg( elements[1].stripWhiteSpace() ) ); continue; } *************** *** 241,245 **** if( !ok ) { ! clConsole.log( LOG_WARNING, QString( "Couldn't parse key value: %1" ).arg( elements[2].stripWhiteSpace() ) ); continue; } --- 242,246 ---- if( !ok ) { ! Log::instance()->print( LOG_WARNING, QString( "Couldn't parse key value: %1" ).arg( elements[2].stripWhiteSpace() ) ); continue; } Index: items.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v retrieving revision 1.345 retrieving revision 1.346 diff -C2 -d -r1.345 -r1.346 *** items.cpp 31 Aug 2003 15:23:45 -0000 1.345 --- items.cpp 5 Sep 2003 00:03:45 -0000 1.346 *************** *** 48,51 **** --- 48,52 ---- #include "maps.h" #include "network.h" + #include "log.h" #include "multis.h" #include "persistentbroker.h" Index: network.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network.cpp,v retrieving revision 1.136 retrieving revision 1.137 diff -C2 -d -r1.136 -r1.137 *** network.cpp 3 Sep 2003 20:58:17 -0000 1.136 --- network.cpp 5 Sep 2003 00:03:45 -0000 1.137 *************** *** 113,120 **** QSocketDevice *socket = loginServer_->getNewConnection(); netIo_->registerSocket( socket, true ); ! loginSockets.append( new cUOSocket(socket) ); // Notify the admin ! clConsole.send( QString( "[%1] Client connected (LoginServer)\n" ).arg( socket->peerAddress().toString() ) ); } --- 113,121 ---- QSocketDevice *socket = loginServer_->getNewConnection(); netIo_->registerSocket( socket, true ); ! cUOSocket *uosocket = new cUOSocket(socket); ! loginSockets.append( uosocket ); // Notify the admin ! uosocket->log( QString( "Client connected to login server (%1).\n" ).arg( socket->peerAddress().toString() ) ); } *************** *** 124,131 **** QSocketDevice *socket = gameServer_->getNewConnection(); netIo_->registerSocket( socket, false ); ! loginSockets.append( new cUOSocket(socket) ); // Notify the admin ! clConsole.send( QString( "[%1] Client connected (GameServer)\n" ).arg( socket->peerAddress().toString() ) ); } --- 125,133 ---- QSocketDevice *socket = gameServer_->getNewConnection(); netIo_->registerSocket( socket, false ); ! cUOSocket *uosocket = new cUOSocket(socket); ! loginSockets.append( uosocket ); // Notify the admin ! uosocket->log( QString( "Client connected to game server (%1).\n" ).arg( socket->peerAddress().toString() ) ); } *************** *** 141,145 **** if ( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isWritable() || uoSocket->socket()->isInactive() || !uoSocket->socket()->isOpen() ) { ! clConsole.send( tr( "[%1] Client disconnected\n" ).arg( uoSocket->ip() ) ); uoSocket->disconnect(); netIo_->unregisterSocket( uoSocket->socket() ); --- 143,147 ---- if ( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isWritable() || uoSocket->socket()->isInactive() || !uoSocket->socket()->isOpen() ) { ! uoSocket->log( "Client disconnected.\n" ); uoSocket->disconnect(); netIo_->unregisterSocket( uoSocket->socket() ); *************** *** 159,163 **** if( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isOpen() ) { ! clConsole.send( tr( "[%1] Client disconnected\n" ).arg( uoSocket->ip() ) ); netIo_->unregisterSocket( uoSocket->socket() ); loginSockets.remove(); --- 161,165 ---- if( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isOpen() ) { ! uoSocket->log( "Client disconnected.\n" ); netIo_->unregisterSocket( uoSocket->socket() ); loginSockets.remove(); Index: npc.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** npc.cpp 3 Sep 2003 14:44:21 -0000 1.38 --- npc.cpp 5 Sep 2003 00:03:45 -0000 1.39 *************** *** 45,48 **** --- 45,49 ---- #include "sectors.h" #include "srvparams.h" + #include "log.h" #include "corpse.h" #include "wpdefmanager.h" *************** *** 1548,1550 **** --- 1549,1562 ---- setFame( nCurFame+nChange ); } + } + + void cNPC::log( eLogLevel loglevel, const QString &string ) + { + // NPC's usually don't have sockets + Log::instance()->print( loglevel, string ); + } + + void cNPC::log( const QString &string ) + { + log( LOG_NOTICE, string ); } Index: npc.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/npc.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** npc.h 3 Sep 2003 14:44:21 -0000 1.23 --- npc.h 5 Sep 2003 00:03:45 -0000 1.24 *************** *** 102,105 **** --- 102,107 ---- virtual void applyDefinition( const cElement* ); virtual void flagUnchanged() { cNPC::changed_ = false; cBaseChar::flagUnchanged(); } + void log( eLogLevel, const QString &string ); + void log( const QString &string ); void awardFame( short amount ); void awardKarma( P_CHAR pKilled, short amount ); Index: persistentbroker.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/persistentbroker.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** persistentbroker.cpp 3 Sep 2003 12:23:17 -0000 1.23 --- persistentbroker.cpp 5 Sep 2003 00:03:45 -0000 1.24 *************** *** 36,39 **** --- 36,40 ---- #include "wpconsole.h" #include "globals.h" + #include "log.h" // Qt Includes *************** *** 70,74 **** sqlite = false; #else ! clConsole.log( LOG_FATAL, QString("Sorry, you have to define MYSQL_DRIVER to make wolfpack work with MySQL.") ); exit( -1 ); #endif --- 71,75 ---- sqlite = false; #else ! Log::instance()->print( LOG_ERROR, "Sorry, you have to define MYSQL_DRIVER to make wolfpack work with MySQL.\n" ); exit( -1 ); #endif Index: player.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** player.cpp 3 Sep 2003 14:44:21 -0000 1.34 --- player.cpp 5 Sep 2003 00:03:45 -0000 1.35 *************** *** 48,51 **** --- 48,52 ---- #include "skills.h" #include "pythonscript.h" + #include "log.h" #include "scriptmanager.h" #include "inlines.h" *************** *** 474,485 **** setcharflag( pp_t ); } - - if( SrvParams->pvpLog() ) - { - sprintf((char*)temp,"%s was killed by %s!\n", name().latin1(),pp_t->name().latin1()); - savelog((char*)temp,"PvP.log"); - } } if( pc_t->objectType() == enNPC && pc_t->isAtWar() ) --- 475,481 ---- setcharflag( pp_t ); } } + Log::instance()->print( LOG_NOTICE, QString( "%1 was killed by %2\n" ).arg( name() ).arg( pc_t->name() ) ); if( pc_t->objectType() == enNPC && pc_t->isAtWar() ) *************** *** 1772,1774 **** --- 1768,1780 ---- socket()->clilocMessage( message ); + } + + void cPlayer::log( eLogLevel loglevel, const QString &string ) + { + Log::instance()->print( loglevel, socket_, string ); + } + + void cPlayer::log( const QString &string ) + { + log( LOG_NOTICE, string ); } Index: player.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/player.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** player.h 3 Sep 2003 14:44:21 -0000 1.21 --- player.h 5 Sep 2003 00:03:45 -0000 1.22 *************** *** 80,83 **** --- 80,85 ---- virtual UINT32 takeGold( UINT32 amount, bool useBank = false ); virtual void flagUnchanged(); + void log( eLogLevel, const QString &string ); + void log( const QString &string ); void awardFame( short amount ); void awardKarma( P_CHAR pKilled, short amount ); Index: prototypes.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/prototypes.h,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** prototypes.h 3 Sep 2003 15:05:56 -0000 1.108 --- prototypes.h 5 Sep 2003 00:03:45 -0000 1.109 *************** *** 38,42 **** QString hex2dec( const QString& value ); void showPaperdoll( cUOSocket *socket, P_CHAR pTarget, bool hotkey ); - void savelog(const char *msg, char *logfile); void goldsfx( cUOSocket *socket, UINT16 amount, bool hearall ); --- 38,41 ---- Index: sectors.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/sectors.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** sectors.cpp 1 Sep 2003 05:03:03 -0000 1.14 --- sectors.cpp 5 Sep 2003 00:03:45 -0000 1.15 *************** *** 12,15 **** --- 12,16 ---- #include "items.h" #include "basechar.h" + #include "log.h" #include <math.h> Index: skills.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/skills.cpp,v retrieving revision 1.205 retrieving revision 1.206 diff -C2 -d -r1.205 -r1.206 *** skills.cpp 3 Sep 2003 20:58:17 -0000 1.205 --- skills.cpp 5 Sep 2003 00:03:45 -0000 1.206 *************** *** 48,51 **** --- 48,52 ---- #include "maps.h" #include "network/uosocket.h" + #include "log.h" #include "targetrequests.h" #include "territories.h" Index: spawnregions.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/spawnregions.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** spawnregions.cpp 4 Sep 2003 01:22:54 -0000 1.45 --- spawnregions.cpp 5 Sep 2003 00:03:45 -0000 1.46 *************** *** 44,47 **** --- 44,48 ---- #include "maps.h" #include "walking.h" + #include "log.h" #include "utilsys.h" #include "chars.h" Index: srvparams.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/srvparams.cpp,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** srvparams.cpp 26 Aug 2003 15:05:38 -0000 1.86 --- srvparams.cpp 5 Sep 2003 00:03:45 -0000 1.87 *************** *** 212,216 **** heartBeat_ = getBool("General", "HeartBeat", false, true); defaultpriv2_ = getNumber("General", "DefaultPrivileage2", 0, true); ! mulPath_ = QDir::convertSeparators( getString("General", "MulPath", "./", true) ); // Network --- 212,217 ---- heartBeat_ = getBool("General", "HeartBeat", false, true); defaultpriv2_ = getNumber("General", "DefaultPrivileage2", 0, true); ! mulPath_ = QDir::convertSeparators( getString("General", "MulPath", "./muls/", true) ); ! logPath_ = QDir::convertSeparators( getString("General", "LogPath", "./logs/", true ) ); // Network *************** *** 382,385 **** --- 383,393 ---- mulPath_ = data; setString("General", "MulPath", data); + flush(); + } + + void cSrvParams::setLogPath( const QString &data ) + { + logPath_ = data; + setString("General", "LogPath", data ); flush(); } Index: srvparams.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/srvparams.h,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** srvparams.h 26 Aug 2003 15:01:05 -0000 1.54 --- srvparams.h 5 Sep 2003 00:03:45 -0000 1.55 *************** *** 154,157 **** --- 154,158 ---- int defaultpriv2_; QString mulPath_; + QString logPath_; int maxLoginAttempts_; int resetAttemptCount_; *************** *** 333,337 **** --- 334,340 ---- int defaultpriv2() const; QString mulPath() const; + QString logPath() const; void setMulPath( const QString& data ); + void setLogPath( const QString& data ); int MaxLoginAttempts() const; int AccountBlockTime() const; *************** *** 1149,1152 **** --- 1152,1160 ---- { return pathfindFleeRadius_; + } + + inline QString cSrvParams::logPath() const + { + return logPath_; } Index: wolf.dsp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v retrieving revision 1.216 retrieving revision 1.217 diff -C2 -d -r1.216 -r1.217 *** wolf.dsp 4 Sep 2003 01:22:54 -0000 1.216 --- wolf.dsp 5 Sep 2003 00:03:45 -0000 1.217 *************** *** 203,206 **** --- 203,210 ---- # Begin Source File + SOURCE=.\log.cpp + # End Source File + # Begin Source File + SOURCE=.\makemenus.cpp # End Source File *************** *** 614,617 **** --- 618,625 ---- SOURCE=.\items.h # PROP Ignore_Default_Tool 1 + # End Source File + # Begin Source File + + SOURCE=.\log.h # End Source File # Begin Source File Index: wolfpack.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v retrieving revision 1.454 retrieving revision 1.455 diff -C2 -d -r1.454 -r1.455 *** wolfpack.cpp 3 Sep 2003 20:58:17 -0000 1.454 --- wolfpack.cpp 5 Sep 2003 00:03:46 -0000 1.455 *************** *** 30,34 **** //================================================================================== - #include "wolfpack.h" #include "world.h" --- 30,33 ---- *************** *** 55,58 **** --- 54,58 ---- #include "maps.h" #include "wpdefmanager.h" + #include "log.h" #include "scriptmanager.h" #include "wptargetrequests.h" *************** *** 520,524 **** catch( ... ) { ! clConsole.log( LOG_FATAL, "Couldn't start up classes." ); exit( -1 ); } --- 520,524 ---- catch( ... ) { ! clConsole.log( LOG_ERROR, "Couldn't start up classes.\n" ); exit( -1 ); } *************** *** 536,540 **** catch( ... ) { ! clConsole.log( LOG_FATAL, "Couldn't load translator." ); exit( -1 ); } --- 536,540 ---- catch( ... ) { ! clConsole.log( LOG_ERROR, "Couldn't load translator.\n" ); exit( -1 ); } *************** *** 547,551 **** catch( ... ) { ! clConsole.log( LOG_FATAL, "Couldn't start up python." ); exit( -1 ); } --- 547,551 ---- catch( ... ) { ! clConsole.log( LOG_ERROR, "Couldn't start up python.\n" ); exit( -1 ); } *************** *** 612,621 **** catch( wpException &exception ) { ! clConsole.log( LOG_FATAL, exception.error() ); exit( -1 ); } catch( ... ) { ! clConsole.log( LOG_FATAL, "Unknown error while loading data files." ); exit( -1 ); } --- 612,621 ---- catch( wpException &exception ) { ! clConsole.log( LOG_ERROR, exception.error() ); exit( -1 ); } catch( ... ) { ! clConsole.log( LOG_ERROR, "Unknown error while loading data files.\n" ); exit( -1 ); } *************** *** 632,636 **** 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 ); } --- 632,636 ---- if( !persistentBroker->openDriver( SrvParams->databaseDriver() ) ) { ! clConsole.log( LOG_ERROR, QString("Error trying to open %1 database driver, check your wolfpack.xml").arg(SrvParams->databaseDriver()) ); exit( -1 ); } *************** *** 667,676 **** catch( QString &error ) { ! clConsole.log( LOG_FATAL, error ); exit( -1 ); } catch( ... ) { ! clConsole.log( LOG_FATAL, "An unknown error occured while loading the world." ); exit( -1 ); } --- 667,676 ---- catch( QString &error ) { ! clConsole.log( LOG_ERROR, error ); exit( -1 ); } catch( ... ) { ! clConsole.log( LOG_ERROR, "An unknown error occured while loading the world.\n" ); exit( -1 ); } *************** *** 683,689 **** endtime = 0; lclock = 0; - - if( SrvParams->serverLog() ) - savelog( "Server startup", "server.log" ); uiCurrentTime = getNormalizedTime(); --- 683,686 ---- *************** *** 852,858 **** stopPython(); - if( SrvParams->serverLog() ) - savelog( "Server shutdown","server.log" ); - return 0; } --- 849,852 ---- *************** *** 1027,1044 **** } } - - - 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 ); - } \ No newline at end of file --- 1021,1022 ---- Index: wolfpack.pro =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v retrieving revision 1.151 retrieving revision 1.152 diff -C2 -d -r1.151 -r1.152 *** wolfpack.pro 4 Sep 2003 20:10:03 -0000 1.151 --- wolfpack.pro 5 Sep 2003 00:03:46 -0000 1.152 *************** *** 82,85 **** --- 82,86 ---- itemid.h \ items.h \ + log.h \ makemenus.h \ multis.h \ *************** *** 150,153 **** --- 151,155 ---- itemid.cpp \ items.cpp \ + log.cpp \ makemenus.cpp \ maps.cpp \ Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** world.cpp 2 Sep 2003 01:27:57 -0000 1.36 --- world.cpp 5 Sep 2003 00:03:46 -0000 1.37 *************** *** 45,48 **** --- 45,49 ---- #include "player.h" #include "npc.h" + #include "log.h" #include <sqlite.h> *************** *** 267,271 **** else { ! clConsole.log( LOG_FATAL, tr( "An unknown temporary Effect class was found: %1" ).arg( objectID ) ); continue; // Skip the class, not a good habit but at the moment the user couldn't really debug the error } --- 268,272 ---- else { ! clConsole.log( LOG_ERROR, tr( "An unknown temporary Effect class was found: %1" ).arg( objectID ) ); continue; // Skip the class, not a good habit but at the moment the user couldn't really debug the error } *************** *** 449,453 **** catch( QString &e ) { ! clConsole.log( LOG_FATAL, QString( "Couldn't open the database: %1\n" ).arg( e ) ); return; } --- 450,454 ---- catch( QString &e ) { ! clConsole.log( LOG_ERROR, QString( "Couldn't open the database: %1\n" ).arg( e ) ); return; } Index: wpconsole.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wpconsole.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** wpconsole.cpp 2 Sep 2003 01:07:44 -0000 1.24 --- wpconsole.cpp 5 Sep 2003 00:03:46 -0000 1.25 *************** *** 33,36 **** --- 33,37 ---- #include "wpconsole.h" #include "pythonscript.h" + #include "log.h" // Library Includes *************** *** 112,139 **** void WPConsole_cl::log( UINT8 logLevel, const QString &message ) { ! if( incompleteLine_.length() > 0 ) ! send( "\n" ); // End line ! ! switch( logLevel ) ! { ! case LOG_ERROR: ! case LOG_FATAL: ! ChangeColor( WPC_RED ); ! send( "ERROR" ); ! ChangeColor( WPC_NORMAL ); ! break; ! case LOG_NOTICE: ! ChangeColor( WPC_WHITE ); ! send( "NOTICE" ); ! ChangeColor( WPC_NORMAL ); ! break; ! case LOG_WARNING: ! ChangeColor( WPC_YELLOW ); ! send( "WARNING" ); ! ChangeColor( WPC_NORMAL ); ! break; ! } ! send( ": " + message + "\n" ); } --- 113,123 ---- void WPConsole_cl::log( UINT8 logLevel, const QString &message ) { ! // Legacy Code ! QString msg = message; ! ! if( msg.endsWith( "\n" ) ) ! msg = msg.left( msg.length() - 1 ); ! Log::instance()->print( (eLogLevel)logLevel, msg + "\n" ); } Index: wpconsole.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wpconsole.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wpconsole.h 4 Jul 2003 16:30:48 -0000 1.18 --- wpconsole.h 5 Sep 2003 00:03:46 -0000 1.19 *************** *** 64,73 **** }; - // I'll use defines here - #define LOG_ERROR 1 - #define LOG_WARNING 2 - #define LOG_NOTICE 3 - #define LOG_FATAL 4 - class WPConsole_cl { --- 64,67 ---- Index: wpdefmanager.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** wpdefmanager.cpp 2 Sep 2003 02:06:34 -0000 1.60 --- wpdefmanager.cpp 5 Sep 2003 00:03:46 -0000 1.61 *************** *** 39,42 **** --- 39,43 ---- #include "encryption.h" #include "basedef.h" + #include "log.h" // Library Includes |
|
From: <dar...@us...> - 2003-09-05 00:05:39
|
Update of /cvsroot/wpdev/wolfpack/network
In directory sc8-pr-cvs1:/tmp/cvs-serv3552/network
Modified Files:
uosocket.cpp uosocket.h
Log Message:
Moved logging to cLog.cpp (further cleanup of wolfpack.cpp).
Index: uosocket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v
retrieving revision 1.281
retrieving revision 1.282
diff -C2 -d -r1.281 -r1.282
*** uosocket.cpp 3 Sep 2003 20:58:17 -0000 1.281
--- uosocket.cpp 5 Sep 2003 00:03:46 -0000 1.282
***************
*** 64,67 ****
--- 64,68 ----
#include "../chars.h"
#include "../npc.h"
+ #include "../log.h"
#include "../ai.h"
***************
*** 101,104 ****
--- 102,106 ----
_socket->resetStatus();
_ip = _socket->peerAddress().toString();
+ _uniqueId = sDevice->socket();
tooltipscache_ = new QBitArray;
}
***************
*** 193,197 ****
if( lastPacket == 0x73 && packetId == 0x73 )
{
! clConsole.send( tr( "[%1] Idle Disconnected" ).arg( _socket->peerAddress().toString() ) );
disconnect();
return;
--- 195,199 ----
if( lastPacket == 0x73 && packetId == 0x73 )
{
! log( "Disconnected idling socket.\n" );
disconnect();
return;
***************
*** 201,209 ****
if( ( _account < 0 ) && ( packetId != 0x80 ) && ( packetId != 0x91 ) )
{
! clConsole.send( tr( "Communication Error [%1 instead of 0x80|0x91] [%2]\n" ).arg( packetId, 2, 16 ).arg( _socket->peerAddress().toString() ) );
cUOTxDenyLogin denyLogin;
denyLogin.setReason( DL_BADCOMMUNICATION );
send( &denyLogin );
disconnect();
return;
}
--- 203,214 ----
if( ( _account < 0 ) && ( packetId != 0x80 ) && ( packetId != 0x91 ) )
{
! log( QString( "Communication error: %1 instead of 0x80 or 0x91\n" ).arg( packetId, 2, 16 ) );
!
cUOTxDenyLogin denyLogin;
denyLogin.setReason( DL_BADCOMMUNICATION );
send( &denyLogin );
+
disconnect();
+
return;
}
***************
*** 627,631 ****
_account = authRet;
! clConsole.send( tr( "[%2] Account autocreated: '%1'\n" ).arg( username ).arg( _socket->peerAddress().toString() ) );
return true;
}
--- 632,636 ----
_account = authRet;
! log( QString( "Automatically created account '%1'.\n" ).arg( username ) );
return true;
}
***************
*** 642,651 ****
};
! clConsole.send( tr( "[%2] Failed to log in as '%1'\n" ).arg( username ).arg( _socket->peerAddress().toString() ) );
send( &denyPacket );
}
else if( error == cAccounts::NoError )
{
! clConsole.send( tr( "[%2] Identified as '%1'\n" ).arg( username ).arg( _socket->peerAddress().toString() ) );
}
--- 647,656 ----
};
! log( QString( "Failed to log in as '%1'.\n" ).arg( username ) );
send( &denyPacket );
}
else if( error == cAccounts::NoError )
{
! log( QString( "Logged in as '%1'.\n" ).arg( username ) );
}
***************
*** 668,672 ****
if ( !_account )
{
- clConsole.send( tr("%1 sent cUORxCreateChar without being authenticated, disconnecting. Probably a crypt client").arg(this->_socket->peerAddress().toString()) );
this->_socket->close();
return;
--- 673,676 ----
***************
*** 677,681 ****
if( characters.size() >= 5 )
{
- clConsole.send( tr( "%1 is trying to create char but has more than 5 characters" ).arg( _account->login() ) );
cancelCreate( tr("You already have more than 5 characters") )
}
--- 681,684 ----
***************
*** 683,696 ****
// Check the stats
Q_UINT16 statSum = ( packet->strength() + packet->dexterity() + packet->intelligence() );
- if( statSum > 80 )
- {
- clConsole.send( tr( "%1 is trying to create character with wrong stats: %2\n" ).arg( _account->login() ).arg( statSum ) );
- cancelCreate( tr( "Invalid Character stat sum: %1" ).arg( statSum ) )
- }
! // Every stat needs to be below 60
! if( ( packet->strength() > 60 ) || ( packet->dexterity() > 60 ) || ( packet->intelligence() > 60 ) )
{
! clConsole.send( tr( "%1 is trying to create char with wrong stats: %2 [str] %3 [dex] %4 [int]" ).arg( _account->login() ).arg( packet->strength() ).arg( packet->dexterity() ).arg( packet->intelligence() ) );
cancelCreate( tr("Invalid Character stats") )
}
--- 686,694 ----
// Check the stats
Q_UINT16 statSum = ( packet->strength() + packet->dexterity() + packet->intelligence() );
! // Every stat needs to be below 60 && the sum lower/equal than 80
! if( statSum > 80 || ( packet->strength() > 60 ) || ( packet->dexterity() > 60 ) || ( packet->intelligence() > 60 ) )
{
! log( QString( "Submitted invalid stats during char creation (%1,%2,%3).\n" ).arg( packet->strength() ).arg( packet->dexterity() ).arg( packet->intelligence() ) );
cancelCreate( tr("Invalid Character stats") )
}
***************
*** 702,707 ****
( packet->skillValue1() + packet->skillValue2() + packet->skillValue3() > 100 ) )
{
! clConsole.send( tr( "%1 is trying to create char with wrong skills: %1 [%2%] %3 [%4%] %5 [%6%]" ).arg( _account->login() ).arg( packet->skillId1() ).arg( packet->skillValue1() ).arg( packet->skillId2() ).arg( packet->skillValue2() ).arg( packet->skillId3() ).arg( packet->skillValue3() ) );
! cancelCreate( tr("Invalid Character skills") )
}
--- 700,705 ----
( packet->skillValue1() + packet->skillValue2() + packet->skillValue3() > 100 ) )
{
! log( QString( "Submitted invalid skills during char creation (%1=%2,%3=%4,%5=%6).\n" ).arg( packet->skillId1() ).arg( packet->skillValue1() ).arg( packet->skillId2() ).arg( packet->skillValue2() ).arg( packet->skillId3() ).arg( packet->skillValue3() ) );
! cancelCreate( tr( "Invalid Character skills" ) )
}
***************
*** 709,713 ****
if( packet->hairStyle() && ( !isHair( packet->hairStyle() ) || !isHairColor( packet->hairColor() ) ) )
{
! clConsole.send( tr( "%1 is trying to create a char with wrong hair %2 [Color: %3]" ).arg( _account->login() ).arg( packet->hairStyle() ).arg( packet->hairColor() ) );
cancelCreate( tr("Invalid hair") )
}
--- 707,711 ----
if( packet->hairStyle() && ( !isHair( packet->hairStyle() ) || !isHairColor( packet->hairColor() ) ) )
{
! log( QString( "Submitted wrong hair style (%1) or wrong hair color (%2) during char creation.\n" ).arg( packet->hairStyle() ).arg( packet->hairColor() ) );
cancelCreate( tr("Invalid hair") )
}
***************
*** 716,720 ****
if( packet->beardStyle() && ( !isBeard( packet->beardStyle() ) || !isHairColor( packet->beardColor() ) ) )
{
! clConsole.send( tr( "%1 is trying to create a char with wrong beard %2 [Color: %3]" ).arg( _account->login() ).arg( packet->beardStyle() ).arg( packet->beardColor() ) );
cancelCreate( tr("Invalid beard") )
}
--- 714,718 ----
if( packet->beardStyle() && ( !isBeard( packet->beardStyle() ) || !isHairColor( packet->beardColor() ) ) )
{
! log( QString( "Submitted wrong beard style (%1) or wrong beard color (%2) during char creation.\n" ).arg( packet->beardStyle() ).arg( packet->beardColor() ) );
cancelCreate( tr("Invalid beard") )
}
***************
*** 723,727 ****
if( !isNormalColor( packet->shirtColor() ) || !isNormalColor( packet->pantsColor() ) )
{
! clConsole.send( tr( "%1 is trying to create a char with wrong shirt [%2] or pant [%3] color" ).arg( _account->login() ).arg( packet->shirtColor() ).arg( packet->pantsColor() ) );
cancelCreate( tr("Invalid shirt or pant color") )
}
--- 721,725 ----
if( !isNormalColor( packet->shirtColor() ) || !isNormalColor( packet->pantsColor() ) )
{
! log( QString( "Submitted wrong shirt (%1) or pant (%2) color during char creation.\n" ).arg( packet->shirtColor() ).arg( packet->pantsColor() ) );
cancelCreate( tr("Invalid shirt or pant color") )
}
***************
*** 729,735 ****
// Check the start location
vector< StartLocation_st > startLocations = SrvParams->startLocation();
! if( packet->startTown() > startLocations.size() )
{
! clConsole.send( tr( "%1 is trying to create a char with wrong start location: %2" ).arg( _account->login() ).arg( packet->startTown() ) );
cancelCreate( tr("Invalid start location") )
}
--- 727,734 ----
// Check the start location
vector< StartLocation_st > startLocations = SrvParams->startLocation();
!
! if( packet->startTown() >= startLocations.size() )
{
! log( QString( "Submitted wrong starting location (%1) during char creation.\n" ).arg( packet->startTown() ) );
cancelCreate( tr("Invalid start location") )
}
***************
*** 738,742 ****
if( !isSkinColor( packet->skinColor() ) )
{
! clConsole.send( tr( "%1 is trying to create a char with wrong skin color: %2" ).arg( _account->login() ).arg( packet->skinColor() ) );
cancelCreate( tr("Invalid skin color") )
}
--- 737,741 ----
if( !isSkinColor( packet->skinColor() ) )
{
! log( QString( "Submitted a wrong skin color (%1) during char creation.\n" ).arg( packet->skinColor() ) );
cancelCreate( tr("Invalid skin color") )
}
***************
*** 2188,2201 ****
void cUOSocket::handleGumpResponse( cUORxGumpResponse* packet )
{
- if( gumps.find( packet->serial() ) == gumps.end() )
- {
- sysMessage( tr( "Unexpected button input" ) );
- return;
- }
-
QMap< SERIAL, cGump* >::iterator it( gumps.find( packet->serial() ) );
! if ( it == gumps.end() )
{
! clConsole.send( tr("Invalid gump response packet received from %1").arg(_account->login()) );
return;
}
--- 2187,2195 ----
void cUOSocket::handleGumpResponse( cUORxGumpResponse* packet )
{
QMap< SERIAL, cGump* >::iterator it( gumps.find( packet->serial() ) );
!
! if( it == gumps.end() )
{
! sysMessage( tr( "Unexpected button input" ) );
return;
}
***************
*** 2549,2551 ****
--- 2543,2555 ----
tooltipscache_->setBit( data );
+ }
+
+ void cUOSocket::log( const QString &message )
+ {
+ Log::instance()->print( LOG_MESSAGE, this, message );
+ }
+
+ void cUOSocket::log( eLogLevel loglevel, const QString &message )
+ {
+ Log::instance()->print( loglevel, this, message );
}
Index: uosocket.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.h,v
retrieving revision 1.92
retrieving revision 1.93
diff -C2 -d -r1.92 -r1.93
*** uosocket.h 30 Aug 2003 17:00:13 -0000 1.92
--- uosocket.h 5 Sep 2003 00:03:46 -0000 1.93
***************
*** 55,58 ****
--- 55,59 ----
#include "../customtags.h"
+ enum eLogLevel;
struct stTargetItem
***************
*** 207,210 ****
--- 208,213 ----
void sendQuestArrow( bool show, UINT16 x, UINT16 y );
void closeGump( UINT32 type, UINT32 returnCode );
+ void log( eLogLevel loglevel, const QString &message );
+ void log( const QString &message );
void allowMove( Q_UINT8 sequence );
|
|
From: <thi...@us...> - 2003-09-04 20:10:07
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv21699
Modified Files:
makemenus.h wolfpack.pro
Log Message:
Oops
Index: makemenus.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/makemenus.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** makemenus.h 6 Jul 2003 13:48:01 -0000 1.28
--- makemenus.h 4 Sep 2003 20:10:03 -0000 1.29
***************
*** 321,325 ****
void setName( const QString& data ) { name_ = data; }
void setModel( UINT16 data ) { model_ = data; }
! void appendSection( cMakeSection* pms ) { makesections_.append( pms ); }
SectionContainer makesections() const { return makesections_; }
--- 321,325 ----
void setName( const QString& data ) { name_ = data; }
void setModel( UINT16 data ) { model_ = data; }
! void appendSection( cMakeSection* pms ) { makesections_.push_back( pms ); }
SectionContainer makesections() const { return makesections_; }
Index: wolfpack.pro
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v
retrieving revision 1.150
retrieving revision 1.151
diff -C2 -d -r1.150 -r1.151
*** wolfpack.pro 4 Sep 2003 19:24:47 -0000 1.150
--- wolfpack.pro 4 Sep 2003 20:10:03 -0000 1.151
***************
*** 51,55 ****
win32-borland:LIBS += ws2_32.lib
! DEFINES += -DMYSQL_DRIVER
# Common files
--- 51,55 ----
win32-borland:LIBS += ws2_32.lib
! DEFINES += MYSQL_DRIVER
# Common files
|
|
From: <thi...@us...> - 2003-09-04 19:24:51
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv10681
Modified Files:
wolfpack.pro
Log Message:
Small fix
Index: wolfpack.pro
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v
retrieving revision 1.149
retrieving revision 1.150
diff -C2 -d -r1.149 -r1.150
*** wolfpack.pro 4 Sep 2003 00:33:05 -0000 1.149
--- wolfpack.pro 4 Sep 2003 19:24:47 -0000 1.150
***************
*** 17,21 ****
LIBS += -L/usr/local/lib/mysql/lib/mysql -L/usr/local/lib -Llib/Python -L/usr/lib/mysql -ldl -lpython2.2 -lmysqlclient -lutil
! # Optional compile modes
release {
--- 17,22 ----
LIBS += -L/usr/local/lib/mysql/lib/mysql -L/usr/local/lib -Llib/Python -L/usr/lib/mysql -ldl -lpython2.2 -lmysqlclient -lutil
! # Optional compile modes
! release:debug:error(You can't have release and debug at the same time!)
release {
***************
*** 45,55 ****
win32:INCLUDEPATH += lib/Python/PC C:/mysql/include/
win32-g++:LIBS= -lwsock32
! win32-msvc:LIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comdlg32.lib ws2_32.lib ZThread.lib
win32-msvc:TMAKE_CXXFLAGS = /J /nologo /ML /W3 /GX /O2 /YX /FD /c
win32-borland:TMAKE_CXXFLAGS = -K -6 -q -x -WM -w-8057 -w-8066 -w-8060 -w-8027 -w-8059 -w-8004 -w-8012
! win32-borland:LIBS = ws2_32.lib lib/ZThread/lib/ZThread.lib
! QMAKE_CFLAGS += -DMYSQL_DRIVER
! QMAKE_CXXFLAGS += -DMYSQL_DRIVER
# Common files
--- 46,55 ----
win32:INCLUDEPATH += lib/Python/PC C:/mysql/include/
win32-g++:LIBS= -lwsock32
! win32-msvc:LIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comdlg32.lib ws2_32.lib
win32-msvc:TMAKE_CXXFLAGS = /J /nologo /ML /W3 /GX /O2 /YX /FD /c
win32-borland:TMAKE_CXXFLAGS = -K -6 -q -x -WM -w-8057 -w-8066 -w-8060 -w-8027 -w-8059 -w-8004 -w-8012
! win32-borland:LIBS += ws2_32.lib
! DEFINES += -DMYSQL_DRIVER
# Common files
|
|
From: <thi...@us...> - 2003-09-04 01:22:58
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv14222 Modified Files: debug.cpp spawnregions.cpp walking.cpp wolf.dsp Log Message: Fixed spawn region cleared up Python extension to map tiles. Index: debug.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/debug.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** debug.cpp 11 Aug 2003 03:34:40 -0000 1.11 --- debug.cpp 4 Sep 2003 01:22:54 -0000 1.12 *************** *** 579,583 **** }; ! static debugThread myDebugThread; --- 579,583 ---- }; ! //static debugThread myDebugThread; Index: spawnregions.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/spawnregions.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** spawnregions.cpp 23 Aug 2003 01:03:31 -0000 1.44 --- spawnregions.cpp 4 Sep 2003 01:22:54 -0000 1.45 *************** *** 216,220 **** pos.z = this->z_[rndRectNum]; else ! pos.z = Map->height( pos ); pos.map = rectangles_[rndRectNum].map; --- 216,220 ---- pos.z = this->z_[rndRectNum]; else ! pos.z = Map->mapElevation( pos ); pos.map = rectangles_[rndRectNum].map; *************** *** 296,299 **** --- 296,300 ---- this->npcSerials_.push_back( pc->serial() ); pc->setSpawnregion( this->name_ ); + pc->update(); } } Index: walking.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/walking.cpp,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** walking.cpp 3 Sep 2003 20:58:17 -0000 1.89 --- walking.cpp 4 Sep 2003 01:22:54 -0000 1.90 *************** *** 1509,1513 **** if( pos.x >= ( Map->mapTileWidth(pos.map) * 8 ) || pos.y >= ( Map->mapTileHeight(pos.map) * 8 ) ) return false; ! const signed char elev = Map->height( pos ); Coord_cl target = pos; target.z = elev; --- 1509,1513 ---- if( pos.x >= ( Map->mapTileWidth(pos.map) * 8 ) || pos.y >= ( Map->mapTileHeight(pos.map) * 8 ) ) return false; ! const signed char elev = Map->mapElevation( pos ); Coord_cl target = pos; target.z = elev; Index: wolf.dsp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v retrieving revision 1.215 retrieving revision 1.216 diff -C2 -d -r1.215 -r1.216 *** wolf.dsp 3 Sep 2003 20:58:17 -0000 1.215 --- wolf.dsp 4 Sep 2003 01:22:54 -0000 1.216 *************** *** 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" --- 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" /D "MYSQL_DRIVER" /FR /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" *************** *** 77,81 **** 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 --- 77,81 ---- 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-mt320.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 |
|
From: <thi...@us...> - 2003-09-04 01:22:58
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv14222/python
Modified Files:
global.cpp
Log Message:
Fixed spawn region
cleared up Python extension to map tiles.
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.84
retrieving revision 1.85
diff -C2 -d -r1.84 -r1.85
*** global.cpp 2 Sep 2003 02:31:32 -0000 1.84
--- global.cpp 4 Sep 2003 01:22:54 -0000 1.85
***************
*** 500,519 ****
Q_UNUSED(self);
// Minimum is x, y, map
! if( !checkArgInt( 0 ) || !checkArgInt( 1 ) || !checkArgInt( 2 ) )
! {
! PyErr_BadArgument();
return 0;
- }
-
- bool exact = true;
-
- if( checkArgInt( 3 ) && getArgInt( 3 ) == 0 )
- exact = false;
! StaticsIterator iter = Map->staticsIterator( Coord_cl( getArgInt( 0 ), getArgInt( 1 ), 0, getArgInt( 2 ) ), exact );
PyObject *list = PyList_New( 0 );
! UINT32 xBlock = getArgInt( 0 ) / 8;
! UINT32 yBlock = getArgInt( 1 ) / 8;
while( !iter.atEnd() )
--- 500,513 ----
Q_UNUSED(self);
// Minimum is x, y, map
! uint x = 0, y = 0, map = 0;
! uchar exact = 0;
! if ( !PyArg_ParseTuple( args, "iii|b:wolfpack.statics", &x, &y, &map, &exact ) )
return 0;
! StaticsIterator iter = Map->staticsIterator( Coord_cl( x, y, 0, map ), exact );
PyObject *list = PyList_New( 0 );
! UINT32 xBlock = x / 8;
! UINT32 yBlock = y / 8;
while( !iter.atEnd() )
***************
*** 524,528 ****
PyDict_SetItemString( dict, "id", PyInt_FromLong( iter->itemid ) );
PyDict_SetItemString( dict, "x", PyInt_FromLong( ( xBlock * 8 ) + iter->xoff ) );
! PyDict_SetItemString( dict, "y", PyInt_FromLong( ( yBlock * 8 )+ iter->yoff ) );
PyDict_SetItemString( dict, "z", PyInt_FromLong( iter->zoff ) );
--- 518,522 ----
PyDict_SetItemString( dict, "id", PyInt_FromLong( iter->itemid ) );
PyDict_SetItemString( dict, "x", PyInt_FromLong( ( xBlock * 8 ) + iter->xoff ) );
! PyDict_SetItemString( dict, "y", PyInt_FromLong( ( yBlock * 8 ) + iter->yoff ) );
PyDict_SetItemString( dict, "z", PyInt_FromLong( iter->zoff ) );
|
|
From: <as...@us...> - 2003-09-04 00:33:11
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv7114 Modified Files: wolfpack.pro Log Message: guildstones.h and guildstones.cpp entries removed Index: wolfpack.pro =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v retrieving revision 1.148 retrieving revision 1.149 diff -C2 -d -r1.148 -r1.149 *** wolfpack.pro 4 Sep 2003 00:23:53 -0000 1.148 --- wolfpack.pro 4 Sep 2003 00:33:05 -0000 1.149 *************** *** 76,80 **** exceptions.h \ globals.h \ - guildstones.h \ gumps.h \ house.h \ --- 76,79 ---- *************** *** 146,150 **** dragdrop.cpp \ globals.cpp \ - guildstones.cpp \ gumps.cpp \ house.cpp \ --- 145,148 ---- |
|
From: <as...@us...> - 2003-09-04 00:23:56
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv5813 Modified Files: wolfpack.pro Log Message: -DMYSQL_DRIVER is a default now Index: wolfpack.pro =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v retrieving revision 1.147 retrieving revision 1.148 diff -C2 -d -r1.147 -r1.148 *** wolfpack.pro 3 Sep 2003 14:44:21 -0000 1.147 --- wolfpack.pro 4 Sep 2003 00:23:53 -0000 1.148 *************** *** 50,53 **** --- 50,56 ---- win32-borland:LIBS = ws2_32.lib lib/ZThread/lib/ZThread.lib + QMAKE_CFLAGS += -DMYSQL_DRIVER + QMAKE_CXXFLAGS += -DMYSQL_DRIVER + # Common files |
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv32708
Modified Files:
Trade.cpp Trade.h combat.cpp dbdriver.cpp dbl_single_click.cpp
dragdrop.cpp gumps.cpp inlines.h network.cpp network.h
skills.cpp skills.h speech.cpp targetrequests.cpp typedefs.h
walking.cpp walking.h wolf.dsp wolfpack.cpp
Removed Files:
guildstones.cpp guildstones.h
Log Message:
- removed guildstone.cpp/h
- removed the UOXSOCKET typedef
- fixed small compile warning
Index: Trade.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/Trade.cpp,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -d -r1.86 -r1.87
*** Trade.cpp 28 Aug 2003 20:56:16 -0000 1.86
--- Trade.cpp 3 Sep 2003 20:58:16 -0000 1.87
***************
*** 417,421 ****
}
! P_ITEM Trade::tradestart(UOXSOCKET s, P_CHAR pc_i)
{
// P_CHAR pc_currchar = currchar[s];
--- 417,421 ----
}
! P_ITEM Trade::tradestart(cUOSocket* s, P_CHAR pc_i)
{
// P_CHAR pc_currchar = currchar[s];
Index: Trade.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/Trade.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Trade.h 15 Jun 2003 00:15:00 -0000 1.15
--- Trade.h 3 Sep 2003 20:58:17 -0000 1.16
***************
*** 55,59 ****
! P_ITEM tradestart(UOXSOCKET s, P_CHAR pc_i);
void clearalltrades();
void trademsg(int s);
--- 55,59 ----
! P_ITEM tradestart(cUOSocket* s, P_CHAR pc_i);
void clearalltrades();
void trademsg(int s);
Index: combat.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/combat.cpp,v
retrieving revision 1.146
retrieving revision 1.147
diff -C2 -d -r1.146 -r1.147
*** combat.cpp 3 Sep 2003 14:44:21 -0000 1.146
--- combat.cpp 3 Sep 2003 20:58:17 -0000 1.147
***************
*** 38,42 ****
#include "itemid.h"
#include "utilsys.h"
- #include "guildstones.h"
#include "sectors.h"
#include "combat.h"
--- 38,41 ----
Index: dbdriver.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbdriver.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** dbdriver.cpp 2 Sep 2003 01:27:57 -0000 1.21
--- dbdriver.cpp 3 Sep 2003 20:58:17 -0000 1.22
***************
*** 98,102 ****
return ( sqlite_step( (sqlite_vm*)_result, &count, (const char***)&_row, &columns ) == SQLITE_ROW );
! }
}
--- 98,103 ----
return ( sqlite_step( (sqlite_vm*)_result, &count, (const char***)&_row, &columns ) == SQLITE_ROW );
! }
! return false;
}
Index: dbl_single_click.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbl_single_click.cpp,v
retrieving revision 1.219
retrieving revision 1.220
diff -C2 -d -r1.219 -r1.220
*** dbl_single_click.cpp 3 Sep 2003 14:44:21 -0000 1.219
--- dbl_single_click.cpp 3 Sep 2003 20:58:17 -0000 1.220
***************
*** 35,39 ****
// Wolfpack Includes
#include "globals.h"
- #include "guildstones.h"
#include "srvparams.h"
#include "skills.h"
--- 35,38 ----
***************
*** 76,81 ****
SERIAL serial = target_serial;
P_PLAYER pc_currchar = socket->player();
-
- UOXSOCKET s = calcSocketFromChar( socket->player() ); // for Legacy code
if( !pc_currchar->isGM() && pc_currchar->objectDelay() > 10 && pc_currchar->objectDelay() >= uiCurrentTime )
--- 75,78 ----
Index: dragdrop.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v
retrieving revision 1.196
retrieving revision 1.197
diff -C2 -d -r1.196 -r1.197
*** dragdrop.cpp 3 Sep 2003 14:44:21 -0000 1.196
--- dragdrop.cpp 3 Sep 2003 20:58:17 -0000 1.197
***************
*** 36,40 ****
#include "speech.h"
#include "itemid.h"
- #include "guildstones.h"
#include "sectors.h"
#include "srvparams.h"
--- 36,39 ----
***************
*** 130,134 ****
// For each item we take out we loose carma
// if the corpse is innocent and not in our guild
! bool sameGuild = ( GuildCompare( pChar, outmostCont->owner() ) != 0 );
if( outmostCont->tags().has( "notority" ) && outmostCont->tags().get( "notority" ).asInt() == 1 &&
--- 129,133 ----
// For each item we take out we loose carma
// if the corpse is innocent and not in our guild
! bool sameGuild = true;//( GuildCompare( pChar, outmostCont->owner() ) != 0 );
if( outmostCont->tags().has( "notority" ) && outmostCont->tags().get( "notority" ).asInt() == 1 &&
Index: gumps.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/gumps.cpp,v
retrieving revision 1.141
retrieving revision 1.142
diff -C2 -d -r1.141 -r1.142
*** gumps.cpp 1 Jul 2003 20:44:53 -0000 1.141
--- gumps.cpp 3 Sep 2003 20:58:17 -0000 1.142
***************
*** 35,39 ****
#include "globals.h"
#include "gumps.h"
- #include "guildstones.h"
#include "srvparams.h"
#include "wpdefmanager.h"
--- 35,38 ----
Index: inlines.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/inlines.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** inlines.h 13 Mar 2003 16:50:37 -0000 1.20
--- inlines.h 3 Sep 2003 20:58:17 -0000 1.21
***************
*** 43,51 ****
#include "globals.h" // uiCurrentTime
- //inline void SetTimerSec(unsigned int *timer, const short seconds)
- //{
- // *timer=seconds * MY_CLOCKS_PER_SEC + uiCurrentTime;
- //}
-
inline unsigned int SetTimerSec(unsigned int timer, const short seconds)
{
--- 43,46 ----
Index: network.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network.cpp,v
retrieving revision 1.135
retrieving revision 1.136
diff -C2 -d -r1.135 -r1.136
*** network.cpp 12 Jun 2003 02:19:37 -0000 1.135
--- network.cpp 3 Sep 2003 20:58:17 -0000 1.136
***************
*** 174,192 ****
}
- // Code for wrapping old Stuff
- void cNetwork::xSend( int s, const void *point, int length, int test) // Buffering send function
- {
- cUOSocket *socket = uoSockets.at(s);
-
- if( !socket )
- return;
-
- QByteArray data( length );
- memcpy( data.data(), point, length );
- cUOPacket packet( data );
-
- socket->send( &packet );
- }
-
// Load IP Blocking rules
void cNetwork::load( void )
--- 174,177 ----
***************
*** 205,224 ****
{
// hosts_deny.clear();
- }
-
- // This is junk code to interface with the old junk code. Don't relay on that.
- // It's ugly and slower.
- UOXSOCKET cNetwork::getuoSocketsIndex( const cUOSocket* data )
- {
- return uoSockets.findRef( data );
- }
-
- UOXSOCKET calcSocketFromChar(P_CHAR pc)
- {
- if ( !pc || pc->objectType() == enNPC )
- {
- return -1;
- }
- return cNetwork::instance()->getuoSocketsIndex( dynamic_cast<P_PLAYER>(pc)->socket() );
}
--- 190,193 ----
Index: network.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** network.h 27 Feb 2003 18:49:17 -0000 1.26
--- network.h 3 Sep 2003 20:58:17 -0000 1.27
***************
*** 76,87 ****
cListener *gameServer_;
- // junk
- UOXSOCKET getuoSocketsIndex( const cUOSocket* );
- friend UOXSOCKET calcSocketFromChar(P_CHAR);
-
public:
- void xSend(UOXSOCKET s, const void *point, int length, int test);
-
void load( void );
void unload( void );
--- 76,81 ----
***************
*** 105,109 ****
};
- // Helper Function
- UOXSOCKET calcSocketFromChar(P_CHAR pc);
#endif
--- 99,101 ----
Index: skills.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/skills.cpp,v
retrieving revision 1.204
retrieving revision 1.205
diff -C2 -d -r1.204 -r1.205
*** skills.cpp 20 Aug 2003 17:10:48 -0000 1.204
--- skills.cpp 3 Sep 2003 20:58:17 -0000 1.205
***************
*** 37,41 ****
#include "basics.h"
#include "itemid.h"
- #include "guildstones.h"
#include "tracking.h"
#include "tilecache.h"
--- 37,40 ----
***************
*** 149,153 ****
if( mapchar && mapchar->isAtWar() )
{
- j = calcSocketFromChar(mapchar);
if( mapchar->objectType() == enPlayer )
{
--- 148,151 ----
***************
*** 472,476 ****
}
! if( pVictim->isInnocent() && pChar->attackerSerial() != pVictim->serial() && GuildCompare( pChar, pVictim ) == 0)
pChar->makeCriminal(); // Blue and not attacker and not guild
--- 470,474 ----
}
! if( pVictim->isInnocent() && pChar->attackerSerial() != pVictim->serial() /*&& GuildCompare( pChar, pVictim ) == 0*/)
pChar->makeCriminal(); // Blue and not attacker and not guild
Index: skills.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/skills.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** skills.h 17 Aug 2003 15:00:15 -0000 1.22
--- skills.h 3 Sep 2003 20:58:17 -0000 1.23
***************
*** 63,67 ****
{
private:
- void Tracking(int s, int selection);
int GetSubIngotAmt(int p, char id1, char id2, char color1, char color2);
int DeleSubIngot(int p, int id1, int id2, int color1, int color2, int amount);
--- 63,66 ----
***************
*** 102,108 ****
static void RandomSteal( cUOSocket*, SERIAL );
- void RepairTarget(UOXSOCKET s); // Ripper
- void SmeltItemTarget(UOXSOCKET s); // Ripper
- int TrackingDirection(UOXSOCKET s, P_CHAR pc_i);
void Track(P_CHAR pc_i);
void PotionToBottle(P_PLAYER pc, P_ITEM pi_mortar);
--- 101,104 ----
Index: speech.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/speech.cpp,v
retrieving revision 1.154
retrieving revision 1.155
diff -C2 -d -r1.154 -r1.155
*** speech.cpp 27 Aug 2003 01:39:59 -0000 1.154
--- speech.cpp 3 Sep 2003 20:58:17 -0000 1.155
***************
*** 37,41 ****
#include "speech.h"
- #include "guildstones.h"
#include "sectors.h"
#include "srvparams.h"
--- 37,40 ----
Index: targetrequests.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/targetrequests.cpp,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** targetrequests.cpp 3 Sep 2003 14:44:21 -0000 1.75
--- targetrequests.cpp 3 Sep 2003 20:58:17 -0000 1.76
***************
*** 40,44 ****
#include "srvparams.h"
#include "skills.h"
- #include "guildstones.h"
#include "combat.h"
#include "scriptmanager.h"
--- 40,43 ----
***************
*** 264,268 ****
pc_currchar->isCriminal();
! if (pc_npc->isInnocent() && pc_currchar->attackerSerial() != pc_npc->serial() && GuildCompare(pc_currchar, pc_npc)==0)//AntiChrist
pc_currchar->isCriminal();//Blue and not attacker and not guild
--- 263,267 ----
pc_currchar->isCriminal();
! if (pc_npc->isInnocent() && pc_currchar->attackerSerial() != pc_npc->serial() /*&& GuildCompare(pc_currchar, pc_npc)==0*/ )//AntiChrist
pc_currchar->isCriminal();//Blue and not attacker and not guild
Index: typedefs.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/typedefs.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** typedefs.h 27 Jun 2003 18:25:04 -0000 1.20
--- typedefs.h 3 Sep 2003 20:58:17 -0000 1.21
***************
*** 51,55 ****
typedef int GUILDID;
typedef unsigned int TIMERVAL;
- typedef int UOXSOCKET;
typedef int PLAYER;
typedef int CHARACTER;
--- 51,54 ----
Index: walking.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/walking.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -C2 -d -r1.88 -r1.89
*** walking.cpp 28 Aug 2003 20:56:16 -0000 1.88
--- walking.cpp 3 Sep 2003 20:58:17 -0000 1.89
***************
*** 37,41 ****
#include "wolfpack.h"
#include "debug.h"
- #include "guildstones.h"
#include "sectors.h"
#include "srvparams.h"
--- 37,40 ----
***************
*** 1058,1062 ****
/********* start of LB's no rain & snow in buildings stuff ***********/
! void cMovement::HandleWeatherChanges(P_CHAR pc, UOXSOCKET socket)
{
/* if (pc->isPlayer() && online(pc)) // check for being in buildings (for weather) only for PC's
--- 1057,1061 ----
/********* start of LB's no rain & snow in buildings stuff ***********/
! void cMovement::HandleWeatherChanges(P_CHAR pc, cUOSocket* socket)
{
/* if (pc->isPlayer() && online(pc)) // check for being in buildings (for weather) only for PC's
Index: walking.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/walking.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** walking.h 11 Jun 2003 10:54:10 -0000 1.18
--- walking.h 3 Sep 2003 20:58:17 -0000 1.19
***************
*** 93,97 ****
void handleItemCollision( P_CHAR pChar );
void HandleTeleporters(P_CHAR pc, const Coord_cl& oldpos);
! void HandleWeatherChanges(P_CHAR pc, UOXSOCKET socket);
void FillXYBlockStuff(P_CHAR pc, unitile_st *xyblock, int &xycount, unsigned short oldx, unsigned short oldy );
--- 93,97 ----
void handleItemCollision( P_CHAR pChar );
void HandleTeleporters(P_CHAR pc, const Coord_cl& oldpos);
! void HandleWeatherChanges(P_CHAR pc, cUOSocket* socket);
void FillXYBlockStuff(P_CHAR pc, unitile_st *xyblock, int &xycount, unsigned short oldx, unsigned short oldy );
Index: wolf.dsp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v
retrieving revision 1.214
retrieving revision 1.215
diff -C2 -d -r1.214 -r1.215
*** wolf.dsp 3 Sep 2003 14:44:21 -0000 1.214
--- wolf.dsp 3 Sep 2003 20:58:17 -0000 1.215
***************
*** 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
***************
*** 183,190 ****
# Begin Source File
- SOURCE=.\guildstones.cpp
- # End Source File
- # Begin Source File
-
SOURCE=.\gumps.cpp
# End Source File
--- 183,186 ----
***************
*** 515,522 ****
SOURCE=.\globals.h
- # End Source File
- # Begin Source File
-
- SOURCE=.\guildstones.h
# End Source File
# Begin Source File
--- 511,514 ----
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.453
retrieving revision 1.454
diff -C2 -d -r1.453 -r1.454
*** wolfpack.cpp 3 Sep 2003 15:05:57 -0000 1.453
--- wolfpack.cpp 3 Sep 2003 20:58:17 -0000 1.454
***************
*** 38,42 ****
#include "TmpEff.h"
- #include "guildstones.h"
#include "combat.h"
#include "sectors.h"
--- 38,41 ----
--- guildstones.cpp DELETED ---
--- guildstones.h DELETED ---
|
|
From: <thi...@us...> - 2003-09-03 20:58:22
|
Update of /cvsroot/wpdev/wolfpack/network
In directory sc8-pr-cvs1:/tmp/cvs-serv32708/network
Modified Files:
asyncnetio.cpp uorxpackets.h uosocket.cpp
Log Message:
- removed guildstone.cpp/h
- removed the UOXSOCKET typedef
- fixed small compile warning
Index: asyncnetio.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/asyncnetio.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** asyncnetio.cpp 30 Aug 2003 17:00:11 -0000 1.33
--- asyncnetio.cpp 3 Sep 2003 20:58:17 -0000 1.34
***************
*** 135,146 ****
cAsyncNetIOPrivate::cAsyncNetIOPrivate()
! : socket(0), rsize(0), wsize(0), rindex(0), windex(0), skippedUOHeader(false)
{
rba.setAutoDelete( TRUE );
wba.setAutoDelete( TRUE );
packets = new std::deque<cUOPacket*>;
-
- // Encryption
- encryption = 0;
}
--- 135,143 ----
cAsyncNetIOPrivate::cAsyncNetIOPrivate()
! : socket(0), rsize(0), wsize(0), rindex(0), windex(0), skippedUOHeader(false), encryption(0)
{
rba.setAutoDelete( TRUE );
wba.setAutoDelete( TRUE );
packets = new std::deque<cUOPacket*>;
}
***************
*** 149,160 ****
for ( uint i = 0; i < packets->size(); ++i )
{
! QMutexLocker lock( &packetsMutex );
delete packets->front();
packets->pop_front();
}
delete packets;
!
! if( encryption )
! delete encryption;
}
--- 146,155 ----
for ( uint i = 0; i < packets->size(); ++i )
{
! /// QMutexLocker lock( &packetsMutex ); I think it's safe not to lock here.
delete packets->front();
packets->pop_front();
}
delete packets;
! delete encryption;
}
Index: uorxpackets.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uorxpackets.h,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** uorxpackets.h 30 Aug 2003 17:00:12 -0000 1.50
--- uorxpackets.h 3 Sep 2003 20:58:17 -0000 1.51
***************
*** 614,618 ****
public:
cUORxSell( const QByteArray &data ): cUOPacket( data ) {}
! uint serial() const { return getInt( 3 ); }
ushort itemCount() const { return getShort( 7 ); }
uint iSerial( ushort item ) const { return getInt( 9 + ( item * 6 ) ); }
--- 614,618 ----
public:
cUORxSell( const QByteArray &data ): cUOPacket( data ) {}
! uint serial() const { return getInt( 3 ); }
ushort itemCount() const { return getShort( 7 ); }
uint iSerial( ushort item ) const { return getInt( 9 + ( item * 6 ) ); }
Index: uosocket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v
retrieving revision 1.280
retrieving revision 1.281
diff -C2 -d -r1.280 -r1.281
*** uosocket.cpp 30 Aug 2003 17:00:12 -0000 1.280
--- uosocket.cpp 3 Sep 2003 20:58:17 -0000 1.281
***************
*** 50,54 ****
#include "../scriptmanager.h"
#include "../walking.h"
- #include "../guildstones.h"
#include "../combat.h"
#include "../gumps.h"
--- 50,53 ----
***************
*** 1844,1848 ****
if( pc_i->inGuardedArea() && SrvParams->guardsActive() )
{
! if( pc_i->objectType() == enPlayer && pc_i->isInnocent() && GuildCompare( _player, pc_i ) == 0 ) //REPSYS
{
_player->makeCriminal();
--- 1843,1847 ----
if( pc_i->inGuardedArea() && SrvParams->guardsActive() )
{
! if( pc_i->objectType() == enPlayer && pc_i->isInnocent() /*&& GuildCompare( _player, pc_i ) == 0*/ ) //REPSYS
{
_player->makeCriminal();
***************
*** 1880,1884 ****
if( pc_i->isInnocent() )
{
! if( pc_i->objectType() == enPlayer && GuildCompare( _player, pc_i ) == 0 )
{
_player->makeCriminal();
--- 1879,1883 ----
if( pc_i->isInnocent() )
{
! if( pc_i->objectType() == enPlayer /*&& GuildCompare( _player, pc_i ) == 0*/ )
{
_player->makeCriminal();
|
|
From: <dar...@us...> - 2003-09-03 15:06:00
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv25388
Modified Files:
prototypes.h wolfpack.cpp
Log Message:
Further Cleanups of wolfpack.cpp
Index: prototypes.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/prototypes.h,v
retrieving revision 1.107
retrieving revision 1.108
diff -C2 -d -r1.107 -r1.108
*** prototypes.h 3 Sep 2003 15:00:50 -0000 1.107
--- prototypes.h 3 Sep 2003 15:05:56 -0000 1.108
***************
*** 35,39 ****
class QString;
class cUOSocket;
- class Coord_cl;
QString hex2dec( const QString& value );
--- 35,38 ----
***************
*** 43,50 ****
void goldsfx( cUOSocket *socket, UINT16 amount, bool hearall );
- int getamount(P_CHAR pc, short id);
- void delequan(P_CHAR pc, short id, int amount, int *not_deleted = NULL);
void playmonstersound(P_CHAR monster, unsigned short id, int sfx);
- int DeleBankItem( P_PLAYER pc, unsigned short itemid, unsigned short color, int amt );
void reloadScripts();
--- 42,46 ----
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.452
retrieving revision 1.453
diff -C2 -d -r1.452 -r1.453
*** wolfpack.cpp 3 Sep 2003 15:00:51 -0000 1.452
--- wolfpack.cpp 3 Sep 2003 15:05:57 -0000 1.453
***************
*** 1043,1058 ****
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;
! }
--- 1043,1045 ----
fclose( file );
! }
\ No newline at end of file
|
|
From: <dar...@us...> - 2003-09-03 15:00:56
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv24525
Modified Files:
prototypes.h wolfpack.cpp
Log Message:
Further Cleanups of wolfpack.cpp
Index: prototypes.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/prototypes.h,v
retrieving revision 1.106
retrieving revision 1.107
diff -C2 -d -r1.106 -r1.107
*** prototypes.h 3 Sep 2003 14:44:21 -0000 1.106
--- prototypes.h 3 Sep 2003 15:00:50 -0000 1.107
***************
*** 41,46 ****
void savelog(const char *msg, char *logfile);
- void endmessage(int x);
-
void goldsfx( cUOSocket *socket, UINT16 amount, bool hearall );
--- 41,44 ----
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.451
retrieving revision 1.452
diff -C2 -d -r1.451 -r1.452
*** wolfpack.cpp 3 Sep 2003 14:44:21 -0000 1.451
--- wolfpack.cpp 3 Sep 2003 15:00:51 -0000 1.452
***************
*** 272,280 ****
keeprun=0;
break;
- case 'T':
- case 't':
- endtime=uiCurrentTime+(MY_CLOCKS_PER_SEC*600);
- endmessage(0);
- break;
case '#':
--- 272,275 ----
***************
*** 1061,1081 ****
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 );
}
--- 1056,1058 ----
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv21016
Modified Files:
ai.cpp basechar.cpp basechar.h combat.cpp coord.cpp coord.h
dbl_single_click.cpp dragdrop.cpp npc.cpp npc.h player.cpp
player.h prototypes.h targetrequests.cpp wolf.dsp wolfpack.cpp
wolfpack.pro
Removed Files:
LoS.cpp
Log Message:
Removed LOS.Cpp (moved to coord.cpp)
and some legacy functions from wolfpack.cpp
Index: ai.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ai.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** ai.cpp 20 Aug 2003 17:10:48 -0000 1.15
--- ai.cpp 3 Sep 2003 14:44:21 -0000 1.16
***************
*** 421,425 ****
UINT16 rndy = RandomNum( m_npc->wanderY1(), m_npc->wanderY2() );
! UINT8 dir = chardirxyz( m_npc, rndx, rndy );
m_npc->setDirection( dir );
Movement::instance()->Walking( m_npc, dir, 0xFF );
--- 421,425 ----
UINT16 rndy = RandomNum( m_npc->wanderY1(), m_npc->wanderY2() );
! UINT8 dir = m_npc->pos().direction( Coord_cl( rndx, rndy ) );
m_npc->setDirection( dir );
Movement::instance()->Walking( m_npc, dir, 0xFF );
***************
*** 439,443 ****
pos.y = pos.y + (INT16)floor( sin( rndphi ) * rnddist );
! UINT8 dir = chardirxyz( m_npc, pos.x, pos.y );
m_npc->setDirection( dir );
Movement::instance()->Walking( m_npc, dir, 0xFF );
--- 439,443 ----
pos.y = pos.y + (INT16)floor( sin( rndphi ) * rnddist );
! UINT8 dir = m_npc->pos().direction( pos );
m_npc->setDirection( dir );
Movement::instance()->Walking( m_npc, dir, 0xFF );
***************
*** 477,481 ****
{
// simply move towards the target
! UINT8 dir = chardirxyz( m_npc, pos.x, pos.y );
Coord_cl newPos = Movement::instance()->calcCoordFromDir( dir, m_npc->pos() );
if( !mayWalk( m_npc, newPos ) )
--- 477,481 ----
{
// simply move towards the target
! UINT8 dir = m_npc->pos().direction( pos );
Coord_cl newPos = Movement::instance()->calcCoordFromDir( dir, m_npc->pos() );
if( !mayWalk( m_npc, newPos ) )
***************
*** 530,534 ****
waitForPathCalculation = 0;
Coord_cl nextmove = m_npc->nextMove();
! UINT8 dir = chardirxyz( m_npc, nextmove.x, nextmove.y );
m_npc->setDirection( dir );
Movement::instance()->Walking( m_npc, dir, 0xFF );
--- 530,534 ----
waitForPathCalculation = 0;
Coord_cl nextmove = m_npc->nextMove();
! UINT8 dir = m_npc->pos().direction( nextmove );
m_npc->setDirection( dir );
Movement::instance()->Walking( m_npc, dir, 0xFF );
Index: basechar.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** basechar.cpp 27 Aug 2003 21:11:41 -0000 1.38
--- basechar.cpp 3 Sep 2003 14:44:21 -0000 1.39
***************
*** 545,549 ****
changed( TOOLTIP );
changed_ = true;
! Fame( this, 0 );
soundEffect( 0x0214 );
setBodyID( orgBodyID_ );
--- 545,549 ----
changed( TOOLTIP );
changed_ = true;
! awardFame( 0 );
soundEffect( 0x0214 );
setBodyID( orgBodyID_ );
Index: basechar.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** basechar.h 28 Aug 2003 04:05:42 -0000 1.28
--- basechar.h 3 Sep 2003 14:44:21 -0000 1.29
***************
*** 146,149 ****
--- 146,151 ----
virtual void callGuards();
virtual void flagUnchanged();
+ virtual void awardFame( short amount ) = 0;
+ virtual void awardKarma( P_CHAR pKilled, short amount ) = 0;
// Wrapper events
Index: combat.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/combat.cpp,v
retrieving revision 1.145
retrieving revision 1.146
diff -C2 -d -r1.145 -r1.146
*** combat.cpp 2 Sep 2003 02:06:34 -0000 1.145
--- combat.cpp 3 Sep 2003 14:44:21 -0000 1.146
***************
*** 307,311 ****
// Can we see our target.
// I don't know what the +z 13 means...
! bool los = lineOfSight( pAttacker->pos() + Coord_cl( 0, 0, 13 ), pDefender->pos(), WALLS_CHIMNEYS+DOORS+FLOORS_FLAT_ROOFING );
hit( pAttacker, pDefender, los );
--- 307,311 ----
// Can we see our target.
// I don't know what the +z 13 means...
! bool los = pAttacker->pos().lineOfSight( pDefender->pos(), true );
hit( pAttacker, pDefender, los );
***************
*** 939,943 ****
{
// Only shot if our "head" can see the opponent
! if( !lineOfSight( pAttacker->pos() + Coord_cl( 0, 0, 13 ), pDefender->pos(), WALLS_CHIMNEYS+DOORS+FLOORS_FLAT_ROOFING ) )
mayAttack = false;
}
--- 939,943 ----
{
// Only shot if our "head" can see the opponent
! if( !pAttacker->pos().lineOfSight( pDefender->pos() ) )
mayAttack = false;
}
Index: coord.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/coord.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** coord.cpp 29 Jun 2003 22:52:01 -0000 1.25
--- coord.cpp 3 Sep 2003 14:44:21 -0000 1.26
***************
*** 37,40 ****
--- 37,46 ----
#include "player.h"
#include "network.h"
+ #include "sectors.h"
+ #include "items.h"
+ #include "multiscache.h"
+ #include "maps.h"
+ #include "globals.h"
+ #include "tilecache.h"
#include "network/uotxpackets.h"
#include "network/uosocket.h"
***************
*** 42,48 ****
// System Includes
#include <math.h>
!
! #undef DBGFILE
! #define DBGFILE "coord.cpp"
Coord_cl::Coord_cl(void)
--- 48,52 ----
// System Includes
#include <math.h>
! #include <set>
Coord_cl::Coord_cl(void)
***************
*** 74,78 ****
* @return UI32 : distance result
*/
! UI32 Coord_cl::distance( const Coord_cl &src) const
{
UI32 uiResult = ~0U; // Initialize with *infinite*
--- 78,82 ----
* @return UI32 : distance result
*/
! unsigned int Coord_cl::distance( const Coord_cl &src ) const
{
UI32 uiResult = ~0U; // Initialize with *infinite*
***************
*** 156,158 ****
--- 160,410 ----
mSock->send( &effect );
}
+ }
+
+ // Calculates the direction from one location to another
+ unsigned char Coord_cl::direction( const Coord_cl &dest ) const
+ {
+ unsigned char dir;
+ short xdif, ydif;
+
+ xdif = dest.x - x;
+ ydif = dest.y - y;
+
+ if ((xdif==0)&&(ydif<0)) dir=0;
+ else if ((xdif>0)&&(ydif<0)) dir=1;
+ else if ((xdif>0)&&(ydif==0)) dir=2;
+ else if ((xdif>0)&&(ydif>0)) dir=3;
+ else if ((xdif==0)&&(ydif>0)) dir=4;
+ else if ((xdif<0)&&(ydif>0)) dir=5;
+ else if ((xdif<0)&&(ydif==0)) dir=6;
+ else if ((xdif<0)&&(ydif<0)) dir=7;
+ else dir=-1;
+
+ return dir;
+ }
+
+ // This didn't change much yet
+ // I just copied over the old code
+ bool Coord_cl::lineOfSight( const Coord_cl &target, bool touch )
+ {
+ if( target.map != map )
+ return false;
+
+ if( (x == target.x) && (y == target.y) && (z == target.z) )
+ return true; // if source and target are on the same position
+
+ SI32 n = ( target.x - x ), m = ( target.y - y ), i = 0;
+ SI08 sgn_x = ( x <= target.x ) ? 1 : (-1); // signum for x
+ SI08 sgn_y = ( y <= target.y ) ? 1 : (-1); // signum for y
+ SI08 sgn_z = ( z <= target.z ) ? 1 : (-1); // signum for z
+ if( x == target.x )
+ sgn_x = 0;
+ if( y == target.y )
+ sgn_y = 0;
+ if( z == target.z )
+ sgn_z = 0;
+
+ UI32 distance = this->distance( target );
+
+ if( distance > 18 )
+ return false;
+
+ QValueList< Coord_cl > collisions;
+
+ double dz_x = ( sgn_x == 0 ) ? ( (double)target.z - (double)z ) : ( ( (double)target.z - (double)z ) / ( (double)target.x - (double)x ) );
+ double dz_y = ( sgn_y == 0 ) ? ( (double)target.z - (double)z ) : ( ( (double)target.z - (double)z ) / ( (double)target.y - (double)y ) );
+ SI32 dz = 0; // dz is needed later for collisions of the ray with floor tiles
+ if( sgn_x == 0 || m > n )
+ dz = (SI32)floor( dz_y );
+ else
+ dz = (SI32)floor( dz_x );
+
+
+ if( sgn_x == 0 && sgn_y == 0 && !sgn_z == 0 ) // should fix shooting through floor issues
+ for( i = 0; i < abs( target.z - z ); ++i )
+ {
+ collisions.push_back( Coord_cl( x, y, z + sgn_z, map ) );
+ }
+ else if( sgn_x == 0 ) // if we are on the same x-level, just push every x/y coordinate in y-direction from src to trg into the array
+ for( i = 0; i < (sgn_y * m); ++i )
+ {
+ collisions.push_back( Coord_cl( x, y + (sgn_y * i), z + (SI08)floor( dz_y * (double)i ), map ) );
+ }
+ else if ( sgn_y == 0 ) // if we are on the same y-level, just push every x/y coordinate in x-direction from src to trg into the array
+ for( i = 0; i < (sgn_x * n); ++i )
+ {
+ collisions.push_back( Coord_cl( x + (sgn_x * i), y, z + (SI08)floor( dz_x * (double)i ), map ) );
+ }
+ else
+ {
+ for( i = 0; (sgn_x * n >= sgn_y * m) && (i < (sgn_x * n)); i++ )
+ {
+ SI32 gridx = x + (sgn_x * i);
+ if( ( ( n == 0 ) && ( gridx == 0 ) ) ||
+ ( ( n + ( gridx * m ) == 0 ) ) )
+ continue;
+ else
+ {
+ // linear evaluation of extended 2x2 matrix, abbreviated
+ double t = (double)sgn_x * (double)i * (double)m / (double)n + (double)y;
+
+ // the next one is somewhat tricky, if the line of sight exactly cuts a coordinate,
+ // we just have to take that coordinate...
+ if( floor( t ) == t )
+ {
+ collisions.push_back( Coord_cl( gridx, floor( t ), z + (SI08)floor( dz_x * (double)i ), map ) );
+ }
+ // but if not, we have to take BOTH coordinates, which the calculated collision is between!
+ else
+ {
+ collisions.push_back( Coord_cl( gridx, floor( t ), z + (SI08)floor( dz_x * (double)i ), map ) );
+ collisions.push_back( Coord_cl( gridx, ceil( t ), z + (SI08)floor( dz_x * (double)i ), map ) );
+ }
+ }
+ }
+
+ for( i = 0; (sgn_y * m > sgn_x * n) && (i < (sgn_y * m)); ++i )
+ {
+ SI32 gridy = y + (sgn_y * i);
+ if( ( ( m == 0 ) && ( gridy == 0 ) ) ||
+ ( ( m + ( gridy * n ) == 0 ) ) )
+ continue;
+ else
+ {
+ double t = (double)x + (double)n / (double)m * (double)sgn_y * (double)i;
+
+ // the next one is somewhat tricky, if the line of sight exactly cuts a coordinate,
+ // we just have to take that coordinate...
+ if( floor( t ) == t )
+ {
+ collisions.push_back( Coord_cl( floor( t ), gridy, z + (SI08)floor( dz_y * (double)i ), map ) );
+ }
+ // but if not, we have to take BOTH coordinates, which the calculated collision is between!
+ else
+ {
+ collisions.push_back( Coord_cl( floor( t ), gridy, z + (SI08)floor( dz_y * (double)i ), map ) );
+ collisions.push_back( Coord_cl( ceil( t ), gridy, z + (SI08)floor( dz_y * (double)i ), map ) );
+ }
+ }
+ }
+ }
+
+ // the next will search for multis
+ QPtrList< cItem > multis;
+ RegionIterator4Items ri( *this );
+ for( ri.Begin(); !ri.atEnd(); ri++ )
+ {
+ P_ITEM pi = ri.GetData();
+ if( pi && pi->id() >= 0x4000 )
+ {
+ multis.append( pi );
+ }
+ }
+
+ map_st map1, map2;
+ std::set< unsigned short > itemids;
+ SI32 j;
+
+ QValueList< Coord_cl >::iterator pit = collisions.begin();
+ while( pit != collisions.end() )
+ {
+ // Texture mapping
+ map1 = Map->seekMap( *pit );
+ map2 = Map->seekMap( Coord_cl( (*pit).x + sgn_x, (*pit).y + sgn_y, (*pit).z, map ) );
+
+ StaticsIterator msi = Map->staticsIterator( *pit );
+ if( (map1.id != 2) && (map2.id != 2) )
+ {
+ // Mountain walls
+ if( ( ( map1.z < map2.z ) && // 1) lineofsight collides with a map "wall"
+ ( (*pit).z < ( map2.z ) ) &&
+ ( (*pit).z >= ( map1.z ) ) ) ||
+ ( ( map1.z > map2.z ) &&
+ ( (*pit).z < ( map1.z ) ) &&
+ ( (*pit).z >= ( map2.z ) ) ) ||
+ // ( ( (*pit).z == map1.z ) && // 2) lineofsight cuts a map "floor"
+ // ( dz != 0 ) ) ||
+ ( ( ( map1.id >= 431 && map1.id <= 432 ) || // 3) lineofsight cuts a mountain
+ ( map1.id >= 467 && map1.id <= 475 ) ||
+ ( map1.id >= 543 && map1.id <= 560 ) ||
+ ( map1.id >= 1754 && map1.id <= 1757 ) ||
+ ( map1.id >= 1787 && map1.id <= 1789 ) ||
+ ( map1.id >= 1821 && map1.id <= 1824 ) ||
+ ( map1.id >= 1851 && map1.id <= 1854 ) ||
+ ( map1.id >= 1881 && map1.id <= 1884 ) ) &&
+ ( msi.atEnd() ) ) ) // make sure there is no static item!
+ return false;
+ }
+
+ // Statics
+ tile_st tile;
+ while( !msi.atEnd() )
+ {
+ tile = TileCache::instance()->getTile( msi->itemid );
+ if( ( (*pit).z >= msi->zoff && (*pit).z <= ( msi->zoff + tile.height ) ) )
+ // || ( tile.height <= 2 && abs( (*pit).z - msi->zoff ) <= abs( dz ) ) )
+ itemids.insert( msi->itemid );
+
+ ++msi;
+ }
+
+
+ // Items
+ RegionIterator4Items rj( (*pit), 0 );
+ for( rj.Begin(); !rj.atEnd(); rj++ )
+ {
+ P_ITEM pi = rj.GetData();
+ if( pi && pi->id() < 0x4000 )
+ {
+ tile = TileCache::instance()->getTile( pi->id() );
+ if( ( (*pit).z >= pi->pos().z ) && ( (*pit).z <= ( pi->pos().z + tile.height ) ) && ( pi->visible() == 0 ) )
+ itemids.insert( pi->id() );
+ }
+ }
+
+ // Multis
+ QPtrListIterator< cItem > mit( multis );
+ P_ITEM pi;
+ while( ( pi = mit.current() ) )
+ {
+ MultiDefinition* def = MultiCache::instance()->getMulti( pi->id() - 0x4000 );
+ if ( !def )
+ continue;
+ QValueVector<multiItem_st> multi = def->getEntries();
+ for( j = 0; j < multi.size(); ++j )
+ {
+ if( ( multi[j].visible ) && ( pi->pos().x + multi[j].x == (*pit).x ) &&
+ ( pi->pos().y + multi[j].y == (*pit).y ) )
+ {
+ tile = TileCache::instance()->getTile( multi[j].tile );
+ if( ( (*pit).z >= pi->pos().z + multi[j].z ) &&
+ ( (*pit).z <= pi->pos().z + multi[j].z + tile.height ) )
+ itemids.insert( multi[j].tile );
+ }
+ }
+ ++mit;
+ }
+ ++pit;
+ }
+
+ std::set< UI16 >::iterator sit = itemids.begin();
+ while( sit != itemids.end() )
+ {
+ /*
+ if touch, then ignore missing noshoot
+ */
+ tile_st tile = TileCache::instance()->getTile( *sit );
+
+ // No Shoot
+ if( tile.flag2 & 0x20 )
+ return false;
+
+ // Touch & Impassable
+ if( touch && tile.flag1 & 0x40 )
+ return false;
+
+ ++sit;
+ }
+
+ return true;
}
Index: coord.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/coord.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** coord.h 19 May 2003 13:51:40 -0000 1.13
--- coord.h 3 Sep 2003 14:44:21 -0000 1.14
***************
*** 50,54 ****
Coord_cl(void);
Coord_cl(const Coord_cl& clCoord);
! Coord_cl(UI16, UI16, SI08, UI08 uiMap = 0, UI08 uiPlane = 0);
// Operators
Coord_cl& operator= (const Coord_cl& clCoord);
--- 50,54 ----
Coord_cl(void);
Coord_cl(const Coord_cl& clCoord);
! Coord_cl(UI16, UI16, SI08 = 0, UI08 uiMap = 0, UI08 uiPlane = 0);
// Operators
Coord_cl& operator= (const Coord_cl& clCoord);
***************
*** 57,61 ****
Coord_cl operator+(const Coord_cl& src) const;
Coord_cl operator-(const Coord_cl& src) const;
! UI32 distance( const Coord_cl &src) const;
static UI32 distance ( const Coord_cl &a, const Coord_cl &b );
--- 57,63 ----
Coord_cl operator+(const Coord_cl& src) const;
Coord_cl operator-(const Coord_cl& src) const;
! unsigned int distance( const Coord_cl &src) const;
! unsigned char direction( const Coord_cl &dest ) const;
! bool lineOfSight( const Coord_cl &target, bool touch = false );
static UI32 distance ( const Coord_cl &a, const Coord_cl &b );
Index: dbl_single_click.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbl_single_click.cpp,v
retrieving revision 1.218
retrieving revision 1.219
diff -C2 -d -r1.218 -r1.219
*** dbl_single_click.cpp 2 Sep 2003 02:23:51 -0000 1.218
--- dbl_single_click.cpp 3 Sep 2003 14:44:21 -0000 1.219
***************
*** 199,203 ****
}
! else if( !lineOfSight( pc_currchar->pos(), pi->pos(), WALLS_CHIMNEYS|DOORS|FLOORS_FLAT_ROOFING ) )
{
socket->clilocMessage( 0x7A258, "", 0x3b2 ); // You cannot reach that
--- 199,203 ----
}
! else if( !pc_currchar->pos().lineOfSight( pi->pos(), true ) )
{
socket->clilocMessage( 0x7A258, "", 0x3b2 ); // You cannot reach that
Index: dragdrop.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v
retrieving revision 1.195
retrieving revision 1.196
diff -C2 -d -r1.195 -r1.196
*** dragdrop.cpp 28 Aug 2003 20:56:16 -0000 1.195
--- dragdrop.cpp 3 Sep 2003 14:44:21 -0000 1.196
***************
*** 516,522 ****
return;
}
!
// Are we in range of our target
! if( !inrange1p( pChar, pOtherChar ) )
{
socket->bounceItem( pItem, BR_OUT_OF_REACH );
--- 516,522 ----
return;
}
!
// Are we in range of our target
! if( !pChar->inRange( pOtherChar, 3 ) )
{
socket->bounceItem( pItem, BR_OUT_OF_REACH );
***************
*** 525,529 ****
// Can wee see our target
! if( !lineOfSight( pChar->pos(), pOtherChar->pos(), TREES_BUSHES|WALLS_CHIMNEYS|DOORS|ROOFING_SLANTED|FLOORS_FLAT_ROOFING|LAVA_WATER ) )
{
socket->bounceItem( pItem, BR_OUT_OF_SIGHT );
--- 525,529 ----
// Can wee see our target
! if( !pChar->pos().lineOfSight( pOtherChar->pos() ) )
{
socket->bounceItem( pItem, BR_OUT_OF_SIGHT );
***************
*** 592,596 ****
// Check if the destination is in line of sight
! if( !lineOfSight( pChar->pos(), pos, WALLS_CHIMNEYS|DOORS|LAVA_WATER ) )
{
socket->bounceItem( pItem, BR_OUT_OF_SIGHT );
--- 592,596 ----
// Check if the destination is in line of sight
! if( !pChar->pos().lineOfSight( pos, false ) )
{
socket->bounceItem( pItem, BR_OUT_OF_SIGHT );
Index: npc.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** npc.cpp 30 Aug 2003 21:30:05 -0000 1.37
--- npc.cpp 3 Sep 2003 14:44:21 -0000 1.38
***************
*** 466,471 ****
if( pc_t->objectType() == enPlayer && !pc_t->inGuardedArea() )
{
! Karma( pc_t, this, ( 0 - ( karma_ ) ) );
! Fame( pc_t, fame_ );
}
--- 466,471 ----
if( pc_t->objectType() == enPlayer && !pc_t->inGuardedArea() )
{
! pc_t->awardKarma( this, ( 0 - ( karma_ ) ) );
! pc_t->awardFame( fame_ );
}
***************
*** 1490,1493 ****
--- 1490,1550 ----
}
+ void cNPC::awardKarma( P_CHAR pKilled, short amount )
+ {
+ int nCurKarma = 0, nChange = 0, nEffect = 0;
+
+ nCurKarma = karma();
+ if( nCurKarma < amount && amount > 0 )
+ {
+ nChange=((amount-nCurKarma)/75);
+ setKarma(nCurKarma+nChange);
+ nEffect=1;
+ }
+ if( ( nCurKarma > amount ) && ( !pKilled ) )
+ {
+ nChange = ( ( nCurKarma - amount ) / 50 );
+ setKarma( nCurKarma - nChange );
+ nEffect = 0;
+ }
+ else if( ( nCurKarma > amount ) && ( pKilled->karma() > 0 ) )
+ {
+ nChange= ( ( nCurKarma - amount ) / 50 );
+ setKarma( nCurKarma - nChange );
+ nEffect=0;
+ }
+
+ // Cap at 10000 or -10000
+ if( karma_ > 10000 )
+ karma_ = 10000;
+ else if( karma_ < -10000 )
+ karma_ = -10000;
+ }
+
+ void cNPC::awardFame( short amount )
+ {
+ int nCurFame, nChange=0;
+
+ setFame( QMIN( 10000, fame() ) );
+
+ nCurFame = fame();
+
+ // We already have more than that.
+ if( nCurFame > amount )
+ return;
+
+ // Loose Fame when we died
+ if( isDead() )
+ {
+ // Fame / 25 is our loss
+ nChange = nCurFame / 25;
+ setFame( QMAX( 0, nCurFame - nChange ) );
+ setDeaths( deaths() + 1 );
+ }
+ else
+ {
+ nChange = ( amount - nCurFame ) / 75;
+ setFame( nCurFame+nChange );
+ }
+ }
Index: npc.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/npc.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** npc.h 30 Aug 2003 21:30:05 -0000 1.22
--- npc.h 3 Sep 2003 14:44:21 -0000 1.23
***************
*** 102,105 ****
--- 102,107 ----
virtual void applyDefinition( const cElement* );
virtual void flagUnchanged() { cNPC::changed_ = false; cBaseChar::flagUnchanged(); }
+ void awardFame( short amount );
+ void awardKarma( P_CHAR pKilled, short amount );
// other public methods
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** player.cpp 31 Aug 2003 20:06:42 -0000 1.33
--- player.cpp 3 Sep 2003 14:44:21 -0000 1.34
***************
*** 455,460 ****
{
P_PLAYER pp_t = dynamic_cast<P_PLAYER>(pc_t);
! Karma( pp_t, this, ( 0 - ( karma_ ) ) );
! Fame( pp_t, fame_ );
if( isInnocent() && pp_t->attackFirst() )
--- 455,460 ----
{
P_PLAYER pp_t = dynamic_cast<P_PLAYER>(pc_t);
! pp_t->awardKarma( this, ( 0 - ( karma_ ) ) );
! pp_t->awardFame( fame_ );
if( isInnocent() && pp_t->attackFirst() )
***************
*** 1638,1639 ****
--- 1638,1774 ----
}
+ void cPlayer::awardFame( short amount )
+ {
+ int nCurFame, nChange=0;
+ bool gain = false;
+
+ setFame( QMIN( 10000, fame() ) );
+
+ nCurFame = fame();
+
+ // We already have more than that.
+ if( nCurFame > amount )
+ return;
+
+ // Loose Fame when we died
+ if( isDead() )
+ {
+ // Fame / 25 is our loss
+ nChange = nCurFame / 25;
+ setFame( QMAX( 0, nCurFame - nChange ) );
+ setDeaths( deaths() + 1 );
+ gain = false;
+ }
+ else
+ {
+ nChange = ( amount - nCurFame ) / 75;
+ setFame( nCurFame+nChange );
+ gain = true;
+ }
+
+ // Nothing changed or we can't recieve the message
+ if( !nChange || !socket() )
+ return;
+
+ uint message;
+
+ if( nChange <= 25 )
+ {
+ if( gain )
+ message = 1019051; //"You have gained a little fame."
+ else
+ message = 1019055; //"You have lost a little fame."
+ }
+ else if( nChange <= 75 )
+ {
+ if( gain )
+ message = 1019052; //"You have gained some fame."
+ else
+ message = 1019056; //"You have lost some fame."
+ }
+ else if( nChange <= 100 )
+ {
+ if( gain )
+ message = 1019053; // You have gained a good amount of fame.
+ else
+ message = 1019057; // You have lost a good amount of fame.
+ }
+ else if( nChange > 100 )
+ {
+ if( gain )
+ message = 1019054; //"You have gained alot of fame."
+ else
+ message = 1019058; //"You have lost alot of fame."
+ }
+
+ socket()->clilocMessage( message );
+ }
+
+ void cPlayer::awardKarma( P_CHAR pKilled, short amount )
+ {
+ int nCurKarma = 0, nChange = 0, nEffect = 0;
+
+ nCurKarma = karma();
+
+ if( nCurKarma < amount && amount > 0 )
+ {
+ nChange=((amount-nCurKarma)/75);
+ setKarma(nCurKarma+nChange);
+ nEffect=1;
+ }
+
+ if( ( nCurKarma > amount ) && ( !pKilled ) )
+ {
+ nChange = ( ( nCurKarma - amount ) / 50 );
+ setKarma( nCurKarma - nChange );
+ nEffect = 0;
+ }
+ else if( ( nCurKarma > amount ) && ( pKilled->karma() > 0 ) )
+ {
+ nChange= ( ( nCurKarma - amount ) / 50 );
+ setKarma( nCurKarma - nChange );
+ nEffect=0;
+ }
+
+ // Cap at 10000 or -10000
+ if( karma_ > 10000 )
+ karma_ = 10000;
+ else if( karma_ < -10000 )
+ karma_ = -10000;
+
+ if( !nChange || !socket() )
+ return;
+
+ UINT32 message;
+
+ if( nChange <= 25 )
+ {
+ if( nEffect )
+ message = 0xF8CB3; // You have gained a little karma.
+ else
+ message = 0xF8CB7; // You have lost a little karma.
+ }
+ else if( nChange <= 75 )
+ {
+ if( nEffect )
+ message = 0xF8CB4; // You have gained some karma.
+ else
+ message = 0xF8CB8; // You have lost some karma.
+ }
+ else if( nChange <= 100 )
+ {
+ if( nEffect )
+ message = 0xF8CB5; // You have gained a good amount of karma.
+ else
+ message = 0xF8CB9; // You have lost a good amount of karma.
+ }
+ else if( nChange > 100 )
+ {
+ if( nEffect )
+ message = 0xF8CB6; // You have gained a lot of karma.
+ else
+ message = 0xF8CBA; // You have lost a lot of karma.
+ }
+
+ socket()->clilocMessage( message );
+ }
Index: player.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** player.h 28 Aug 2003 04:05:42 -0000 1.20
--- player.h 3 Sep 2003 14:44:21 -0000 1.21
***************
*** 80,83 ****
--- 80,85 ----
virtual UINT32 takeGold( UINT32 amount, bool useBank = false );
virtual void flagUnchanged();
+ void awardFame( short amount );
+ void awardKarma( P_CHAR pKilled, short amount );
// other public methods
Index: prototypes.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/prototypes.h,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** prototypes.h 2 Sep 2003 02:23:51 -0000 1.105
--- prototypes.h 3 Sep 2003 14:44:21 -0000 1.106
***************
*** 33,53 ****
#define __PROTOTYPES_H__
-
- // Wolfpack Includes
-
- // Forward class declarations
-
class QString;
class cUOSocket;
class Coord_cl;
- // Function Declarations
- //
-
QString hex2dec( const QString& value );
void showPaperdoll( cUOSocket *socket, P_CHAR pTarget, bool hotkey );
void savelog(const char *msg, char *logfile);
- void Karma(P_CHAR pc_toChange, P_CHAR pc_Killed, int nKarma);
- void Fame(P_CHAR pc_toChange, int nFame);
void endmessage(int x);
--- 33,43 ----
***************
*** 58,73 ****
void delequan(P_CHAR pc, short id, int amount, int *not_deleted = NULL);
void playmonstersound(P_CHAR monster, unsigned short id, int sfx);
-
- bool inVisRange(int x1, int y1, int x2, int y2);
-
int DeleBankItem( P_PLAYER pc, unsigned short itemid, unsigned short color, int amt );
- int lineOfSight( const Coord_cl&, const Coord_cl&, int checkfor );
void reloadScripts();
- // Guildstone related functions
- int chardirxyz(P_CHAR pc, int x, int y); // direction from character a to char b
- bool inrange1p (PC_CHAR pca, P_CHAR pcb);
- //unsigned char tempeffect(P_CHAR pc_source, P_CHAR pc_dest, int num, unsigned char more1, unsigned char more2, unsigned char more3,short dur=-1);
- //unsigned char tempeffect2(P_CHAR source, P_ITEM piDest, int num, unsigned char more1, unsigned char more2, unsigned char more3);
void setcharflag(P_CHAR pc);
--- 48,54 ----
Index: targetrequests.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/targetrequests.cpp,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** targetrequests.cpp 30 Aug 2003 17:00:09 -0000 1.74
--- targetrequests.cpp 3 Sep 2003 14:44:21 -0000 1.75
***************
*** 282,286 ****
for ( cUOSocket *mSock = cNetwork::instance()->first(); mSock; mSock = cNetwork::instance()->next())
{
! if( mSock != socket && inrange1p( pc_currchar, mSock->player() ) && (rand()%10+10==17|| (rand()%2==1 && mSock->player()->intelligence() >= pc_currchar->intelligence())))
mSock->sysMessage(temp2);
}
--- 282,286 ----
for ( cUOSocket *mSock = cNetwork::instance()->first(); mSock; mSock = cNetwork::instance()->next())
{
! if( mSock != socket && mSock->player() && mSock->player()->inRange( pc_currchar, mSock->viewRange() ) && (rand()%10+10==17|| (rand()%2==1 && mSock->player()->intelligence() >= pc_currchar->intelligence())))
mSock->sysMessage(temp2);
}
Index: wolf.dsp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v
retrieving revision 1.213
retrieving revision 1.214
diff -C2 -d -r1.213 -r1.214
*** wolf.dsp 2 Sep 2003 02:31:32 -0000 1.213
--- wolf.dsp 3 Sep 2003 14:44:21 -0000 1.214
***************
*** 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,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"
--- 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"
***************
*** 204,211 ****
SOURCE=.\items.cpp
- # End Source File
- # Begin Source File
-
- SOURCE=.\LoS.cpp
# End Source File
# Begin Source File
--- 204,207 ----
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.450
retrieving revision 1.451
diff -C2 -d -r1.450 -r1.451
*** wolfpack.cpp 2 Sep 2003 18:53:08 -0000 1.450
--- wolfpack.cpp 3 Sep 2003 14:44:21 -0000 1.451
***************
*** 864,887 ****
}
- int chardirxyz(P_CHAR pc, int x, int y) // direction from character a to char b
- {
- int dir, xdif, ydif;
-
- xdif = x-pc->pos().x;
- ydif = y-pc->pos().y;
-
- if ((xdif==0)&&(ydif<0)) dir=0;
- else if ((xdif>0)&&(ydif<0)) dir=1;
- else if ((xdif>0)&&(ydif==0)) dir=2;
- else if ((xdif>0)&&(ydif>0)) dir=3;
- else if ((xdif==0)&&(ydif>0)) dir=4;
- else if ((xdif<0)&&(ydif>0)) dir=5;
- else if ((xdif<0)&&(ydif==0)) dir=6;
- else if ((xdif<0)&&(ydif<0)) dir=7;
- else dir=-1;
-
- return dir;
- }
-
void goldsfx( cUOSocket *socket, UINT16 amount, bool hearall )
{
--- 864,867 ----
***************
*** 953,1111 ****
/*!
- Give karma credit for killing someone.
- */
- void Karma( P_CHAR pc_toChange, P_CHAR pc_Killed, int nKarma )
- {
- // nEffect = 1 positive karma effect
- int nCurKarma = 0, nChange = 0, nEffect = 0;
-
- nCurKarma = pc_toChange->karma();
-
- if((nCurKarma>10000)||(nCurKarma<-10000))
- if(nCurKarma>10000)
- pc_toChange->setKarma(10000);
- else
- pc_toChange->setKarma(-10000);
-
- if( nCurKarma < nKarma && nKarma > 0 )
- {
- nChange=((nKarma-nCurKarma)/75);
- pc_toChange->setKarma(nCurKarma+nChange);
- nEffect=1;
- }
-
- //AntiChrist - modified to avoid crashes
- //the nKilledID==-1 check and the chars[nKilledID] check were in the same line
- //That may cause some crash with some compilator caus there's no a defined
- //order in executing these if checks
- if( ( nCurKarma > nKarma ) && ( !pc_Killed ) )
- {
- nChange = ( ( nCurKarma - nKarma ) / 50 );
- pc_toChange->setKarma( nCurKarma - nChange );
- nEffect = 0;
- }
- else if( ( nCurKarma > nKarma ) && ( pc_Killed->karma() > 0 ) )
- {
- nChange=((nCurKarma-nKarma)/50);
- pc_toChange->setKarma(nCurKarma-nChange);
- nEffect=0;
- }
-
- // For NPCs we dont need to send a message
- // If nothing changed we dont need to do that either
- P_PLAYER pp = dynamic_cast<P_PLAYER>(pc_toChange);
-
- if( !nChange || !pp || !pp->socket() )
- return;
-
- UINT32 message;
-
- if( nChange <= 25 )
- {
- if( nEffect )
- message = 0xF8CB3; // You have gained a little karma.
- else
- message = 0xF8CB7; // You have lost a little karma.
- }
- else if( nChange <= 75 )
- {
- if( nEffect )
- message = 0xF8CB4; // You have gained some karma.
- else
- message = 0xF8CB8; // You have lost some karma.
- }
- else if( nChange <= 100 )
- {
- if( nEffect )
- message = 0xF8CB5; // You have gained a good amount of karma.
- else
- message = 0xF8CB9; // You have lost a good amount of karma.
- }
- else if( nChange > 100 )
- {
- if( nEffect )
- message = 0xF8CB6; // You have gained a lot of karma.
- else
- message = 0xF8CBA; // You have lost a lot of karma.
- }
-
- pp->socket()->clilocMessage( message );
- }
-
- /*!
- Give fame credit for killing someone.
- */
- void Fame( P_CHAR pChar, int nFame )
- {
- P_PLAYER pc_toChange = dynamic_cast<P_PLAYER>( pChar );
- if( !pc_toChange )
- return;
-
- int nCurFame, nChange=0;
- bool gain = false;
-
- pc_toChange->setFame( QMIN( 10000, pc_toChange->fame() ) );
-
- nCurFame = pc_toChange->fame();
-
- // We already have more than that.
- if( nCurFame > nFame )
- return;
-
- // Loose Fame when we died
- if( pc_toChange->isDead() )
- {
- // Fame / 25 is our loss
- nChange = nCurFame / 25;
- pc_toChange->setFame( QMAX( 0, nCurFame - nChange ) );
- pc_toChange->setDeaths( pc_toChange->deaths() + 1 );
- gain = false;
- }
- else
- {
- nChange = ( nFame - nCurFame ) / 75;
- pc_toChange->setFame( nCurFame+nChange );
- gain = true;
- }
-
- // Nothing changed or we can't recieve the message
- if( !nChange || !pc_toChange->socket() )
- return;
-
- uint message;
-
- if( nChange <= 25 )
- {
- if( gain )
- message = 1019051; //"You have gained a little fame."
- else
- message = 1019055; //"You have lost a little fame."
- }
- else if( nChange <= 75 )
- {
- if( gain )
- message = 1019052; //"You have gained some fame."
- else
- message = 1019056; //"You have lost some fame."
- }
- else if( nChange <= 100 )
- {
- if( gain )
- message = 1019053; // You have gained a good amount of fame.
- else
- message = 1019057; // You have lost a good amount of fame.
- }
- else if( nChange > 100 )
- {
- if( gain )
- message = 1019054; //"You have gained alot of fame."
- else
- message = 1019058; //"You have lost alot of fame."
- }
-
- pc_toChange->socket()->clilocMessage( message );
- }
-
- /*!
Update the flagging of this character based
on his reputation.
--- 933,936 ----
***************
*** 1209,1238 ****
}
- ///////////
- // 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)
--- 1034,1037 ----
Index: wolfpack.pro
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v
retrieving revision 1.146
retrieving revision 1.147
diff -C2 -d -r1.146 -r1.147
*** wolfpack.pro 2 Sep 2003 03:04:13 -0000 1.146
--- wolfpack.pro 3 Sep 2003 14:44:21 -0000 1.147
***************
*** 149,153 ****
itemid.cpp \
items.cpp \
- LoS.cpp \
makemenus.cpp \
maps.cpp \
--- 149,152 ----
--- LoS.cpp DELETED ---
|
|
From: <dar...@us...> - 2003-09-03 14:44:25
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv21016/python
Modified Files:
char.cpp
Log Message:
Removed LOS.Cpp (moved to coord.cpp)
and some legacy functions from wolfpack.cpp
Index: char.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v
retrieving revision 1.100
retrieving revision 1.101
diff -C2 -d -r1.100 -r1.101
*** char.cpp 31 Aug 2003 18:47:27 -0000 1.100
--- char.cpp 3 Sep 2003 14:44:22 -0000 1.101
***************
*** 357,361 ****
{
Coord_cl pos = getWpCoord( pObj );
! return PyInt_FromLong( chardirxyz( self->pChar, pos.x, pos.y ) );
}
--- 357,361 ----
{
Coord_cl pos = getWpCoord( pObj );
! return PyInt_FromLong( self->pChar->pos().direction( Coord_cl( pos.x, pos.y ) ) );
}
***************
*** 363,367 ****
P_ITEM pItem = getWpItem( pObj );
if( pItem )
! return PyInt_FromLong( chardirxyz( self->pChar, pItem->pos().x, pItem->pos().y ) );
P_CHAR pChar = getWpChar( pObj );
--- 363,367 ----
P_ITEM pItem = getWpItem( pObj );
if( pItem )
! return PyInt_FromLong( self->pChar->pos().direction( pItem->pos() ) );
P_CHAR pChar = getWpChar( pObj );
***************
*** 379,383 ****
pos.y = PyInt_AsLong( PyTuple_GetItem( args, 1 ) );
! return PyInt_FromLong( chardirxyz( self->pChar, pos.x, pos.y ) );
}
--- 379,383 ----
pos.y = PyInt_AsLong( PyTuple_GetItem( args, 1 ) );
! return PyInt_FromLong( self->pChar->pos().direction( pos ) );
}
***************
*** 1501,1505 ****
return PyFalse;
! if( !lineOfSight( self->pChar->pos(), pos, WALLS_CHIMNEYS|DOORS|FLOORS_FLAT_ROOFING ) )
return PyFalse;
--- 1501,1505 ----
return PyFalse;
! if( !self->pChar->pos().lineOfSight( pos ) )
return PyFalse;
|
|
From: <dar...@us...> - 2003-09-03 12:23:48
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv26967
Modified Files:
persistentbroker.cpp
Log Message:
Reactivated Transactions for SQLite (dunno why i disabled them)
Index: persistentbroker.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/persistentbroker.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** persistentbroker.cpp 2 Sep 2003 04:41:27 -0000 1.22
--- persistentbroker.cpp 3 Sep 2003 12:23:17 -0000 1.23
***************
*** 116,121 ****
{
// Start Transaction
! /*if( sqlite )
! connection->exec( "BEGIN TRANSACTION;" );*/
try
--- 116,121 ----
{
// Start Transaction
! if( sqlite )
! connection->exec( "BEGIN TRANSACTION;" );
try
***************
*** 126,137 ****
{
// Rollback
! /*if( sqlite )
! connection->exec( "ROLLBACK TRANSACTION;" );*/
throw;
}
// Commit
! /*if( sqlite )
! connection->exec( "COMMIT TRANSACTION;" );*/
return true;
--- 126,137 ----
{
// Rollback
! if( sqlite )
! connection->exec( "ROLLBACK TRANSACTION;" );
throw;
}
// Commit
! if( sqlite )
! connection->exec( "COMMIT TRANSACTION;" );
return true;
|
|
From: <thi...@us...> - 2003-09-02 18:53:17
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv14648
Modified Files:
wolfpack.cpp
Log Message:
Changed some strings to clicloc messages.
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.449
retrieving revision 1.450
diff -C2 -d -r1.449 -r1.450
*** wolfpack.cpp 2 Sep 2003 02:23:51 -0000 1.449
--- wolfpack.cpp 2 Sep 2003 18:53:08 -0000 1.450
***************
*** 1073,1108 ****
return;
! QString message;
if( nChange <= 25 )
{
if( gain )
! message = tr( "You have gained a little fame.", 0, "Fame Messages" );
else
! message = tr( "You have lost a little fame.", 0, "Fame Messages" );
}
else if( nChange <= 75 )
{
if( gain )
! message = tr( "You have gained some fame.", 0, "Fame Messages" );
else
! message = tr( "You have lost some fame.", 0, "Fame Messages" );
}
else if( nChange <= 100 )
{
if( gain )
! message = tr( "You have gained alot of fame.", 0, "Fame Messages" );
else
! message = tr( "You have lost alot of fame.", 0, "Fame Messages" );
}
else if( nChange > 100 )
{
if( gain )
! message = tr( "You have gained a huge amount of fame.", 0, "Fame Messages" );
else
! message = tr( "You have lost a huge amount of fame.", 0, "Fame Messages" );
}
! pc_toChange->socket()->sysMessage( message );
}
--- 1073,1108 ----
return;
! uint message;
if( nChange <= 25 )
{
if( gain )
! message = 1019051; //"You have gained a little fame."
else
! message = 1019055; //"You have lost a little fame."
}
else if( nChange <= 75 )
{
if( gain )
! message = 1019052; //"You have gained some fame."
else
! message = 1019056; //"You have lost some fame."
}
else if( nChange <= 100 )
{
if( gain )
! message = 1019053; // You have gained a good amount of fame.
else
! message = 1019057; // You have lost a good amount of fame.
}
else if( nChange > 100 )
{
if( gain )
! message = 1019054; //"You have gained alot of fame."
else
! message = 1019058; //"You have lost alot of fame."
}
! pc_toChange->socket()->clilocMessage( message );
}
|