wpdev-commits Mailing List for Wolfpack Emu (Page 181)
Brought to you by:
rip,
thiagocorrea
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(121) |
Sep
(256) |
Oct
(59) |
Nov
(73) |
Dec
(120) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(259) |
Feb
(381) |
Mar
(501) |
Apr
(355) |
May
(427) |
Jun
(270) |
Jul
(394) |
Aug
(412) |
Sep
(724) |
Oct
(578) |
Nov
(65) |
Dec
|
|
From: <co...@us...> - 2003-11-25 19:41:33
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv5611
Modified Files:
dragdrop.cpp player.cpp player.h
Log Message:
secure trading code support for python
Index: dragdrop.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v
retrieving revision 1.206
retrieving revision 1.207
diff -C2 -d -r1.206 -r1.207
*** dragdrop.cpp 24 Nov 2003 20:27:27 -0000 1.206
--- dragdrop.cpp 25 Nov 2003 19:41:30 -0000 1.207
***************
*** 527,531 ****
if( pOtherChar->objectType() == enPlayer && dynamic_cast<P_PLAYER>(pOtherChar)->socket() )
{
! dynamic_cast<P_PLAYER>(pChar)->onTradeStart( dynamic_cast<P_PLAYER>(pOtherChar) );
// Check if we're already trading,
// if not create a new window
--- 527,531 ----
if( pOtherChar->objectType() == enPlayer && dynamic_cast<P_PLAYER>(pOtherChar)->socket() )
{
! dynamic_cast<P_PLAYER>(pChar)->onTradeStart( dynamic_cast<P_PLAYER>(pOtherChar), pItem );
// Check if we're already trading,
// if not create a new window
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** player.cpp 24 Nov 2003 20:27:27 -0000 1.49
--- player.cpp 25 Nov 2003 19:41:30 -0000 1.50
***************
*** 1270,1274 ****
}
! bool cPlayer::onTradeStart( P_PLAYER partner )
{
cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_TRADESTART );
--- 1270,1274 ----
}
! bool cPlayer::onTradeStart( P_PLAYER partner, P_ITEM firstitem )
{
cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_TRADESTART );
***************
*** 1277,1281 ****
if( scriptChain || global )
{
! PyObject *args = Py_BuildValue( "(O&O&)", PyGetCharObject, this, PyGetCharObject, partner );
result = cPythonScript::callChainedEventHandler( EVENT_TRADESTART, scriptChain, args );
--- 1277,1281 ----
if( scriptChain || global )
{
! PyObject *args = Py_BuildValue( "(O&O&O&)", PyGetCharObject, this, PyGetCharObject, partner, PyGetItemObject, firstitem );
result = cPythonScript::callChainedEventHandler( EVENT_TRADESTART, scriptChain, args );
Index: player.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** player.h 24 Nov 2003 20:27:27 -0000 1.25
--- player.h 25 Nov 2003 19:41:30 -0000 1.26
***************
*** 115,119 ****
bool onPickup( P_ITEM pItem );
bool onTrade( unsigned int type, unsigned int buttonstate, SERIAL itemserial );
! bool onTradeStart( P_PLAYER partner );
// getters
--- 115,119 ----
bool onPickup( P_ITEM pItem );
bool onTrade( unsigned int type, unsigned int buttonstate, SERIAL itemserial );
! bool onTradeStart( P_PLAYER partner, P_ITEM firstitem );
// getters
|
|
From: <co...@us...> - 2003-11-25 19:41:33
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv5611/python
Modified Files:
char.cpp
Log Message:
secure trading code support for python
Index: char.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v
retrieving revision 1.110
retrieving revision 1.111
diff -C2 -d -r1.110 -r1.111
*** char.cpp 30 Sep 2003 15:06:30 -0000 1.110
--- char.cpp 25 Nov 2003 19:41:30 -0000 1.111
***************
*** 1619,1622 ****
--- 1619,1653 ----
}
+ static PyObject* wpChar_additem( wpChar *self, PyObject *args )
+ {
+ if( self->pChar->free )
+ return PyFalse;
+
+ if( !checkArgInt( 0 ) && !checkArgItem( 1 ) )
+ {
+ PyErr_BadArgument();
+ return 0;
+ }
+ bool handleWeight = true;
+ bool noRemove = false;
+
+ if( PyTuple_Size( args ) > 2 && checkArgInt( 2 ) )
+ handleWeight = getArgInt( 2 ) > 0?true:false;
+
+ if( PyTuple_Size( args ) > 2 && checkArgInt( 3 ) )
+ noRemove = getArgInt( 3 ) > 0?true:false;
+
+ int layer = getArgInt( 0 );
+ P_ITEM pItem = getArgItem( 1 );
+
+ if( !pItem )
+ return PyFalse;
+
+ self->pChar->addItem( (cBaseChar::enLayer)layer, pItem, handleWeight, noRemove );
+
+ return PyTrue;
+ }
+
+
static PyMethodDef wpCharMethods[] =
{
***************
*** 1650,1653 ****
--- 1681,1685 ----
{ "cansee", (getattrofunc)wpChar_cansee, METH_VARARGS, NULL },
{ "lightning", (getattrofunc)wpChar_lightning, METH_VARARGS, NULL },
+ { "additem", (getattrofunc)wpChar_additem, METH_VARARGS, "Creating item on specified layer."},
// Mostly NPC functions
|
|
From: <co...@us...> - 2003-11-25 18:54:16
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv28499/scripts/wolfpack Modified Files: utilities.py Log Message: secure trading almost working Index: utilities.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/utilities.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** utilities.py 25 Nov 2003 06:19:09 -0000 1.21 --- utilities.py 25 Nov 2003 18:54:12 -0000 1.22 *************** *** 141,144 **** --- 141,150 ---- return 0 # Not stacked + def cont2cont( container1, container2 ): + for item in container1.content: + tocontainer( item, container2 ) + item.update() + + def isclothing( item ): |
|
From: <co...@us...> - 2003-11-25 18:54:16
|
Update of /cvsroot/wpdev/xmlscripts/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv28499/scripts
Modified Files:
trading.py
Log Message:
secure trading almost working
Index: trading.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/trading.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** trading.py 24 Nov 2003 20:30:57 -0000 1.1
--- trading.py 25 Nov 2003 18:54:12 -0000 1.2
***************
*** 1,5 ****
import wolfpack
from wolfpack.consts import *
! from wolfpack.utilities import rusmsg
def onLoad():
--- 1,12 ----
+ #################################################################
+ # ) (\_ # WOLFPACK 13.0.0 Scripts #
+ # (( _/{ "-; # Created by: codex #
+ # )).-' {{ ;'` # Revised by: #
+ # ( ( ;._ \\ ctr # Last Modification: 25-11-03 #
+ #################################################################
+
import wolfpack
from wolfpack.consts import *
! from wolfpack.utilities import *
def onLoad():
***************
*** 7,74 ****
wolfpack.registerglobal( EVENT_TRADE, 'trading' )
! def onTradeStart( player1, player2 ):
! rusmsg( player1, 'Âûçâàíî ñîçäàíèå îêíà' )
! #Sending trade window to both players etc
! action = 0
box1 = player1.itemonlayer( LAYER_TRADING )
if not box1:
! box1 = wolfpack.additem("e75")
! box1.layer = LAYER_TRADING
box1.owner = player1.serial
box2 = player2.itemonlayer( LAYER_TRADING )
if not box2:
box2 = wolfpack.additem("e75")
- box2.layer = LAYER_TRADING
box2.owner = player2.serial
!
! packet1 = wolfpack.packet( 0x6F, 17 )
! packet2 = wolfpack.packet( 0x6F, 17 )
! #set partners
! packet1.setint( 4, player2.serial )
! packet2.setint( 4, player1.serial )
! packet1.setascii( 17, player1.name )
! packet2.setascii( 17, player2.name )
! #box to us
! packet1.setint( 8, box1.serial )
! packet1.setint( 12, box2.serial )
! #box to partner
! packet2.setint( 8, box2.serial )
! packet2.setint( 8, box1.serial )
! packet1.send( player1.socket )
! packet2.send( player2.socket )
! #Partner
! packet1.setint( 4, box1.serial )
! #Box1
! packet1.setint( 8, 0 )
! #Box2
! packet1.setint( 12, 0 )
! #Name
! packet1.setascii( 17, '')
! packet1.send( player1.socket )
! #Partner
! packet2.setint( 4, box2.serial )
! #Box1
! packet2.setint( 8, 0 )
! #Box2
! packet2.setint( 12, 0 )
! #Name
! packet2.setascii( 17, '')
! packet2.send( player2.socket )
return OK
! def onTrade( player, type, buttonstate, itemserial ):
! #Receiving button state etc
! rusmsg( player, 'Òîðãîâëÿ' )
return OK
--- 14,204 ----
wolfpack.registerglobal( EVENT_TRADE, 'trading' )
! def onLogout( player ):
! if player.hastag( 'partner' ):
! partner = wolfpack.findchar( player.gettag( 'partner' ) )
! box2 = partner.itemonlayer( LAYER_TRADING )
! box1 = player.itemonlayer( LAYER_TRADING )
! closetrade( player, partner, box1, box2 )
! return OK
+ def onTradeAdd( player, item ):
+ #not implemented yet in code
+ #Refuse:
+ #Recently stolen items
+ #Trapped items
+ #If recipient could not carry that
+ #Using of added items ( tag )
+ #Refuse stealing of added items ( tag )
+ #Refuse pet's transfering while trading ( tag )
+ #Refuse trading with someone who dragging something ( tag )
+
+ return OK
+
+ def onTradeRemove( player, item ):
+ #not implemented yet in code
+
+ return OK
+
+ def onTradeStart( player1, player2, firstitem ):
+ #player1 : I am
+ #player2 : Partner
+
+ #Creating trade container for me
box1 = player1.itemonlayer( LAYER_TRADING )
if not box1:
! box1 = wolfpack.additem( "e75" )
box1.owner = player1.serial
+ player1.additem( LAYER_TRADING, box1 )
+ box1.update()
+
+ #Same operation for partner
box2 = player2.itemonlayer( LAYER_TRADING )
if not box2:
box2 = wolfpack.additem("e75")
box2.owner = player2.serial
! player2.additem( LAYER_TRADING, box2 )
! box2.update()
! if not box1 or not box2:
! return OOPS
!
! #onLogout event should be executed for tradewindow disposing
! events1 = player1.events
! events1.append( 'trading' )
! events2 = player2.events
! events2.append( 'trading' )
! #We want to know serial of partner in future
! player1.settag( 'partner', player2.serial )
! player2.settag( 'partner', player1.serial )
! #We need to store button state of each player
! player1.settag( 'button', 0 )
! player2.settag( 'button', 0 )
!
! #Send trade window to both players
! #To me
! sendtradepacket( player1.socket, 0, player2.serial, box1.serial, box2.serial, player2.name )
! #To partner
! sendtradepacket( player2.socket, 0, player1.serial, box2.serial, box1.serial, player1.name )
!
! #Send buttons state
! #To me
! sendtradepacket( player1.socket, 2, box1.serial, 0, 0, "" )
! #To partner
! sendtradepacket( player2.socket, 2, box2.serial, 0, 0, "" )
!
! box1.additem( firstitem )
! firstitem.update()
! return OK
!
! def onTrade( player, type, buttonstate, itemserial ):
! #Receiving button state, close request etc...
! #itemserial == tradecontainer.serial of player
! #buttonstate == 1 : user confirm deal
! #buttonstate == 0 : user reject deal
! #type == 1 : user want to close trade
! #type == 2 : button pressed
! handler = { 1 : closetrade, 2 : pressbutton }
! #Check if we have a partner
! if player.hastag( 'partner' ):
! partner = wolfpack.findchar( player.gettag( 'partner' ) )
! if not partner:
! return OOPS
! else:
! return OOPS
!
! #Get tradecontainers
! box2 = partner.itemonlayer( LAYER_TRADING )
! box1 = player.itemonlayer( LAYER_TRADING )
! #Something lost ?
! if not box1 or not box2:
! closetrade( player, partner, box1, box2 )
!
! #Button pressed ?
! if buttonstate == 1:
! player.settag( 'button', 1 )
!
! #Execute handler of specified type
! handler[type]( player, partner, box1, box2 )
!
! return OK
!
! def closetrade( player, partner, box1, box2 ):
! #Closing tradewindows, deleting tradecontainers
! #copying items from tradecontainers to chars backpacks
! #Close partner tradewindow
! for p in [player, partner]:
! p.deltag( 'partner' )
! p.deltag( 'button' )
!
! if box1:
! back1 = player.getbackpack()
! cont2cont( box1, back1 )
! sendclosetrade( player.socket, box1.serial )
! box1.delete()
! if box2:
! back2 = partner.getbackpack()
! cont2cont( box2, back2 )
! sendclosetrade( partner.socket, box2.serial )
! box2.delete()
!
! return OK
+ def pressbutton( player, partner, box1, box2 ):
+ #Switch buttons on trade gump
+ button1 = player.gettag( 'button' )
+ button2 = partner.gettag( 'button' )
+ sendtradepacket( player.socket, 2, box1.serial, button1, button2, "" )
+ sendtradepacket( partner.socket, 2, box2.serial, button2, button1, "" )
+
+ #To far away for trading ?
+ if player.distanceto( partner ) > 2:
+ closetrade( player, partner, box1, box2 )
+ return OK
+
+ if button1 == 1 and button2 == 1:
+ back1 = player.getbackpack()
+ back2 = partner.getbackpack()
+ cont2cont( box2, back1 )
+ cont2cont( box1, back2 )
+ closetrade( player, partner, box1, box2 )
return OK
! def sendtradepacket( socket, action, partnerserial, box1serial, box2serial, playername ):
! #Sending 0x6F packet. Length may vary when playername is defined
! packetlength = 0x10
! trade = wolfpack.packet( 0x6F, packetlength )
!
! if playername != "":
! packetlength += len( playername ) + 2
! trade.resize( packetlength )
! trade.setbyte( 16, 1 )
! trade.setascii( 17, playername )
!
! trade.setshort( 1, packetlength )
! trade.setbyte( 3, action )
! trade.setint( 4, partnerserial )
! trade.setint( 8, box1serial )
! trade.setint( 12, box2serial )
! trade.send( socket )
!
! return OK
!
! def sendclosetrade( socket, boxserial ):
! # 2 - close action
! action = 1
! packetlength = 8
! trade = wolfpack.packet( 0x6F, packetlength )
! trade.setshort( 1, packetlength )
! trade.setbyte( 3, action )
! trade.setint( 4, boxserial )
! trade.send( socket )
return OK
|
|
From: <co...@us...> - 2003-11-25 18:54:16
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1:/tmp/cvs-serv28499/definitions Modified Files: scripts.xml Log Message: secure trading almost working Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** scripts.xml 1 Nov 2003 14:51:38 -0000 1.69 --- scripts.xml 25 Nov 2003 18:54:12 -0000 1.70 *************** *** 6,11 **** --> <definitions> <script>npc.healer</script> - <script>training_dummy</script> <script>pickpocket_dip</script> --- 6,11 ---- --> <definitions> + <script>trading</script> <script>npc.healer</script> <script>training_dummy</script> <script>pickpocket_dip</script> *************** *** 113,115 **** --- 113,116 ---- <script>skills.provocation</script> <script>skills.mining</script> + </definitions> |
|
From: <co...@us...> - 2003-11-25 06:28:35
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv23794/scripts/wolfpack Modified Files: consts.py Log Message: EVENT_TRADE* added Index: consts.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/consts.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** consts.py 15 Nov 2003 20:55:13 -0000 1.34 --- consts.py 25 Nov 2003 06:17:50 -0000 1.35 *************** *** 210,214 **** # Id's for Hooks (not all are hookable though) ! EVENT_USE = 0, EVENT_SINGLECLICK = 1 EVENT_COLLIDE = 2 --- 210,214 ---- # Id's for Hooks (not all are hookable though) ! EVENT_USE = 0 EVENT_SINGLECLICK = 1 EVENT_COLLIDE = 2 *************** *** 246,250 **** EVENT_DAMAGE = 34 EVENT_CASTSPELL = 35 ! EVENT_COUN = 36 HOUSE = 0 --- 246,252 ---- EVENT_DAMAGE = 34 EVENT_CASTSPELL = 35 ! EVENT_TRADE = 36 ! EVENT_TRADESTART = 37 ! EVENT_COUNT = 38 HOUSE = 0 |
|
From: <co...@us...> - 2003-11-25 06:28:34
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv24019/scripts/wolfpack Modified Files: utilities.py Log Message: russian sysmessage Index: utilities.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/utilities.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** utilities.py 15 Nov 2003 20:55:14 -0000 1.20 --- utilities.py 25 Nov 2003 06:19:09 -0000 1.21 *************** *** 276,277 **** --- 276,281 ---- self.deltag( tagname ) return OK + + def rusmsg( player, locmsg ): + player.socket.sysmessage( unicode( locmsg, 'cp1251') ) + return OK |
|
From: <co...@us...> - 2003-11-24 20:31:01
|
Update of /cvsroot/wpdev/xmlscripts/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv9989/scripts
Added Files:
trading.py
Log Message:
initial trading script commit
--- NEW FILE: trading.py ---
import wolfpack
from wolfpack.consts import *
from wolfpack.utilities import rusmsg
def onLoad():
wolfpack.registerglobal( EVENT_TRADESTART, 'trading' )
wolfpack.registerglobal( EVENT_TRADE, 'trading' )
def onTradeStart( player1, player2 ):
rusmsg( player1, 'Âûçâàíî ñîçäàíèå îêíà' )
#Sending trade window to both players etc
action = 0
box1 = player1.itemonlayer( LAYER_TRADING )
if not box1:
box1 = wolfpack.additem("e75")
box1.layer = LAYER_TRADING
box1.owner = player1.serial
box2 = player2.itemonlayer( LAYER_TRADING )
if not box2:
box2 = wolfpack.additem("e75")
box2.layer = LAYER_TRADING
box2.owner = player2.serial
packet1 = wolfpack.packet( 0x6F, 17 )
packet2 = wolfpack.packet( 0x6F, 17 )
#set partners
packet1.setint( 4, player2.serial )
packet2.setint( 4, player1.serial )
packet1.setascii( 17, player1.name )
packet2.setascii( 17, player2.name )
#box to us
packet1.setint( 8, box1.serial )
packet1.setint( 12, box2.serial )
#box to partner
packet2.setint( 8, box2.serial )
packet2.setint( 8, box1.serial )
packet1.send( player1.socket )
packet2.send( player2.socket )
#Partner
packet1.setint( 4, box1.serial )
#Box1
packet1.setint( 8, 0 )
#Box2
packet1.setint( 12, 0 )
#Name
packet1.setascii( 17, '')
packet1.send( player1.socket )
#Partner
packet2.setint( 4, box2.serial )
#Box1
packet2.setint( 8, 0 )
#Box2
packet2.setint( 12, 0 )
#Name
packet2.setascii( 17, '')
packet2.send( player2.socket )
return OK
def onTrade( player, type, buttonstate, itemserial ):
#Receiving button state etc
rusmsg( player, 'Òîðãîâëÿ' )
return OK
|
|
From: <co...@us...> - 2003-11-24 20:27:31
|
Update of /cvsroot/wpdev/wolfpack/network
In directory sc8-pr-cvs1:/tmp/cvs-serv9169/network
Modified Files:
uorxpackets.cpp uorxpackets.h uosocket.cpp uosocket.h
Log Message:
tradewindow
Index: uorxpackets.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uorxpackets.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** uorxpackets.cpp 15 Sep 2003 19:56:54 -0000 1.52
--- uorxpackets.cpp 24 Nov 2003 20:27:28 -0000 1.53
***************
*** 65,68 ****
--- 65,69 ----
case 0x66: return new cUORxBookPage( data );
case 0x6C: return new cUORxTarget( data );
+ case 0x6F: return new cUORxSecureTrading( data );
case 0x72: return new cUORxChangeWarmode( data );
case 0x73: return new cUORxPing( data );
Index: uorxpackets.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uorxpackets.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** uorxpackets.h 15 Sep 2003 19:56:54 -0000 1.52
--- uorxpackets.h 24 Nov 2003 20:27:28 -0000 1.53
***************
*** 435,438 ****
--- 435,448 ----
};
+ // 0x6F Secure Trading
+ class cUORxSecureTrading : public cUOPacket
+ {
+ public:
+ cUORxSecureTrading( const QByteArray &data ): cUOPacket( data ) {}
+ uchar type() const { return (*this)[3]; }
+ uint itemserial() const { return getInt( 4 ); }
+ uchar buttonstate() const { return (*this)[11]; }
+ };
+
// 0x22 ResyncWalk
class cUORxResyncWalk: public cUOPacket
***************
*** 486,489 ****
--- 496,500 ----
QStringList lines();
};
+
// 0xB1 Gump Response
Index: uosocket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v
retrieving revision 1.298
retrieving revision 1.299
diff -C2 -d -r1.298 -r1.299
*** uosocket.cpp 24 Nov 2003 02:36:10 -0000 1.298
--- uosocket.cpp 24 Nov 2003 20:27:28 -0000 1.299
***************
*** 257,260 ****
--- 257,262 ----
case 0x6c:
handleTarget( dynamic_cast< cUORxTarget* >( packet ) ); break;
+ case 0x6F:
+ handleSecureTrading( dynamic_cast< cUORxSecureTrading* >( packet ) ); break;
case 0x72:
handleChangeWarmode( dynamic_cast< cUORxChangeWarmode* >( packet ) ); break;
***************
*** 2164,2167 ****
--- 2166,2175 ----
return false;
return ( socket->player()->dist( _player ) < socket->player()->visualRange() );
+ }
+
+ void cUOSocket::handleSecureTrading( cUORxSecureTrading *packet )
+ {
+ // Trade::trademsg( this, packet );
+ this->player()->onTrade( packet->type(), packet->buttonstate(), packet->itemserial() );
}
Index: uosocket.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.h,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -d -r1.98 -r1.99
*** uosocket.h 23 Nov 2003 03:46:22 -0000 1.98
--- uosocket.h 24 Nov 2003 20:27:28 -0000 1.99
***************
*** 132,135 ****
--- 132,136 ----
// Handler
+ void handleSecureTrading( cUORxSecureTrading* packet );
void handleLoginRequest( cUORxLoginRequest *packet );
void handleHardwareInfo( cUORxHardwareInfo *packet );
|
|
From: <co...@us...> - 2003-11-24 20:27:31
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv9169
Modified Files:
dragdrop.cpp player.cpp player.h pythonscript.h
Log Message:
tradewindow
Index: dragdrop.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v
retrieving revision 1.205
retrieving revision 1.206
diff -C2 -d -r1.205 -r1.206
*** dragdrop.cpp 23 Sep 2003 23:55:20 -0000 1.205
--- dragdrop.cpp 24 Nov 2003 20:27:27 -0000 1.206
***************
*** 527,532 ****
--- 527,534 ----
if( pOtherChar->objectType() == enPlayer && dynamic_cast<P_PLAYER>(pOtherChar)->socket() )
{
+ dynamic_cast<P_PLAYER>(pChar)->onTradeStart( dynamic_cast<P_PLAYER>(pOtherChar) );
// Check if we're already trading,
// if not create a new window
+ /*
P_ITEM tradeWindow = pChar->atLayer( cBaseChar::TradeWindow );
***************
*** 541,545 ****
--- 543,549 ----
pItem->removeFromView( false );
pItem->update();
+ */
return;
+
}
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** player.cpp 24 Nov 2003 03:14:52 -0000 1.48
--- player.cpp 24 Nov 2003 20:27:27 -0000 1.49
***************
*** 1270,1273 ****
--- 1270,1312 ----
}
+ bool cPlayer::onTradeStart( P_PLAYER partner )
+ {
+ cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_TRADESTART );
+ bool result = false;
+
+ if( scriptChain || global )
+ {
+ PyObject *args = Py_BuildValue( "(O&O&)", PyGetCharObject, this, PyGetCharObject, partner );
+
+ result = cPythonScript::callChainedEventHandler( EVENT_TRADESTART, scriptChain, args );
+
+ if( !result && global )
+ result = global->callEventHandler( EVENT_TRADESTART, args );
+
+ Py_DECREF( args );
+ }
+
+ return result;
+ }
+
+ bool cPlayer::onTrade( unsigned int type, unsigned int buttonstate, SERIAL itemserial )
+ {
+ cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_TRADE );
+ bool result = false;
+
+ if( scriptChain || global )
+ {
+ PyObject *args = Py_BuildValue( "(O&iii)", PyGetCharObject, this, type, buttonstate, itemserial );
+
+ result = cPythonScript::callChainedEventHandler( EVENT_TRADE, scriptChain, args );
+
+ if( !result && global )
+ result = global->callEventHandler( EVENT_TRADE, args );
+
+ Py_DECREF( args );
+ }
+
+ return result;
+ }
bool cPlayer::onPickup( P_ITEM pItem )
{
Index: player.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** player.h 14 Sep 2003 16:09:01 -0000 1.24
--- player.h 24 Nov 2003 20:27:27 -0000 1.25
***************
*** 114,117 ****
--- 114,119 ----
bool onUse( P_ITEM pItem );
bool onPickup( P_ITEM pItem );
+ bool onTrade( unsigned int type, unsigned int buttonstate, SERIAL itemserial );
+ bool onTradeStart( P_PLAYER partner );
// getters
Index: pythonscript.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/pythonscript.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** pythonscript.h 23 Sep 2003 12:40:18 -0000 1.10
--- pythonscript.h 24 Nov 2003 20:27:27 -0000 1.11
***************
*** 81,85 ****
EVENT_DAMAGE,
EVENT_CASTSPELL,
! EVENT_COUNT
};
--- 81,87 ----
EVENT_DAMAGE,
EVENT_CASTSPELL,
! EVENT_TRADE,
! EVENT_TRADESTART,
! EVENT_COUNT,
};
***************
*** 123,126 ****
--- 125,130 ----
"onDamage",
"onCastSpell",
+ "onTrade",
+ "onTradeStart",
0
};
|
|
From: <dar...@us...> - 2003-11-24 03:15:37
|
Update of /cvsroot/wpdev/xmlscripts/definitions/npcs/humans In directory sc8-pr-cvs1:/tmp/cvs-serv22506/npcs/humans Modified Files: civilists.xml guards.xml vendors.xml Log Message: Fixed a bug player and npc equipment not being sent and fixed a bug with saving the baseid property. Also improved handling of several tags in the definitions. It's not <item inherit anylonger but <item id Index: civilists.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/humans/civilists.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** civilists.xml 28 Sep 2003 19:07:06 -0000 1.7 --- civilists.xml 24 Nov 2003 03:15:33 -0000 1.8 *************** *** 19,27 **** <!-- The Equipment of a standard human --> <equipped> ! <item inherit="e75" /> <!-- Backpack --> ! <item inheritlist="HAIR" /> <!-- Random Hair --> ! <item inheritlist="SHIRTS" /> <!-- Random Shirts --> ! <item inheritlist="PANTS" /> <!-- Random Pants --> ! <item inheritlist="SHOES" /> <!-- Random Shoes --> </equipped> --- 19,27 ---- <!-- The Equipment of a standard human --> <equipped> ! <item id="e75" /> <!-- Backpack --> ! <item list="HAIR" /> <!-- Random Hair --> ! <item list="SHIRTS" /> <!-- Random Shirts --> ! <item list="PANTS" /> <!-- Random Pants --> ! <item list="SHOES" /> <!-- Random Shoes --> </equipped> *************** *** 42,50 **** <!-- 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 --> </equipped> --- 42,50 ---- <!-- The Equipment of a standard human --> <equipped> ! <item id="e75" /> <!-- Backpack --> ! <item list="HAIR_FEMALE" /> <!-- Random Hair --> ! <item list="DRESS" /> <!-- Random Dress`s --> ! <item list="PANTS" /> <!-- Random Pants --> ! <item list="SHOES" /> <!-- Random Shoes --> </equipped> Index: guards.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/humans/guards.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** guards.xml 27 Sep 2003 12:30:29 -0000 1.7 --- guards.xml 24 Nov 2003 03:15:33 -0000 1.8 *************** *** 56,65 **** <equipped> ! <item inheritlist="HAIR" /> ! <item inherit="e75" /> <!-- Backpack --> ! <item inherit="143f" /> <!-- Halberd --> ! <item inherit="1f7b" /> <!-- Doublet --> ! <item inherit="1410" /> <!-- Plate Arms --> ! <item inherit="1411" /> <!-- Plate Legs --> </equipped> </npc> --- 56,65 ---- <equipped> ! <item list="HAIR" /> ! <item id="e75" /> <!-- Backpack --> ! <item id="143f" /> <!-- Halberd --> ! <item id="1f7b" /> <!-- Doublet --> ! <item id="1410" /> <!-- Plate Arms --> ! <item id="1411" /> <!-- Plate Legs --> </equipped> </npc> *************** *** 89,96 **** <equipped> ! <item inheritlist="HAIR_FEMALE" /> ! <item inherit="e75" /> <!-- Backpack --> ! <item inherit="143f" /> <!-- Halberd --> ! <item inherit="1c04" /> <!-- Female Plate --> </equipped> </npc> --- 89,96 ---- <equipped> ! <item list="HAIR_FEMALE" /> ! <item id="e75" /> <!-- Backpack --> ! <item id="143f" /> <!-- Halberd --> ! <item id="1c04" /> <!-- Female Plate --> </equipped> </npc> Index: vendors.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/humans/vendors.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** vendors.xml 1 Oct 2003 09:18:01 -0000 1.26 --- vendors.xml 24 Nov 2003 03:15:33 -0000 1.27 *************** *** 17,22 **** <ai>Human_Vendor</ai> <equipped> ! <item inherit="1515" /> <!-- Cloak --> ! <item inherit="1541" /> <!-- Sash --> </equipped> <category>Vendors\Banker (Male)</category> --- 17,22 ---- <ai>Human_Vendor</ai> <equipped> ! <item id="1515" /> <!-- Cloak --> [...3638 lines suppressed...] <amount>50</amount> </item> ! <item id="f8c"> <amount>50</amount> </item> ! <item id="f8d"> <amount>50</amount> </item> </restockable> <sellable> ! <item id="f7a"/> ! <item id="f7b"/> ! <item id="f84"/> ! <item id="f85"/> ! <item id="f86"/> ! <item id="f88"/> ! <item id="f8c"/> ! <item id="f8d"/> </sellable> </shopkeeper> |
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv22317
Modified Files:
basechar.cpp house.cpp items.cpp npc.cpp player.cpp
wolfpack.vcproj wpdefmanager.cpp wpdefmanager.h
Log Message:
Fixed a bug player and npc equipment not being sent and fixed a bug with saving the baseid property. Also improved handling of several tags in the definitions. It's not <item inherit anylonger but <item id
Index: basechar.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** basechar.cpp 24 Nov 2003 02:36:10 -0000 1.48
--- basechar.cpp 24 Nov 2003 03:14:51 -0000 1.49
***************
*** 1156,1213 ****
else if( TagName == "equipped" )
{
! std::vector< const cElement* > equipment;
!
! unsigned int i;
! for( i = 0; i < Tag->childCount(); ++i )
{
! const cElement *childNode = Tag->getChild( i );
! if( childNode->name() == "item" )
! equipment.push_back( childNode );
! else if( childNode->name() == "getlist" && childNode->hasAttribute( "id" ) )
{
! QStringList list = DefManager->getList( childNode->getAttribute( "id" ) );
!
! for( QStringList::iterator it = list.begin(); it != list.end(); it++ )
{
! const cElement *listNode = DefManager->getDefinition( WPDT_ITEM, *it );
!
! if( listNode )
! equipment.push_back( listNode );
}
! }
! }
!
! std::vector< const cElement* >::iterator iter = equipment.begin();
!
! while( iter != equipment.end() )
! {
! P_ITEM nItem = new cItem;
!
! if( nItem == NULL )
! continue;
!
! nItem->Init( true );
! nItem->applyDefinition( *iter );
! UINT8 mLayer = nItem->layer();
! nItem->setLayer( 0 );
! // Instead of deleting try to get a valid layer instead
! if( !mLayer )
! {
! tile_st tInfo = TileCache::instance()->getTile( nItem->id() );
! if( tInfo.layer > 0 )
! mLayer = tInfo.layer;
}
-
- // Recheck
- if( !mLayer )
- nItem->remove();
else
! this->addItem( static_cast<cBaseChar::enLayer>(mLayer), nItem ); // not sure about this one.
!
! ++iter;
}
}
--- 1156,1212 ----
else if( TagName == "equipped" )
{
! for( unsigned int i = 0; i < Tag->childCount(); ++i )
{
! const cElement *element = Tag->getChild( i );
! if( element->name() == "item" )
{
! P_ITEM pItem = 0;
!
! const QString &id = element->getAttribute( "id" );
!
! if( id != QString::null )
{
! pItem = cItem::createFromScript( id );
}
! else
! {
! const QString &list = element->getAttribute( "list" );
! if( list != QString::null )
! {
! pItem = cItem::createFromList( list );
! }
! }
! if( pItem )
! {
! pItem->applyDefinition( element );
! unsigned char mLayer = pItem->layer();
! pItem->setLayer( 0 );
!
! // Instead of deleting try to get a valid layer instead
! if( !mLayer )
! {
! tile_st tInfo = TileCache::instance()->getTile( pItem->id() );
! if( tInfo.layer > 0 )
! mLayer = tInfo.layer;
! }
!
! if( !mLayer )
! pItem->remove();
! else
! addItem( static_cast<cBaseChar::enLayer>(mLayer), pItem );
! }
! else
! {
! Console::instance()->log( LOG_ERROR, QString( "Invalid equipped element missing id and list attribute in npc definition '%1'." ).arg( element->getTopmostParent()->getAttribute( "id", "unknown" ) ) );
! }
}
else
! {
! Console::instance()->log( LOG_ERROR, QString( "Invalid equipped element '%1' in npc definition '%2'." ).arg( element->name() ).arg( element->getTopmostParent()->getAttribute( "id", "unknown" ) ) );
! }
}
}
Index: house.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/house.cpp,v
retrieving revision 1.116
retrieving revision 1.117
diff -C2 -d -r1.116 -r1.117
*** house.cpp 11 Sep 2003 16:19:50 -0000 1.116
--- house.cpp 24 Nov 2003 03:14:52 -0000 1.117
***************
*** 66,70 ****
nItem->Init( true );
-
nItem->applyDefinition( Tag );
--- 66,69 ----
Index: items.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v
retrieving revision 1.359
retrieving revision 1.360
diff -C2 -d -r1.359 -r1.360
*** items.cpp 24 Nov 2003 02:36:10 -0000 1.359
--- items.cpp 24 Nov 2003 03:14:52 -0000 1.360
***************
*** 480,483 ****
--- 480,484 ----
addField("buyprice", buyprice_ );
addField("restock", restock_ );
+ addStrField("baseid", base ? base->id() : QString("") );
addCondition( "serial", serial() );
***************
*** 1336,1378 ****
}
! void cItem::processContainerNode( const cElement *Tag )
{
//item containers can be scripted like this:
/*
<contains>
! <item><inherit list="myList" /></item>
! <item><inherit id="myItem1" /><amount><random ... /></amount><color><colorlist><random...></colorlist></color></item>
...
</contains>
*/
! std::vector< const cElement* > content;
! unsigned int i;
!
! for( i = 0; i < Tag->childCount(); ++i )
{
! const cElement *childNode = Tag->getChild( i );
! if( childNode->name() == "item" )
! {
! content.push_back( childNode );
! }
! else if( childNode->name() == "getlist" && childNode->hasAttribute( "id" ) )
{
! QStringList list = DefManager->getList( childNode->getAttribute( "id" ) );
!
! for( QStringList::iterator it = list.begin(); it != list.end(); it++ )
{
- const cElement *lItem = DefManager->getDefinition( WPDT_ITEM, *it );
- content.push_back( lItem );
}
! }
! }
!
! for( i = 0; i < content.size(); i++ )
! {
! P_ITEM nItem = new cItem;
! nItem->Init( true );
! nItem->applyDefinition( content[ i ] );
! addItem( nItem );
}
}
--- 1337,1373 ----
}
! void cItem::processContainerNode( const cElement *tag )
{
//item containers can be scripted like this:
/*
<contains>
! <item list="myList" />
! <item id="myItem1"><amount><random ... /></amount><color><colorlist><random...></colorlist></color></item>
...
</contains>
*/
! for( unsigned int i = 0; i < tag->childCount(); ++i )
{
! const cElement *element = tag->getChild( i );
! if( element->name() == "item" )
{
! P_ITEM pItem = 0;
!
! if( element->hasAttribute( "id" ) )
{
}
! else if( element->hasAttribute( "list" ) )
! {
! }
! else
! {
! Console::instance()->log( LOG_ERROR, QString( "Content element lacking id and list attribute in item definition '%1'." ).arg( element->getTopmostParent()->getAttribute( "id", "unknown" ) ) );
! }
! }
! else
! {
! Console::instance()->log( LOG_ERROR, QString( "Unknown content element '%1' in item definition '%1'." ).arg( element->name(), element->getTopmostParent()->getAttribute( "id", "unknown" ) ) );
! }
}
}
***************
*** 1876,1879 ****
--- 1871,1875 ----
buyprice_ = atoi( result[offset++] );
restock_ = atoi( result[offset++] );
+ base = ItemBases::instance()->getItemBase( result[offset++] );
// Their own weight should already be set.
Index: npc.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** npc.cpp 10 Oct 2003 21:13:46 -0000 1.50
--- npc.cpp 24 Nov 2003 03:14:52 -0000 1.51
***************
*** 291,294 ****
--- 291,299 ----
sendTooltip( mSock );
mSock->send( &drawChar );
+
+ for( ItemContainer::const_iterator it = content_.begin(); it != content_.end(); ++it )
+ {
+ it.data()->sendTooltip( mSock );
+ }
}
}
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** player.cpp 24 Nov 2003 02:36:10 -0000 1.47
--- player.cpp 24 Nov 2003 03:14:52 -0000 1.48
***************
*** 232,240 ****
if( mSock == socket_ )
{
! sendTooltip( mSock );
continue;
}
-
P_PLAYER pChar = mSock->player();
--- 232,239 ----
if( mSock == socket_ )
{
! sendTooltip( mSock );
continue;
}
P_PLAYER pChar = mSock->player();
***************
*** 260,263 ****
--- 259,268 ----
sendTooltip( mSock );
mSock->send( &drawChar );
+
+ // Send equipment of other players as well
+ for( ItemContainer::const_iterator it = content_.begin(); it != content_.end(); ++it )
+ {
+ it.data()->sendTooltip( mSock );
+ }
}
}
Index: wolfpack.vcproj
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.vcproj,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** wolfpack.vcproj 24 Nov 2003 02:36:10 -0000 1.3
--- wolfpack.vcproj 24 Nov 2003 03:14:53 -0000 1.4
***************
*** 243,250 ****
RelativePath=".\dragdrop.h"/>
<File
- RelativePath=".\encryption.cpp"/>
- <File
- RelativePath=".\encryption.h"/>
- <File
RelativePath=".\exceptions.h"/>
<File
--- 243,246 ----
***************
*** 557,560 ****
--- 553,560 ----
Name="Encryption"
Filter="">
+ <File
+ RelativePath=".\encryption.cpp"/>
+ <File
+ RelativePath=".\encryption.h"/>
<File
RelativePath=".\twofish\twofish2.c"/>
Index: wpdefmanager.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.cpp,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** wpdefmanager.cpp 24 Nov 2003 02:36:10 -0000 1.71
--- wpdefmanager.cpp 24 Nov 2003 03:14:53 -0000 1.72
***************
*** 619,625 ****
}
! cElement *cElement::parent() const
{
return parent_;
}
--- 619,635 ----
}
! const cElement *cElement::parent() const
{
return parent_;
+ }
+
+ const cElement *cElement::getTopmostParent() const
+ {
+ if( parent_ )
+ {
+ return parent_->getTopmostParent();
+ }
+
+ return this;
}
Index: wpdefmanager.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** wpdefmanager.h 24 Nov 2003 02:36:10 -0000 1.33
--- wpdefmanager.h 24 Nov 2003 03:14:53 -0000 1.34
***************
*** 121,127 ****
void setParent( cElement *parent );
! cElement *parent() const;
QString getValue() const;
};
--- 121,129 ----
void setParent( cElement *parent );
! const cElement *parent() const;
QString getValue() const;
+
+ const cElement *getTopmostParent() const;
};
|
|
From: <dar...@us...> - 2003-11-24 02:36:47
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1:/tmp/cvs-serv16516 Modified Files: startitems.xml Log Message: Removed some outdated properties and updated the vs.net project file. Started implementing the Base Definition property. Accessible via item.baseid in python you can now set and get the name of the definition this item was created from. Index: startitems.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/startitems.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** startitems.xml 14 Oct 2002 00:09:06 -0000 1.11 --- startitems.xml 24 Nov 2003 02:36:44 -0000 1.12 *************** *** 23,30 **** <!--Mortar & pestle --><item id="e9b"></item> <!--Bottle --><item id="f0e"><amount>4</amount></item> ! <!--Random Reagents--><item><inherit><random list="REAGENTS" /></inherit><amount>3</amount></item> ! <!--Random Reagents--><item><inherit><random list="REAGENTS" /></inherit><amount>3</amount></item> ! <!--Random Reagents--><item><inherit><random list="REAGENTS" /></inherit><amount>3</amount></item> ! <!--Random Reagents--><item><inherit><random list="REAGENTS" /></inherit><amount>3</amount></item> </startitems> --- 23,30 ---- <!--Mortar & pestle --><item id="e9b"></item> <!--Bottle --><item id="f0e"><amount>4</amount></item> ! <!--Random Reagents--><item list="REAGENTS"><amount>3</amount></item> ! <!--Random Reagents--><item list="REAGENTS"><amount>3</amount></item> ! <!--Random Reagents--><item list="REAGENTS"><amount>3</amount></item> ! <!--Random Reagents--><item list="REAGENTS"><amount>3</amount></item> </startitems> *************** *** 63,67 **** <startitems id="begging"> <inherit id="default" /> ! <!--Gnarled Staff --><equipment id="13f9"></equipment> </startitems> --- 63,68 ---- <startitems id="begging"> <inherit id="default" /> ! <!--Gnarled Staff --> ! <equipment id="13f9" /> </startitems> *************** *** 69,76 **** <startitems id="blacksmithing"> <inherit id="default" /> ! <!--Half Apron --><equipment id="153b"></equipment> ! <!--Ingots --><item id="1bf2"><amount>50</amount></item> ! <!--Random Mining Tool--><item><inherit><random list="MININGTOOLS" /></inherit></item> ! <!--Random Blacksmith Tool--><equipment><inherit><random list="BLACKSMITHTOOLS" /></inherit></equipment> </startitems> --- 70,85 ---- <startitems id="blacksmithing"> <inherit id="default" /> ! ! <!--Half Apron --> ! <equipment id="153b" /> ! ! <!--Ingots --> ! <item id="1bf2"><amount>50</amount></item> ! ! <!--Random Mining Tool--> ! <item list="MININGTOOLS" /> ! ! <!--Random Blacksmith Tool--> ! <equipment list="BLACKSMITHTOOLS"/> </startitems> *************** *** 86,90 **** <startitems id="peacemaking"> <inherit id="default" /> ! <!--Random Instrument--><item><inherit><random list="INSTRUMENTS" /></inherit></item> </startitems> --- 95,99 ---- <startitems id="peacemaking"> <inherit id="default" /> ! <!--Random Instrument--><item list="INSTRUMENTS" /> </startitems> *************** *** 101,105 **** <!--Half Apron --><equipment id="153b"></equipment> <!--Boards --><item id="1bd7"><amount>10</amount></item> ! <!--Random Carpentry Tool--><item><inherit><random list="CARPENTRYTOOLS" /></inherit></item> </startitems> --- 110,116 ---- <!--Half Apron --><equipment id="153b"></equipment> <!--Boards --><item id="1bd7"><amount>10</amount></item> ! ! <!--Random Carpentry Tool--> ! <item list="CARPENTRYTOOLS" /> </startitems> *************** *** 131,135 **** <startitems id="enticement"> <inherit id="default" /> ! <!--Random Instrument--><item><inherit><random list="INSTRUMENTS" /></inherit></item> </startitems> --- 142,147 ---- <startitems id="enticement"> <inherit id="default" /> ! <!--Random Instrument--> ! <item list="INSTRUMENTS" /> </startitems> *************** *** 173,177 **** <startitems id="provocation"> <inherit id="default" /> ! <!--Random Instrument--><item><inherit><random list="INSTRUMENTS" /></inherit></item> </startitems> --- 185,190 ---- <startitems id="provocation"> <inherit id="default" /> ! <!--Random Instrument--> ! <item list="INSTRUMENTS" /> </startitems> *************** *** 195,201 **** <!--Wizards Hat --><equipment id="1718"></equipment> <!--Robe --><equipment id="1f03"></equipment> ! <!--Random 1-4 Circle Scrolls--><item><inherit><random list="1_THRU_4_CIRCLE" /></inherit></item> ! <!--Random 1-4 Circle Scrolls--><item><inherit><random list="1_THRU_4_CIRCLE" /></inherit></item> ! <!--Random 1-4 Circle Scrolls--><item><inherit><random list="1_THRU_4_CIRCLE" /></inherit></item> <!--Black Pearl --><item id="f7a"><amount>30</amount></item> <!--Bloodmoss --><item id="f7b"><amount>30</amount></item> --- 208,214 ---- <!--Wizards Hat --><equipment id="1718"></equipment> <!--Robe --><equipment id="1f03"></equipment> ! <!--Random 1-4 Circle Scrolls--><item list="1_THRU_4_CIRCLE" /> ! <!--Random 1-4 Circle Scrolls--><item list="1_THRU_4_CIRCLE" /> ! <!--Random 1-4 Circle Scrolls--><item list="1_THRU_4_CIRCLE" /> <!--Black Pearl --><item id="f7a"><amount>30</amount></item> <!--Bloodmoss --><item id="f7b"><amount>30</amount></item> *************** *** 228,232 **** <startitems id="musicianship"> <inherit id="default" /> ! <!--Random Instrument--><item><inherit><random list="INSTRUMENTS" /></inherit></item> </startitems> --- 241,245 ---- <startitems id="musicianship"> <inherit id="default" /> ! <!--Random Instrument--><item list="INSTRUMENTS" /> </startitems> *************** *** 268,274 **** <startitems id="tasteid"> <inherit id="default" /> ! <!--Random Potion--><item><inherit><random list="POTIONS" /></inherit></item> ! <!--Random Potion--><item><inherit><random list="POTIONS" /></inherit></item> ! <!--Random Potion--><item><inherit><random list="POTIONS" /></inherit></item> </startitems> --- 281,287 ---- <startitems id="tasteid"> <inherit id="default" /> ! <!--Random Potion--><item list="POTIONS" /> ! <!--Random Potion--><item list="POTIONS" /> ! <!--Random Potion--><item list="POTIONS" /> </startitems> *************** *** 323,327 **** <startitems id="mining"> <inherit id="default" /> ! <!--Random Mining Tool--><item><inherit><random list="MININGTOOLS" /></inherit></item> </startitems> --- 336,342 ---- <startitems id="mining"> <inherit id="default" /> ! ! <!--Random Mining Tool--> ! <item list="MININGTOOLS" /> </startitems> |
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv16366 Modified Files: Timing.cpp basechar.cpp items.cpp items.h player.cpp wolfpack.vcproj world.cpp wpdefmanager.cpp wpdefmanager.h Log Message: Removed some outdated properties and updated the vs.net project file. Started implementing the Base Definition property. Accessible via item.baseid in python you can now set and get the name of the definition this item was created from. Index: Timing.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/Timing.cpp,v retrieving revision 1.182 retrieving revision 1.183 diff -C2 -d -r1.182 -r1.183 *** Timing.cpp 23 Sep 2003 23:55:19 -0000 1.182 --- Timing.cpp 24 Nov 2003 02:36:09 -0000 1.183 *************** *** 230,271 **** } - static int check_house_decay() - { - int houses=0; - int decayed_houses=0; - unsigned long int timediff; - unsigned long int ct=getNormalizedTime(); - - cItemIterator iter_items; - P_ITEM pi; - for( pi = iter_items.first(); pi; pi = iter_items.next() ) - { - if (!pi->free && IsHouse(pi->id())) - { - if (pi->time_unused>SrvParams->housedecay_secs()) // not used longer than max_unused time ? delete the house - { - decayed_houses++; - (dynamic_cast< cHouse* >(pi))->remove(); - } - else // house ok -> update unused-time-attribute - { - timediff=(ct-pi->timeused_last)/MY_CLOCKS_PER_SEC; - pi->time_unused+=timediff; // might be over limit now, but it will be cought next check anyway - - pi->timeused_last=ct; // if we don't do that and housedecay is checked every 11 minutes, - // it would add 11,22,33,... minutes. So now timeused_last should in fact - // be called timeCHECKED_last. but as there is a new timer system coming up - // that will make things like this much easier, I'm too lazy now to rename - // it (Duke, 16.2.2001) - } - - houses++; - } - } - - return decayed_houses; - } - - void checkPC( P_PLAYER pc, unsigned int currenttime ) { --- 230,233 ---- *************** *** 446,487 **** if( shoprestocktime == 0 ) shoprestocktime = currenttime + MY_CLOCKS_PER_SEC * 60 * 20; - - //static unsigned int repairworldtimer=0; - - if (housedecaytimer<=currenttime) - { - ////////////////////// - ///// check_houses - ///////////////////// - if(SrvParams->housedecay_secs() != -1) - check_house_decay(); - - /* TODO: rewrite STABLEMASTER with python - //////////////////// - // check stabling - /////////////////// - unsigned long int diff; - cCharIterator iter_char; - for( P_CHAR pc = iter_char.first(); pc; pc = iter_char.next() ) - { - if( pc->npc_type() == 1 ) - { - vector<SERIAL> pets( stablesp.getData(pc->serial()) ); - unsigned int ci; - for (ci = 0; ci < pets.size();ci++) - { - P_CHAR pc_pet = FindCharBySerial(pets[ci]); - if (pc_pet != NULL) - { - diff = (getNormalizedTime() - pc_pet->timeused_last()) / MY_CLOCKS_PER_SEC; - pc_pet->setTime_unused( pc_pet->time_unused() + diff ); - } - } - } - } - */ - housedecaytimer=uiCurrentTime+MY_CLOCKS_PER_SEC*60*30; // check only each 30 minutes - } - if(checkspawnregions<=currenttime && SrvParams->spawnRegionCheckTime() != -1)//Regionspawns --- 408,411 ---- Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** basechar.cpp 30 Sep 2003 15:06:29 -0000 1.47 --- basechar.cpp 24 Nov 2003 02:36:10 -0000 1.48 *************** *** 705,713 **** if( !backpack ) { ! backpack = new cItem; ! backpack->Init(); ! backpack->setId( 0xE75 ); backpack->setOwner( this ); - backpack->setType( 1 ); addItem( Backpack, backpack ); backpack->update(); --- 705,710 ---- if( !backpack ) { ! backpack = cItem::createFromScript( "e75" ); backpack->setOwner( this ); addItem( Backpack, backpack ); backpack->update(); Index: items.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v retrieving revision 1.358 retrieving revision 1.359 diff -C2 -d -r1.358 -r1.359 *** items.cpp 30 Oct 2003 10:46:16 -0000 1.358 --- items.cpp 24 Nov 2003 02:36:10 -0000 1.359 *************** *** 69,72 **** --- 69,107 ---- #define DBGFILE "items.cpp" + /** + * Loads item definitions and transforms them into cItemBase instances. + */ + cItemBases::cItemBases() + { + itembases.setAutoDelete( true ); + } + + void cItemBases::load() + { + // Clear all current ItemBases + itembases.clear(); + + QStringList sections = DefManager->getSections( WPDT_ITEM ); + + for( unsigned int i = 0; i < sections.size(); ++i ) + { + const cElement *element = DefManager->getDefinition( WPDT_ITEM, sections[i] ); + const QString &id = element->getAttribute( "id" ); + + if( id != QString::null ) + { + cItemBase *itembase = new cItemBase; + itembase->id_ = id; + + itembases.insert( id, itembase ); + } + } + } + + inline cItemBase *cItemBases::getItemBase( const QString &id ) + { + return itembases.find( id ); + } + /***************************************************************************** cItem member functions *************** *** 74,80 **** // constructor ! cItem::cItem(): container_(0), totalweight_(0), incognito(false), ! timeused_last(0), sellprice_( 0 ), ! buyprice_( 0 ), restock_( 1 ), antispamtimer_( 0 ) { spawnregion_ = QString::null; --- 109,114 ---- // constructor ! cItem::cItem(): container_(0), totalweight_(0), sellprice_( 0 ), ! buyprice_( 0 ), restock_( 1 ), antispamtimer_( 0 ), base( 0 ) { spawnregion_ = QString::null; *************** *** 106,110 **** this->hidamage_=src.hidamage_; this->hp_ = src.hp_; - this->incognito = src.incognito; this->isPersistent = src.isPersistent; this->layer_ = src.layer_; --- 140,143 ---- *************** *** 119,125 **** this->setOwnSerialOnly(src.ownSerial()); this->spawnregion_=src.spawnregion_; ! this->speed_=src.speed_; ! this->time_unused=src.time_unused; ! this->timeused_last=getNormalizedTime(); this->totalweight_ = src.totalweight_; this->type2_ = src.type2_; --- 152,156 ---- this->setOwnSerialOnly(src.ownSerial()); this->spawnregion_=src.spawnregion_; ! this->speed_=src.speed_; this->totalweight_ = src.totalweight_; this->type2_ = src.type2_; *************** *** 127,130 **** --- 158,162 ---- this->visible_=src.visible_; this->weight_ = src.weight_; + this->base = src.base; this->setTotalweight( amount_ * weight_ ); *************** *** 435,439 **** addField("hidamage", hidamage_); addField("lodamage", lodamage_); - addField("time_unused", time_unused); addField("weight", weight_); addField("hp", hp_ ); --- 467,470 ---- *************** *** 525,529 **** this->container_ = 0; - this->incognito=false;//AntiChrist - incognito this->setMultis( INVALID_SERIAL ); //Multi serial --- 556,559 ---- *************** *** 549,554 **** this->priv_ = 0; // Bit 0, nodecay off/on. Bit 1, newbie item off/on. Bit 2 Dispellable this->poisoned_ = 0; //AntiChrist -- for poisoning skill - this->time_unused = 0; - this->timeused_last=getNormalizedTime(); } --- 579,582 ---- *************** *** 826,859 **** } - - /*! - Retrieves the Item Information stored in Section and creates an item based on it - */ - P_ITEM cItem::createFromScript( const QString& Section ) - { - if( Section.length() == 0 ) - return NULL; - - P_ITEM nItem = NULL; - - // Get an Item and assign a serial to it - const cElement* DefSection = DefManager->getDefinition( WPDT_ITEM, Section ); - - if( !DefSection ) // section not found - { - Console::instance()->log( LOG_ERROR, QString( "Unable to create unscripted item: %1\n" ).arg( Section ) ); - return NULL; - } - - nItem = new cItem; - nItem->Init( true ); - nItem->applyDefinition( DefSection ); - - nItem->onCreate( Section ); - - return nItem; - } - - // Added by DarkStorm bool cItem::onSingleClick( P_PLAYER Viewer ) { --- 854,857 ---- *************** *** 1859,1863 **** hidamage_ = atoi( result[offset++] ); lodamage_ = atoi( result[offset++] ); - time_unused = atoi( result[offset++] ); weight_ = atoi( result[offset++] ); hp_ = atoi( result[offset++] ); --- 1857,1860 ---- *************** *** 1889,1893 **** { cUObject::buildSqlString( fields, tables, conditions ); ! fields.push_back( "items.id,items.color,items.cont,items.layer,items.type,items.type2,items.amount,items.decaytime,items.def,items.hidamage,items.lodamage,items.time_unused,items.weight,items.hp,items.maxhp,items.speed,items.poisoned,items.magic,items.owner,items.visible,items.spawnregion,items.priv,items.sellprice,items.buyprice,items.restock" ); tables.push_back( "items" ); conditions.push_back( "uobjectmap.serial = items.serial" ); --- 1886,1890 ---- { cUObject::buildSqlString( fields, tables, conditions ); ! fields.push_back( "items.id,items.color,items.cont,items.layer,items.type,items.type2,items.amount,items.decaytime,items.def,items.hidamage,items.lodamage,items.weight,items.hp,items.maxhp,items.speed,items.poisoned,items.magic,items.owner,items.visible,items.spawnregion,items.priv,items.sellprice,items.buyprice,items.restock,items.baseid" ); tables.push_back( "items" ); conditions.push_back( "uobjectmap.serial = items.serial" ); *************** *** 2065,2068 **** --- 2062,2070 ---- else SET_INT_PROPERTY( "color", color_ ) + else if( name == "baseid" ) + { + base = ItemBases::instance()->getItemBase( value.toString() ); + } + // Amount needs weight handling else if( name == "amount" ) *************** *** 2168,2174 **** else SET_INT_PROPERTY( "restock", restock_ ) else SET_INT_PROPERTY( "poisoned", poisoned_ ) - else SET_INT_PROPERTY( "incognito", incognito ) - else SET_INT_PROPERTY( "timeunused", time_unused ) - else SET_INT_PROPERTY( "timeusedlast", timeused_last ) else SET_INT_PROPERTY( "magic", magic_ ) else SET_INT_PROPERTY( "visible", visible_ ) --- 2170,2173 ---- *************** *** 2242,2249 **** { GET_PROPERTY( "id", id_ ) else GET_PROPERTY( "color", color_ ) else GET_PROPERTY( "amount", amount_ ) else GET_PROPERTY( "layer", layer_ ) - // Flag properties are set elsewhere!! else GET_PROPERTY( "type", type_ ) else GET_PROPERTY( "type2", type2_ ) --- 2241,2248 ---- { GET_PROPERTY( "id", id_ ) + else GET_PROPERTY( "baseid", ( base ? base->id() : QString::null ) ) else GET_PROPERTY( "color", color_ ) else GET_PROPERTY( "amount", amount_ ) else GET_PROPERTY( "layer", layer_ ) else GET_PROPERTY( "type", type_ ) else GET_PROPERTY( "type2", type2_ ) *************** *** 2284,2290 **** else GET_PROPERTY( "restock", restock_ ) else GET_PROPERTY( "poisoned", (int)poisoned_ ) - else GET_PROPERTY( "incognito", incognito ? 1 : 0 ) - else GET_PROPERTY( "timeunused", (int)time_unused ) - else GET_PROPERTY( "timeusedlast", (int)timeused_last ) else GET_PROPERTY( "magic", magic_ ) --- 2283,2286 ---- *************** *** 2333,2336 **** --- 2329,2367 ---- cUObject::sendTooltip( mSock ); + } + + /*! + Selects an item id from a list and creates it. + */ + P_ITEM cItem::createFromList( const QString &id ) + { + QString entry = DefManager->getRandomListEntry( id ); + return createFromScript( entry); + } + + /*! + Creates a new item and applies the specified definition section on it. + */ + P_ITEM cItem::createFromScript( const QString& id ) + { + P_ITEM nItem = 0; + + // Get an Item and assign a serial to it + const cElement* section = DefManager->getDefinition( WPDT_ITEM, id ); + + if( section ) + { + nItem = new cItem; + nItem->Init( true ); + nItem->base = ItemBases::instance()->getItemBase( id ); + nItem->applyDefinition( section ); + nItem->onCreate( id ); + } + else + { + Console::instance()->log( LOG_ERROR, QString( "Unable to create unscripted item: %1\n" ).arg( id ) ); + } + + return nItem; } Index: items.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.h,v retrieving revision 1.179 retrieving revision 1.180 diff -C2 -d -r1.179 -r1.180 *** items.h 23 Sep 2003 11:53:31 -0000 1.179 --- items.h 24 Nov 2003 02:36:10 -0000 1.180 *************** *** 37,48 **** --- 37,81 ---- #include "defines.h" #include "network/uotxpackets.h" + #include "singleton.h" // Library Includes #include <qvaluevector.h> + #include <qdict.h> // Forward Class declarations class ISerialization; class cUOSocket; + class cItemBases; + + /** + * Provides properties to types of items. There is one instance of this + * class per item definition. There should be no thread issues as this is + * read only during runtime, except for the DefManager. + */ + class cItemBase + { + friend class cItemBases; + private: + QString id_; + public: + inline const QString &id() const { return id_; } + }; + + /** + * Manages all cItemBase instances and provides an interface for + * cItem to retrieve pointers. + */ + class cItemBases + { + protected: + QDict< cItemBase > itembases; + + public: + cItemBases(); + void load(); + inline cItemBase *getItemBase( const QString &id ); + }; + typedef SingletonHolder< cItemBases > ItemBases; class cItem : public cUObject *************** *** 51,54 **** --- 84,88 ---- bool changed_; void flagChanged() { changed_ = true; } // easier to debug, compiler should make it inline; + cItemBase *base; public: *************** *** 159,168 **** //*******************************************END ADDED SETTERS********** - bool incognito; //AntiChrist - for items under incognito effect - // ^^ NUTS !! - move that to priv - - uint time_unused; // LB -> used for house decay and possibly for more in future, gets saved - uint timeused_last; // helper attribute for time_unused, doesnt get saved - virtual void Init( bool mkser = true ); void setSerial(SERIAL ser); --- 193,196 ---- *************** *** 230,235 **** //// virtual void flagUnchanged() { cItem::changed_ = false; cUObject::flagUnchanged(); } ! static P_ITEM createFromScript( const QString& Section ); ! static P_ITEM createFromId( unsigned short id ); void respawn( unsigned int currenttime ); void decay( unsigned int currenttime ); --- 258,265 ---- //// virtual void flagUnchanged() { cItem::changed_ = false; cUObject::flagUnchanged(); } ! ! static P_ITEM createFromScript( const QString §ion ); ! static P_ITEM createFromList( const QString &list ); ! static P_ITEM createFromId( unsigned short id ); void respawn( unsigned int currenttime ); void decay( unsigned int currenttime ); Index: player.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** player.cpp 19 Nov 2003 13:11:42 -0000 1.46 --- player.cpp 24 Nov 2003 02:36:10 -0000 1.47 *************** *** 1054,1060 **** while( total > 0 ) { ! P_ITEM pile = new cItem; ! pile->Init(); ! pile->setId( 0xEED ); pile->setAmount( QMIN( total, static_cast<Q_UINT32>(65535) ) ); pCont->addItem( pile ); --- 1054,1058 ---- while( total > 0 ) { ! P_ITEM pile = cItem::createFromScript( "eed" ); pile->setAmount( QMIN( total, static_cast<Q_UINT32>(65535) ) ); pCont->addItem( pile ); *************** *** 1116,1237 **** } ! void cPlayer::applyStartItemDefinition( const cElement *Tag ) { ! for( unsigned int i = 0; i < Tag->childCount(); ++i ) { ! const cElement *node = Tag->getChild( i ); ! if( node->name() == "item" ) { ! P_ITEM pItem = NULL; ! const cElement *DefSection = DefManager->getDefinition( WPDT_ITEM, node->getAttribute( "id" ) ); ! if( DefSection ) ! { ! // books wont work without this ! pItem = cItem::createFromScript( node->getAttribute("id") ); ! } ! else { ! pItem = new cItem; ! pItem->Init( true ); } ! if( pItem ) ! { ! pItem->applyDefinition( node ); ! pItem->setNewbie( true ); // make it newbie ! ! if( pItem->id() <= 1 ) ! pItem->remove(); ! else ! { ! // Put it into the backpack ! P_ITEM backpack = getBackpack(); ! if( backpack ) ! backpack->addItem( pItem ); ! else ! pItem->remove(); ! } ! } } ! else if( node->name() == "bankitem" ) { ! P_ITEM pItem = NULL; ! const cElement *DefSection = DefManager->getDefinition( WPDT_ITEM, node->getAttribute( "id" ) ); ! if( DefSection ) ! { ! // books wont work without this ! pItem = cItem::createFromScript( node->getAttribute("id") ); } else ! { ! pItem = new cItem; ! pItem->Init( true ); ! } ! ! if( pItem ) ! { ! pItem->applyDefinition( node ); ! pItem->setNewbie( true ); // make it newbie ! ! if( pItem->id() <= 1 ) ! pItem->remove(); ! else { ! // Put it into the bankbox ! P_ITEM bankbox = getBankBox(); ! if( bankbox ) ! bankbox->addItem( pItem ); ! else ! pItem->remove(); } } ! } ! else if( node->name() == "equipment" ) ! { ! P_ITEM pItem = NULL; ! const cElement *DefSection = DefManager->getDefinition( WPDT_ITEM, node->getAttribute( "id" ) ); ! if( DefSection ) { ! // books wont work without this ! pItem = cItem::createFromScript( node->getAttribute("id") ); } else { - pItem = new cItem; - pItem->Init( true ); - } - - if( pItem ) - { pItem->applyDefinition( node ); ! pItem->setNewbie( true ); // make it newbie ! UINT16 mLayer = pItem->layer(); ! pItem->setLayer( 0 ); ! if( !mLayer ) { ! tile_st tile = TileCache::instance()->getTile( pItem->id() ); ! mLayer = tile.layer; } ! if( pItem->id() <= 1 || !mLayer ) ! pItem->remove(); else { ! // Put it onto the char ! this->addItem( static_cast<cBaseChar::enLayer>( mLayer ), pItem ); } } - } - else if( node->name() == "gold" ) - { - giveGold( node->getValue().toUInt() ); - } - else if( node->name() == "inherit" ) - { - const cElement* inheritNode = DefManager->getDefinition( WPDT_STARTITEMS, node->getAttribute("id") ); - if( inheritNode ) - applyStartItemDefinition( inheritNode ); } } --- 1114,1203 ---- } ! void cPlayer::applyStartItemDefinition( const cElement *element ) { ! for( unsigned int i = 0; i < element->childCount(); ++i ) { ! const cElement *node = element->getChild( i ); ! // Apply another startitem definition ! if( node->name() == "inherit" ) { ! const cElement* inheritNode = DefManager->getDefinition( WPDT_STARTITEMS, node->getAttribute( "id" ) ); ! ! if( inheritNode ) { ! applyStartItemDefinition( inheritNode ); } + } ! // Add gold to the players backpack ! else if( node->name() == "gold" ) ! { ! giveGold( node->getValue().toUInt() ); } ! ! // Item related nodes ! else { ! P_ITEM pItem = 0; ! const QString &id = node->getAttribute( "id" ); ! ! if( id != QString::null ) ! { ! pItem = cItem::createFromScript( id ); } else ! { ! const QString &list = node->getAttribute( "list" ); ! ! if( list != QString::null ) { ! pItem = cItem::createFromList( list ); } } ! ! if( !pItem ) { ! Console::instance()->log( LOG_ERROR, QString( "Invalid item tag without id or list in startitem definition '%1'" ).arg( element->getAttribute( "id" ) ) ); } else { pItem->applyDefinition( node ); ! pItem->setNewbie( true ); ! if( node->name() == "item" ) { ! pItem->toBackpack( this ); } + else if( node->name() == "bankitem" ) + { + getBackpack()->addItem( pItem ); + } + else if( node->name() == "equipment" ) + { + unsigned char layer = pItem->layer(); + pItem->setLayer( 0 ); ! if( !layer ) ! { ! tile_st tile = TileCache::instance()->getTile( pItem->id() ); ! layer = tile.layer; ! } ! ! if( layer ) ! { ! addItem( static_cast<cBaseChar::enLayer>( layer ), pItem ); ! } ! else ! { ! Console::instance()->log( LOG_ERROR, QString( "Trying to equip invalid item (%1) in startitem definition '%2'" ).arg( pItem->id(), 0, 16 ).arg( element->getAttribute( "id" ) ) ); ! } ! } else { ! pItem->remove(); ! Console::instance()->log( LOG_ERROR, QString( "Unrecognized startitem tag '%1' in definition '%2'.").arg( node->name(), element->getAttribute( "id" ) ) ); } } } } Index: wolfpack.vcproj =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wolfpack.vcproj 23 Nov 2003 03:46:22 -0000 1.2 --- wolfpack.vcproj 24 Nov 2003 02:36:10 -0000 1.3 *************** *** 37,42 **** BasicRuntimeChecks="3" RuntimeLibrary="1" RuntimeTypeInfo="1" ! AllOptions="/c /I "sqlite" /Zi /nologo /W1 /Wp64 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /GR /Fo"Debug/" /Fd"Debug/vc70.pdb" /FR"Debug/" /Gd /TP /GR"/> </Tool> <Tool --- 37,44 ---- BasicRuntimeChecks="3" RuntimeLibrary="1" + ForceConformanceInForLoopScope="0" RuntimeTypeInfo="1" ! AllOptions="/c /I "sqlite" /Zi /nologo /W1 /Wp64 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /GR /Fo"Debug/" /Fd"Debug/vc70.pdb" /FR"Debug/" /Gd /TP /GR" ! MSOriginalAdditionalOptions="/GR"/> </Tool> <Tool *************** *** 51,57 **** ProgramDatabaseFile="$(OutDir)/wolfpack.pdb" SubSystem="2" ! TargetMachine="1"> <IntelOptions ! AllOptions="/NOLOGO /OUT:"../wolfpack.exe" /INCREMENTAL qt-mt321.lib ws2_32.lib /DEBUG /PDB:"Debug/wolfpack.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/> </Tool> <Tool --- 53,61 ---- ProgramDatabaseFile="$(OutDir)/wolfpack.pdb" SubSystem="2" ! TargetMachine="1" ! AdditionalOptions=""> <IntelOptions ! AllOptions="/NOLOGO /OUT:"../wolfpack.exe" /INCREMENTAL qt-mt321.lib ws2_32.lib /DEBUG /PDB:"Debug/wolfpack.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" ! MSOriginalAdditionalOptions=""/> </Tool> <Tool *************** *** 94,98 **** Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3" ! CallingConvention="1"> <IntelOptions Optimization="2" --- 98,103 ---- Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3" ! CallingConvention="1" ! AdditionalOptions=""> <IntelOptions Optimization="2" *************** *** 103,108 **** BufferSecurityCheck="1" EnableFunctionLevelLinking="1" RuntimeTypeInfo="1" ! AllOptions="/c /Zi /nologo /W3 /Wp64 /O2 /Ob1 /Oy /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /D "_MBCS" /GF /FD /EHsc /ML /GS /Gy /GR /Fo"Release/" /Fd"Release/vc70.pdb" /FR"Release/" /Gr /TP"/> </Tool> <Tool --- 108,115 ---- BufferSecurityCheck="1" EnableFunctionLevelLinking="1" + ForceConformanceInForLoopScope="1" RuntimeTypeInfo="1" ! AllOptions="/c /Zi /nologo /W3 /Wp64 /O2 /Ob1 /Oy /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /D "_MBCS" /GF /FD /EHsc /ML /GS /Gy /Zc:forScope /GR /Fo"Release/" /Fd"Release/vc70.pdb" /FR"Release/" /Gr /TP" ! MSOriginalAdditionalOptions=""/> </Tool> <Tool *************** *** 118,124 **** OptimizeReferences="2" EnableCOMDATFolding="2" ! TargetMachine="1"> <IntelOptions ! AllOptions="/NOLOGO /OUT:"Release/wolfpack.exe" /INCREMENTAL:NO qt-mt321.lib ws2_32.lib /DEBUG /PDB:"Release/wolfpack.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/> </Tool> <Tool --- 125,133 ---- OptimizeReferences="2" EnableCOMDATFolding="2" ! TargetMachine="1" ! AdditionalOptions=""> <IntelOptions ! AllOptions="/NOLOGO /OUT:"Release/wolfpack.exe" /INCREMENTAL:NO qt-mt321.lib ws2_32.lib /DEBUG /PDB:"Release/wolfpack.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" ! MSOriginalAdditionalOptions=""/> </Tool> <Tool *************** *** 272,289 **** RelativePath=".\makemenus.h"/> <File - RelativePath=".\maps.cpp"/> - <File - RelativePath=".\maps.h"/> - <File - RelativePath=".\mulstructs.h"/> - <File - RelativePath=".\multis.cpp"/> - <File - RelativePath=".\multis.h"/> - <File - RelativePath=".\multiscache.cpp"/> - <File - RelativePath=".\multiscache.h"/> - <File RelativePath=".\network.cpp"/> <File --- 281,284 ---- *************** *** 368,377 **** RelativePath=".\territories.h"/> <File - RelativePath=".\tilecache.cpp"/> - <File - RelativePath=".\tilecache.h"/> - <File - RelativePath=".\tileflags.h"/> - <File RelativePath=".\Timing.cpp"/> <File --- 363,366 ---- *************** *** 570,573 **** --- 559,586 ---- <File RelativePath=".\twofish\twofish2.c"/> + </Filter> + <Filter + Name="MulReading" + Filter=""> + <File + RelativePath=".\maps.cpp"/> + <File + RelativePath=".\maps.h"/> + <File + RelativePath=".\mulstructs.h"/> + <File + RelativePath=".\multis.cpp"/> + <File + RelativePath=".\multis.h"/> + <File + RelativePath=".\multiscache.cpp"/> + <File + RelativePath=".\multiscache.h"/> + <File + RelativePath=".\tilecache.cpp"/> + <File + RelativePath=".\tilecache.h"/> + <File + RelativePath=".\tileflags.h"/> </Filter> </Files> Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** world.cpp 23 Nov 2003 15:09:46 -0000 1.50 --- world.cpp 24 Nov 2003 02:36:10 -0000 1.51 *************** *** 198,202 **** hidamage smallint(6) NOT NULL default '0',\ lodamage smallint(6) NOT NULL default '0',\ - time_unused int(10) NOT NULL default '0',\ weight int(11) NOT NULL default '0',\ hp smallint(6) NOT NULL default '0',\ --- 198,201 ---- *************** *** 212,215 **** --- 211,215 ---- buyprice int(11) NOT NULL default '0',\ restock smallint(5) NOT NULL default '0',\ + baseid varchar(32) NOT NULL default '',\ PRIMARY KEY (serial)\ );" }, Index: wpdefmanager.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.cpp,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** wpdefmanager.cpp 23 Nov 2003 03:53:08 -0000 1.70 --- wpdefmanager.cpp 24 Nov 2003 02:36:10 -0000 1.71 *************** *** 47,50 **** --- 47,51 ---- #include "contextmenu.h" #include "skills.h" + #include "items.h" #include "world.h" #include "skills.h" *************** *** 302,306 **** MakeMenus::instance()->reload(); ContextMenus::instance()->reload(); ! Skills->reload(); // Update the Regions --- 303,307 ---- MakeMenus::instance()->reload(); ContextMenus::instance()->reload(); ! Skills->reload(); // Update the Regions *************** *** 374,377 **** --- 375,379 ---- Commands::instance()->loadACLs(); BaseDefManager::instance()->load(); + ItemBases::instance()->load(); } Index: wpdefmanager.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wpdefmanager.h 20 Sep 2003 12:01:44 -0000 1.32 --- wpdefmanager.h 24 Nov 2003 02:36:10 -0000 1.33 *************** *** 128,131 **** --- 128,134 ---- class WPDefManager { + private: + cDefManagerPrivate *impl; + public: WPDefManager(); *************** *** 137,143 **** bool ImportSections( const QString& FileName ); - - cDefManagerPrivate *impl; - const cElement* getDefinition( eDefCategory Type, const QString& id ) const; const QValueVector< cElement* > &getDefinitions( eDefCategory Type ) const; --- 140,143 ---- |
|
From: <dar...@us...> - 2003-11-24 02:36:13
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1:/tmp/cvs-serv16366/network Modified Files: uosocket.cpp Log Message: Removed some outdated properties and updated the vs.net project file. Started implementing the Base Definition property. Accessible via item.baseid in python you can now set and get the name of the definition this item was created from. Index: uosocket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v retrieving revision 1.297 retrieving revision 1.298 diff -C2 -d -r1.297 -r1.298 *** uosocket.cpp 23 Sep 2003 12:40:19 -0000 1.297 --- uosocket.cpp 24 Nov 2003 02:36:10 -0000 1.298 *************** *** 760,797 **** pChar->setSkillValue( packet->skillId3(), packet->skillValue3()*10 ); ! // Create the char equipment (JUST the basics !!) ! P_ITEM pItem = new cItem; ! pItem->Init(); ! // Shirt ! pItem->setId( 0x1517 ); pItem->setColor( packet->shirtColor() ); - pItem->setMaxhp( RandomNum( 25, 50 ) ); - pItem->setHp( pItem->maxhp() ); - pChar->addItem( cBaseChar::Shirt, pItem ); - pItem->setDye(1); pItem->setNewbie( true ); ! ! pItem = new cItem; ! pItem->Init(); // Skirt or Pants ! pItem->setId( ( packet->gender() != 0 ) ? 0x1516 : 0x152E ); pItem->setColor( packet->pantsColor() ); - pItem->setMaxhp( RandomNum( 25, 50 ) ); - pItem->setHp( pItem->maxhp() ); - pChar->addItem( cBaseChar::Pants, pItem ); - pItem->setDye(1); pItem->setNewbie( true ); // Hair & Beard if( packet->hairStyle() ) { ! pItem = new cItem; ! pItem->Init(); ! ! pItem->setDye(1); pItem->setNewbie( true ); - pItem->setId( packet->hairStyle() ); pItem->setColor( packet->hairColor() ); pChar->addItem( cBaseChar::Hair, pItem ); --- 760,783 ---- pChar->setSkillValue( packet->skillId3(), packet->skillValue3()*10 ); ! // Create the char equipment (shirt, paint, hair and beard only) ! P_ITEM pItem; ! // Shirt ! pItem = cItem::createFromScript( "1517" ); pItem->setColor( packet->shirtColor() ); pItem->setNewbie( true ); ! pChar->addItem( cBaseChar::Shirt, pItem ); // Skirt or Pants ! pItem = cItem::createFromScript( ( packet->gender() != 0 ) ? "1516" : "152e" ); pItem->setColor( packet->pantsColor() ); pItem->setNewbie( true ); + pChar->addItem( cBaseChar::Pants, pItem ); // Hair & Beard if( packet->hairStyle() ) { ! pItem = cItem::createFromScript( QString( "%1" ).arg( packet->hairStyle(), 0, 16 ) ); pItem->setNewbie( true ); pItem->setColor( packet->hairColor() ); pChar->addItem( cBaseChar::Hair, pItem ); *************** *** 800,807 **** if( packet->beardStyle() ) { ! pItem = new cItem; ! pItem->Init(); ! ! pItem->setId( packet->beardStyle() ); pItem->setNewbie( true ); pItem->setColor( packet->beardColor() ); --- 786,790 ---- if( packet->beardStyle() ) { ! pItem = cItem::createFromScript( QString( "%1" ).arg( packet->beardStyle(), 0, 16 ) ); pItem->setNewbie( true ); pItem->setColor( packet->beardColor() ); *************** *** 809,815 **** } ! // Backpack + Bankbox autocreate ! pItem = pChar->getBankBox(); ! pItem = pChar->getBackpack(); pChar->setAccount( _account ); --- 792,798 ---- } ! // Automatically create Backpack + Bankbox ! pChar->getBankBox(); ! pChar->getBackpack(); pChar->setAccount( _account ); |
|
From: <co...@us...> - 2003-11-23 22:08:34
|
Update of /cvsroot/wpdev/xmlscripts
In directory sc8-pr-cvs1:/tmp/cvs-serv31650
Modified Files:
wolfpack.sql
Log Message:
baseid added and fieldnames sorting
Index: wolfpack.sql
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/wolfpack.sql,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** wolfpack.sql 23 Nov 2003 22:01:49 -0000 1.30
--- wolfpack.sql 23 Nov 2003 22:08:30 -0000 1.31
***************
*** 1,4 ****
CREATE TABLE `boats` (
- `serial` int(11) NOT NULL default '0',
`autosail` tinyint(1) NOT NULL default '0',
`boatdir` tinyint(1) NOT NULL default '0',
--- 1,3 ----
***************
*** 11,37 ****
`multi3` smallint(6) default '0',
`multi4` smallint(6) default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `boats_itemids` (
- `serial` int(11) NOT NULL default '0',
`a` tinyint(1) NOT NULL default '0',
`b` tinyint(1) NOT NULL default '0',
`id` smallint(6) default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `boats_itemoffsets` (
- `serial` int(11) NOT NULL default '0',
`a` tinyint(1) NOT NULL default '0',
`b` tinyint(1) NOT NULL default '0',
`c` tinyint(1) NOT NULL default '0',
`offset` smallint(6) default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `bookpages` (
- `serial` int(11) NOT NULL default '0',
`page` tinyint(3) NOT NULL default '0',
`text` varchar(255) NOT NULL default '',
PRIMARY KEY (`serial`,`page`)
--- 10,37 ----
`multi3` smallint(6) default '0',
`multi4` smallint(6) default '0',
+ `serial` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `boats_itemids` (
`a` tinyint(1) NOT NULL default '0',
`b` tinyint(1) NOT NULL default '0',
`id` smallint(6) default '0',
+ `serial` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `boats_itemoffsets` (
`a` tinyint(1) NOT NULL default '0',
`b` tinyint(1) NOT NULL default '0',
`c` tinyint(1) NOT NULL default '0',
`offset` smallint(6) default '0',
+ `serial` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `bookpages` (
`page` tinyint(3) NOT NULL default '0',
+ `serial` int(11) NOT NULL default '0',
`text` varchar(255) NOT NULL default '',
PRIMARY KEY (`serial`,`page`)
***************
*** 39,118 ****
CREATE TABLE `books` (
- `serial` int(11) NOT NULL default '0',
- `title` varchar(255) NOT NULL default '',
`author` varchar(255) NOT NULL default '',
! `readonly` tinyint(1) NOT NULL default '0',
`predefined` tinyint(1) NOT NULL default '0',
`section` varchar(255) NOT NULL default '',
! `pages` smallint(5) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `characters` (
! `serial` int(11) NOT NULL default '0',
! `name` varchar(255) default NULL,
! `title` varchar(255) default NULL,
! `creationdate` varchar(255) default NULL,
`body` smallint(5) NOT NULL default '0',
! `orgbody` smallint(5) NOT NULL default '0',
! `skin` smallint(5) NOT NULL default '0',
! `orgskin` smallint(5) NOT NULL default '0',
! `saycolor` smallint(5) NOT NULL default '0',
! `emotecolor` smallint(5) NOT NULL default '0',
! `strength` smallint(6) NOT NULL default '0',
! `strengthmod` smallint(6) NOT NULL default '0',
! `dexterity` smallint(6) NOT NULL default '0',
`dexteritymod` smallint(6) NOT NULL default '0',
! `intelligence` smallint(6) NOT NULL default '0',
! `intelligencemod` smallint(6) NOT NULL default '0',
! `maxhitpoints` smallint(6) NOT NULL default '0',
`hitpoints` smallint(6) NOT NULL default '0',
! `maxstamina` smallint(6) NOT NULL default '0',
! `stamina` smallint(6) NOT NULL default '0',
! `maxmana` smallint(6) default NULL,
! `mana` smallint(6) default NULL,
`karma` int(11) NOT NULL default '0',
- `fame` int(11) NOT NULL default '0',
`kills` int(10) NOT NULL default '0',
! `deaths` int(10) NOT NULL default '0',
! `def` int(10) NOT NULL default '0',
! `hunger` int(11) NOT NULL default '0',
! `poison` int(11) NOT NULL default '0',
! `poisoned` int(10) NOT NULL default '0',
`murderertime` int(11) NOT NULL default '0',
! `criminaltime` int(11) NOT NULL default '0',
`nutriment` int(10) NOT NULL default '0',
! `gender` tinyint(1) NOT NULL default '0',
`propertyflags` int(11) NOT NULL default '0',
! `attacker` int(11) NOT NULL default '-1',
! `combattarget` int(11) NOT NULL default '-1',
! `murderer` int(11) NOT NULL default '-1',
! `guarding` int(11) NOT NULL default '-1',
PRIMARY KEY (`serial`)
);
CREATE TABLE `corpses` (
! `serial` int(11) NOT NULL default '0',
`bodyid` smallint(6) NOT NULL default '0',
- `hairstyle` smallint(6) NOT NULL default '0',
`haircolor` smallint(6) NOT NULL default '0',
! `beardstyle` smallint(6) NOT NULL default '0',
! `beardcolor` smallint(6) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `corpses_equipment` (
- `serial` int(11) NOT NULL default '0',
- `layer` tinyint(3) NOT NULL default '0',
`item` int(11) NOT NULL default '-1',
PRIMARY KEY (`serial`,`layer`)
);
CREATE TABLE `houses` (
- `serial` int(11) NOT NULL default '0',
- `nokey` tinyint(1) NOT NULL default '0',
`charpos_x` smallint(6) NOT NULL default '0',
`charpos_y` smallint(6) NOT NULL default '0',
`charpos_z` smallint(6) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
--- 39,118 ----
CREATE TABLE `books` (
`author` varchar(255) NOT NULL default '',
! `pages` smallint(5) NOT NULL default '0',
`predefined` tinyint(1) NOT NULL default '0',
+ `readonly` tinyint(1) NOT NULL default '0',
`section` varchar(255) NOT NULL default '',
! `serial` int(11) NOT NULL default '0',
! `title` varchar(255) NOT NULL default '',
PRIMARY KEY (`serial`)
);
CREATE TABLE `characters` (
! `attacker` int(11) NOT NULL default '-1',
`body` smallint(5) NOT NULL default '0',
! `combattarget` int(11) NOT NULL default '-1',
! `creationdate` varchar(255) default NULL,
! `criminaltime` int(11) NOT NULL default '0',
! `deaths` int(10) NOT NULL default '0',
! `def` int(10) NOT NULL default '0',
`dexteritymod` smallint(6) NOT NULL default '0',
! `dexterity` smallint(6) NOT NULL default '0',
! `emotecolor` smallint(5) NOT NULL default '0',
! `fame` int(11) NOT NULL default '0',
! `gender` tinyint(1) NOT NULL default '0',
! `guarding` int(11) NOT NULL default '-1',
`hitpoints` smallint(6) NOT NULL default '0',
! `hunger` int(11) NOT NULL default '0',
! `intelligencemod` smallint(6) NOT NULL default '0',
! `intelligence` smallint(6) NOT NULL default '0',
`karma` int(11) NOT NULL default '0',
`kills` int(10) NOT NULL default '0',
! `mana` smallint(6) default NULL,
! `maxhitpoints` smallint(6) NOT NULL default '0',
! `maxmana` smallint(6) default NULL,
! `maxstamina` smallint(6) NOT NULL default '0',
`murderertime` int(11) NOT NULL default '0',
! `murderer` int(11) NOT NULL default '-1',
! `name` varchar(255) default NULL,
`nutriment` int(10) NOT NULL default '0',
! `orgbody` smallint(5) NOT NULL default '0',
! `orgskin` smallint(5) NOT NULL default '0',
! `poisoned` int(10) NOT NULL default '0',
! `poison` int(11) NOT NULL default '0',
`propertyflags` int(11) NOT NULL default '0',
! `saycolor` smallint(5) NOT NULL default '0',
! `serial` int(11) NOT NULL default '0',
! `skin` smallint(5) NOT NULL default '0',
! `stamina` smallint(6) NOT NULL default '0',
! `strengthmod` smallint(6) NOT NULL default '0',
! `strength` smallint(6) NOT NULL default '0',
! `title` varchar(255) default NULL,
PRIMARY KEY (`serial`)
);
CREATE TABLE `corpses` (
! `beardcolor` smallint(6) NOT NULL default '0',
! `beardstyle` smallint(6) NOT NULL default '0',
`bodyid` smallint(6) NOT NULL default '0',
`haircolor` smallint(6) NOT NULL default '0',
! `hairstyle` smallint(6) NOT NULL default '0',
! `serial` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `corpses_equipment` (
`item` int(11) NOT NULL default '-1',
+ `layer` tinyint(3) NOT NULL default '0',
+ `serial` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`,`layer`)
);
CREATE TABLE `houses` (
`charpos_x` smallint(6) NOT NULL default '0',
`charpos_y` smallint(6) NOT NULL default '0',
`charpos_z` smallint(6) NOT NULL default '0',
+ `nokey` tinyint(1) NOT NULL default '0',
+ `serial` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
***************
*** 149,183 ****
CREATE TABLE `multis` (
- `serial` int(11) NOT NULL default '0',
`coowner` int(11) NOT NULL default '-1',
`deedsection` varchar(255) NOT NULL default '',
PRIMARY KEY (`serial`)
);
CREATE TABLE `multis_bans` (
- `serial` int(11) NOT NULL default '0',
`ban` int(11) NOT NULL default '-1',
PRIMARY KEY (`serial`,`ban`)
);
CREATE TABLE `multis_friends` (
- `serial` int(11) NOT NULL default '0',
`friend` int(11) NOT NULL default '-1',
PRIMARY KEY (`serial`,`friend`)
);
CREATE TABLE `npcs` (
- `serial` int(11) NOT NULL default '0',
- `mindamage` smallint(6) NOT NULL default '0',
- `maxdamage` smallint(6) NOT NULL default '0',
- `tamingminskill` smallint(6) NOT NULL default '0',
- `summontime` int(11) NOT NULL default '0',
`additionalflags` int(11) NOT NULL default '0',
! `owner` int(11) NOT NULL default '-1',
`carve` varchar(255) default NULL,
`spawnregion` varchar(255) default NULL,
`stablemaster` int(11) NOT NULL default '-1',
! `lootlist` varchar(255) default NULL,
! `ai` varchar(255) default NULL,
`wandertype` smallint(3) NOT NULL default '0',
`wanderx1` smallint(6) NOT NULL default '0',
--- 149,187 ----
CREATE TABLE `multis` (
`coowner` int(11) NOT NULL default '-1',
`deedsection` varchar(255) NOT NULL default '',
+ `serial` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `multis_bans` (
`ban` int(11) NOT NULL default '-1',
+ `serial` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`,`ban`)
);
CREATE TABLE `multis_friends` (
`friend` int(11) NOT NULL default '-1',
+ `serial` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`,`friend`)
);
CREATE TABLE `npcs` (
`additionalflags` int(11) NOT NULL default '0',
! `ai` varchar(255) default NULL,
`carve` varchar(255) default NULL,
+ `fleeat` smallint(3) NOT NULL default '10',
+ `lootlist` varchar(255) default NULL,
+ `maxdamage` smallint(6) NOT NULL default '0',
+ `mindamage` smallint(6) NOT NULL default '0',
+ `owner` int(11) NOT NULL default '-1',
+ `serial` int(11) NOT NULL default '0',
`spawnregion` varchar(255) default NULL,
+ `spellshigh` int(11) NOT NULL default '0',
+ `spellslow` int(11) NOT NULL default '0',
`stablemaster` int(11) NOT NULL default '-1',
! `summontime` int(11) NOT NULL default '0',
! `tamingminskill` smallint(6) NOT NULL default '0',
! `wanderradius` smallint(6) NOT NULL default '0',
`wandertype` smallint(3) NOT NULL default '0',
`wanderx1` smallint(6) NOT NULL default '0',
***************
*** 185,217 ****
`wandery1` smallint(6) NOT NULL default '0',
`wandery2` smallint(6) NOT NULL default '0',
- `wanderradius` smallint(6) NOT NULL default '0',
- `fleeat` smallint(3) NOT NULL default '10',
- `spellslow` int(11) NOT NULL default '0',
- `spellshigh` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `players` (
- `serial` int(11) NOT NULL default '0',
`account` varchar(255) default NULL,
`additionalflags` int(10) NOT NULL default '0',
- `visualrange` tinyint(3) NOT NULL default '0',
- `profile` longtext,
`fixedlight` tinyint(3) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `skills` (
`serial` int(11) NOT NULL default '0',
`skill` tinyint(3) NOT NULL default '0',
`value` smallint(6) NOT NULL default '0',
- `locktype` tinyint(4) default '0',
- `cap` smallint(6) default '0',
PRIMARY KEY (`serial`,`skill`)
);
CREATE TABLE `tags` (
- `serial` int(11) NOT NULL default '0',
`name` varchar(64) NOT NULL default '',
`type` varchar(6) NOT NULL default '',
`value` longtext NOT NULL,
--- 189,217 ----
`wandery1` smallint(6) NOT NULL default '0',
`wandery2` smallint(6) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `players` (
`account` varchar(255) default NULL,
`additionalflags` int(10) NOT NULL default '0',
`fixedlight` tinyint(3) NOT NULL default '0',
+ `profile` longtext,
+ `serial` int(11) NOT NULL default '0',
+ `visualrange` tinyint(3) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
CREATE TABLE `skills` (
+ `cap` smallint(6) default '0',
+ `locktype` tinyint(4) default '0',
`serial` int(11) NOT NULL default '0',
`skill` tinyint(3) NOT NULL default '0',
`value` smallint(6) NOT NULL default '0',
PRIMARY KEY (`serial`,`skill`)
);
CREATE TABLE `tags` (
`name` varchar(64) NOT NULL default '',
+ `serial` int(11) NOT NULL default '0',
`type` varchar(6) NOT NULL default '',
`value` longtext NOT NULL,
***************
*** 220,234 ****
CREATE TABLE `uobject` (
! `name` varchar(255) default NULL,
! `serial` int(11) NOT NULL default '0',
! `multis` int(11) NOT NULL default '-1',
`direction` char(1) NOT NULL default '0',
`pos_x` smallint(6) NOT NULL default '0',
`pos_y` smallint(6) NOT NULL default '0',
`pos_z` smallint(6) NOT NULL default '0',
! `pos_map` tinyint(4) NOT NULL default '0',
! `events` varchar(255) default NULL,
! `bindmenu` varchar(255) default NULL,
! `havetags` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
--- 220,234 ----
CREATE TABLE `uobject` (
! `bindmenu` varchar(255) default NULL,
`direction` char(1) NOT NULL default '0',
+ `events` varchar(255) default NULL,
+ `havetags` tinyint(1) NOT NULL default '0',
+ `multis` int(11) NOT NULL default '-1',
+ `name` varchar(255) default NULL,
+ `pos_map` tinyint(4) NOT NULL default '0',
`pos_x` smallint(6) NOT NULL default '0',
`pos_y` smallint(6) NOT NULL default '0',
`pos_z` smallint(6) NOT NULL default '0',
! `serial` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
***************
*** 241,250 ****
CREATE TABLE `effects` (
`id` int(11) NOT NULL default '0',
`objectid` varchar(64) NOT NULL default '',
- `expiretime` int(11) NOT NULL default '0',
- `dispellable` tinyint(4) NOT NULL default '0',
`source` int(11) NOT NULL default '-1',
- `destination` int(11) NOT NULL default '-1',
PRIMARY KEY (`id`)
);
--- 241,250 ----
CREATE TABLE `effects` (
+ `destination` int(11) NOT NULL default '-1',
+ `dispellable` tinyint(4) NOT NULL default '0',
+ `expiretime` int(11) NOT NULL default '0',
`id` int(11) NOT NULL default '0',
`objectid` varchar(64) NOT NULL default '',
`source` int(11) NOT NULL default '-1',
PRIMARY KEY (`id`)
);
|
|
From: <co...@us...> - 2003-11-23 22:01:53
|
Update of /cvsroot/wpdev/xmlscripts
In directory sc8-pr-cvs1:/tmp/cvs-serv29956
Modified Files:
wolfpack.sql
Log Message:
baseid added
Index: wolfpack.sql
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/wolfpack.sql,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** wolfpack.sql 23 Nov 2003 15:10:59 -0000 1.29
--- wolfpack.sql 23 Nov 2003 22:01:49 -0000 1.30
***************
*** 119,148 ****
CREATE TABLE `items` (
! `serial` int(11) NOT NULL default '0',
! `id` smallint(5) NOT NULL default '0',
`color` smallint(5) NOT NULL default '0',
`cont` int(11) NOT NULL default '-1',
- `layer` tinyint(3) NOT NULL default '0',
- `type` smallint(5) NOT NULL default '0',
- `type2` smallint(5) NOT NULL default '0',
- `amount` smallint(5) NOT NULL default '0',
`decaytime` int(10) NOT NULL default '0',
`def` int(10) NOT NULL default '0',
`hidamage` smallint(6) NOT NULL default '0',
- `lodamage` smallint(6) NOT NULL default '0',
- `time_unused` int(10) NOT NULL default '0',
- `weight` int(11) NOT NULL default '0',
`hp` smallint(6) NOT NULL default '0',
! `maxhp` smallint(6) NOT NULL default '0',
! `speed` int(11) NOT NULL default '0',
! `poisoned` int(10) NOT NULL default '0',
`magic` tinyint(3) NOT NULL default '0',
`owner` int(11) NOT NULL default '-1',
! `visible` tinyint(3) NOT NULL default '0',
! `spawnregion` varchar(255) default NULL,
`priv` tinyint(3) NOT NULL default '0',
- `sellprice` int(11) NOT NULL default '0',
- `buyprice` int(11) NOT NULL default '0',
`restock` smallint(5) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
--- 119,148 ----
CREATE TABLE `items` (
! `amount` smallint(5) NOT NULL default '0',
! `baseid` varchar(32) NOT NULL default '',
! `buyprice` int(11) NOT NULL default '0',
`color` smallint(5) NOT NULL default '0',
`cont` int(11) NOT NULL default '-1',
`decaytime` int(10) NOT NULL default '0',
`def` int(10) NOT NULL default '0',
`hidamage` smallint(6) NOT NULL default '0',
`hp` smallint(6) NOT NULL default '0',
! `id` smallint(5) NOT NULL default '0',
! `layer` tinyint(3) NOT NULL default '0',
! `lodamage` smallint(6) NOT NULL default '0',
`magic` tinyint(3) NOT NULL default '0',
+ `maxhp` smallint(6) NOT NULL default '0',
`owner` int(11) NOT NULL default '-1',
! `poisoned` int(10) NOT NULL default '0',
`priv` tinyint(3) NOT NULL default '0',
`restock` smallint(5) NOT NULL default '0',
+ `sellprice` int(11) NOT NULL default '0',
+ `serial` int(11) NOT NULL default '0',
+ `spawnregion` varchar(255) default NULL,
+ `speed` int(11) NOT NULL default '0',
+ `type2` smallint(5) NOT NULL default '0',
+ `type` smallint(5) NOT NULL default '0',
+ `visible` tinyint(3) NOT NULL default '0',
+ `weight` int(11) NOT NULL default '0',
PRIMARY KEY (`serial`)
);
|
|
From: <co...@us...> - 2003-11-23 15:11:02
|
Update of /cvsroot/wpdev/xmlscripts In directory sc8-pr-cvs1:/tmp/cvs-serv20246 Modified Files: wolfpack.sql Log Message: sql fix effects_properties.key -> keyname Index: wolfpack.sql =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/wolfpack.sql,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** wolfpack.sql 26 Sep 2003 03:22:33 -0000 1.28 --- wolfpack.sql 23 Nov 2003 15:10:59 -0000 1.29 *************** *** 252,259 **** CREATE TABLE `effects_properties` ( `id` int(11) NOT NULL default '0', ! `key` varchar(64) NOT NULL default '', `type` varchar(64) NOT NULL default '', `value` text NOT NULL, ! PRIMARY KEY (`id`,`key`) ); --- 252,259 ---- CREATE TABLE `effects_properties` ( `id` int(11) NOT NULL default '0', ! `keyname` varchar(64) NOT NULL default '', `type` varchar(64) NOT NULL default '', `value` text NOT NULL, ! PRIMARY KEY (`id`,`keyname`) ); |
|
From: <co...@us...> - 2003-11-23 15:09:50
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1:/tmp/cvs-serv20028/python Modified Files: tempeffect.h Log Message: sql fix effects_properties.key -> keyname Index: tempeffect.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/tempeffect.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tempeffect.h 25 Sep 2003 03:05:59 -0000 1.10 --- tempeffect.h 23 Nov 2003 15:09:45 -0000 1.11 *************** *** 205,209 **** PyTuple_SetItem( args, i, Py_None ); ! cDBResult res = persistentBroker->query( QString( "SELECT key,type,value FROM effects_properties WHERE id = %1 AND key LIKE 'pyarg_%'" ).arg( id ) ); while( res.fetchrow() ) --- 205,209 ---- PyTuple_SetItem( args, i, Py_None ); ! cDBResult res = persistentBroker->query( QString( "SELECT keyname,type,value FROM effects_properties WHERE id = %1 AND keyname LIKE 'pyarg_%'" ).arg( id ) ); while( res.fetchrow() ) |
|
From: <co...@us...> - 2003-11-23 15:09:50
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv20028
Modified Files:
tmpeff.cpp world.cpp
Log Message:
sql fix effects_properties.key -> keyname
Index: tmpeff.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/tmpeff.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** tmpeff.cpp 10 Oct 2003 21:13:46 -0000 1.65
--- tmpeff.cpp 23 Nov 2003 15:09:45 -0000 1.66
***************
*** 117,121 ****
bool cTempEffect::loadFloat( unsigned int id, QString key, double &value )
{
! cDBResult result = persistentBroker->query( QString( "SELECT value FROM effects_properties WHERE id = '%1' AND key = '%2' AND type = 'float'" ).arg( id ).arg( persistentBroker->quoteString( key ) ) );
if( !result.fetchrow() )
--- 117,121 ----
bool cTempEffect::loadFloat( unsigned int id, QString key, double &value )
{
! cDBResult result = persistentBroker->query( QString( "SELECT value FROM effects_properties WHERE id = '%1' AND keyname = '%2' AND type = 'float'" ).arg( id ).arg( persistentBroker->quoteString( key ) ) );
if( !result.fetchrow() )
***************
*** 137,141 ****
bool cTempEffect::loadInt( unsigned int id, QString key, int &value )
{
! cDBResult result = persistentBroker->query( QString( "SELECT value FROM effects_properties WHERE id = '%1' AND key = '%2' AND type = 'int'" ).arg( id ).arg( persistentBroker->quoteString( key ) ) );
if( !result.fetchrow() )
--- 137,141 ----
bool cTempEffect::loadInt( unsigned int id, QString key, int &value )
{
! cDBResult result = persistentBroker->query( QString( "SELECT value FROM effects_properties WHERE id = '%1' AND keyname = '%2' AND type = 'int'" ).arg( id ).arg( persistentBroker->quoteString( key ) ) );
if( !result.fetchrow() )
***************
*** 157,161 ****
bool cTempEffect::loadString( unsigned int id, QString key, QString &value )
{
! cDBResult result = persistentBroker->query( QString( "SELECT value FROM effects_properties WHERE id = '%1' AND key = '%2' AND type = 'string'" ).arg( id ).arg( persistentBroker->quoteString( key ) ) );
if( !result.fetchrow() )
--- 157,161 ----
bool cTempEffect::loadString( unsigned int id, QString key, QString &value )
{
! cDBResult result = persistentBroker->query( QString( "SELECT value FROM effects_properties WHERE id = '%1' AND keyname = '%2' AND type = 'string'" ).arg( id ).arg( persistentBroker->quoteString( key ) ) );
if( !result.fetchrow() )
***************
*** 277,280 ****
--- 277,282 ----
cDBResult result = persistentBroker->query( "SELECT id,objectid,expiretime,dispellable,source,destination FROM effects ORDER BY expiretime ASC;" );
+ persistentBroker->driver()->setActiveConnection( CONN_SECOND );
+
while( result.fetchrow() )
{
***************
*** 298,305 ****
const char **res = (const char**)result.data(); // Skip id, objectid
effect->load( id, res );
!
insert( effect );
}
}
--- 300,310 ----
const char **res = (const char**)result.data(); // Skip id, objectid
+
effect->load( id, res );
!
insert( effect );
}
+ result.free();
+ persistentBroker->driver()->setActiveConnection();
}
Index: world.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** world.cpp 29 Oct 2003 12:31:17 -0000 1.49
--- world.cpp 23 Nov 2003 15:09:46 -0000 1.50
***************
*** 319,326 ****
{ "effects_properties", "CREATE TABLE effects_properties (\
id int NOT NULL,\
! key varchar(64) NOT NULL,\
type varchar(64) NOT NULL,\
value text NOT NULL,\
! PRIMARY KEY (id,key)\
);" },
--- 319,326 ----
{ "effects_properties", "CREATE TABLE effects_properties (\
id int NOT NULL,\
! keyname varchar(64) NOT NULL,\
type varchar(64) NOT NULL,\
value text NOT NULL,\
! PRIMARY KEY (id,keyname)\
);" },
|
|
From: <dar...@us...> - 2003-11-23 03:53:11
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv24268
Modified Files:
wpdefmanager.cpp
Log Message:
Added an option to wolfpack.xml to specify which definition index file should be loaded (Default still is 'definitions.xml'). Also added an option to specify the python search path without the use of python.xml with the last commit.
Index: wpdefmanager.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.cpp,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -d -r1.69 -r1.70
*** wpdefmanager.cpp 23 Nov 2003 03:46:22 -0000 1.69
--- wpdefmanager.cpp 23 Nov 2003 03:53:08 -0000 1.70
***************
*** 49,52 ****
--- 49,53 ----
#include "world.h"
#include "skills.h"
+ #include "srvparams.h"
#include "basechar.h"
#include "network.h"
***************
*** 317,325 ****
void WPDefManager::load( void )
{
Console::instance()->PrepareProgress( "Loading Definitions" );
! ImportSections( "definitions.xml" );
- unsigned int i = 0;
while( i < impl->imports.size() )
{
--- 318,327 ----
void WPDefManager::load( void )
{
+ unsigned int i = 0;
+
Console::instance()->PrepareProgress( "Loading Definitions" );
! impl->imports = QStringList::split( ";", SrvParams->getString( "General", "Definitions", "definitions.xml", true ) );
while( i < impl->imports.size() )
{
|
|
From: <dar...@us...> - 2003-11-23 03:46:26
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1:/tmp/cvs-serv23286 Modified Files: ai.cpp gumps.cpp gumps.h makemenus.h multis.h resources.h targetrequests.h territories.cpp territories.h wolfpack.vcproj wpdefmanager.cpp wptargetrequests.h Log Message: Removed QObject inheritance from all objects. This could break tr(). BUT tr() was broken anyway as we were translating too much instead of using the cliloc files. Updated and checked the project file for VS.NET as well. Works fine for me now. Index: ai.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ai.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ai.cpp 23 Sep 2003 15:36:30 -0000 1.21 --- ai.cpp 23 Nov 2003 03:46:22 -0000 1.22 *************** *** 600,604 **** int v1 = newPos.x - fleePos.x; int v2 = newPos.y - fleePos.y; ! float v_norm = sqrt( v1 * v1 + v2 * v2 ); newPos.x = newPos.x + (INT16)floor( rnddist * v1 / v_norm ); newPos.y = newPos.y + (INT16)floor( rnddist * v2 / v_norm ); --- 600,604 ---- int v1 = newPos.x - fleePos.x; int v2 = newPos.y - fleePos.y; ! float v_norm = sqrt( (double)( v1 * v1 + v2 * v2 ) ); newPos.x = newPos.x + (INT16)floor( rnddist * v1 / v_norm ); newPos.y = newPos.y + (INT16)floor( rnddist * v2 / v_norm ); Index: gumps.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/gumps.cpp,v retrieving revision 1.146 retrieving revision 1.147 diff -C2 -d -r1.146 -r1.147 *** gumps.cpp 10 Oct 2003 21:13:45 -0000 1.146 --- gumps.cpp 23 Nov 2003 03:46:22 -0000 1.147 *************** *** 44,47 **** --- 44,48 ---- #include "player.h" #include "world.h" + #include "inlines.h" // System Includes Index: gumps.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/gumps.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** gumps.h 10 Jun 2003 00:55:24 -0000 1.32 --- gumps.h 23 Nov 2003 03:46:22 -0000 1.33 *************** *** 48,54 **** *****************************************************************************/ ! class cGump : public QObject { - Q_OBJECT protected: SERIAL serial_, type_; --- 48,53 ---- *****************************************************************************/ ! class cGump { protected: SERIAL serial_, type_; *************** *** 205,209 **** class cSpawnRegionInfoGump : public cGump { - Q_OBJECT protected: cSpawnRegion* region_; --- 204,207 ---- *************** *** 217,221 **** class cTagsInfoGump : public cGump { - Q_OBJECT protected: cUObject* object_; --- 215,218 ---- *************** *** 229,233 **** class cWhoMenuGump : public cGump { - Q_OBJECT private: UINT32 page_; --- 226,229 ---- *************** *** 242,246 **** class cSocketInfoGump : public cGump { - Q_OBJECT private: cUOSocket* socket_; --- 238,241 ---- *************** *** 254,258 **** class cPagesGump : public cGump { - Q_OBJECT private: UINT32 page_; --- 249,252 ---- *************** *** 269,273 **** class cPageInfoGump : public cGump { - Q_OBJECT private: cPage* page_; --- 263,266 ---- *************** *** 281,285 **** class cHelpGump : public cGump { - Q_OBJECT private: SERIAL char_; --- 274,277 ---- Index: makemenus.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/makemenus.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** makemenus.h 11 Sep 2003 16:19:50 -0000 1.30 --- makemenus.h 23 Nov 2003 03:46:22 -0000 1.31 *************** *** 119,125 **** }; ! class cMakeSection : public QObject, public cDefinable { - Q_OBJECT public: cMakeSection( const QString &name, cMakeAction* baseaction = NULL ); --- 119,124 ---- }; ! class cMakeSection : public cDefinable { public: cMakeSection( const QString &name, cMakeAction* baseaction = NULL ); *************** *** 147,151 **** class cMakeCustomSection : public cMakeSection { - Q_OBJECT public: cMakeCustomSection( const QString &name, cMakeAction* baseaction = NULL ); --- 146,149 ---- *************** *** 181,185 **** class cMakeNpcSection : public cMakeSection { - Q_OBJECT public: cMakeNpcSection( const QString &name, cMakeAction* baseaction = NULL ); --- 179,182 ---- *************** *** 213,217 **** class cMakeResourceSection : public cMakeCustomSection { - Q_OBJECT public: cMakeResourceSection( const QString &name, cMakeAction* baseaction = NULL ); --- 210,213 ---- *************** *** 229,233 **** class cMakeAmountSection : public cMakeCustomSection { - Q_OBJECT public: cMakeAmountSection( const QString &name, cMakeAction* baseaction = NULL ); --- 225,228 ---- *************** *** 245,249 **** class cDoCodeAction : public cMakeSection { - Q_OBJECT public: cDoCodeAction( const QString &name, cMakeAction* baseaction = NULL ); --- 240,243 ---- *************** *** 259,263 **** class cDoScriptAction : public cMakeSection { - Q_OBJECT public: cDoScriptAction( const QString &name, cMakeAction* baseaction = NULL ); --- 253,256 ---- *************** *** 426,430 **** class cMakeMenuGump : public cGump { - Q_OBJECT private: cMakeMenu* menu_; --- 419,422 ---- *************** *** 441,445 **** class cLastTenGump : public cGump { - Q_OBJECT private: cMakeMenu* prev_; --- 433,436 ---- Index: multis.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/multis.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** multis.h 27 Aug 2003 20:35:10 -0000 1.21 --- multis.h 23 Nov 2003 03:46:22 -0000 1.22 *************** *** 129,133 **** class cMultiGump : public cGump { - Q_OBJECT private: SERIAL char_; --- 129,132 ---- Index: resources.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/resources.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** resources.h 12 Sep 2003 15:39:55 -0000 1.18 --- resources.h 23 Nov 2003 03:46:22 -0000 1.19 *************** *** 46,52 **** #include <set> ! class cResource : public QObject, public cDefinable { - Q_OBJECT public: cResource( const cElement *Tag ); --- 46,51 ---- #include <set> ! class cResource : public cDefinable { public: cResource( const cElement *Tag ); *************** *** 149,153 **** class cFindResource : public cTargetRequest { - Q_OBJECT public: cFindResource( QString resname ) : resourcename_( resname ), tool_( INVALID_SERIAL ) {} --- 148,151 ---- *************** *** 162,166 **** class cConvertResource : public cTargetRequest { - Q_OBJECT public: cConvertResource( QString resname, cItem* pi ) : resourcename_( resname ), sourceserial_( pi->serial() ) {} --- 160,163 ---- Index: targetrequests.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/targetrequests.h,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** targetrequests.h 23 Sep 2003 23:55:24 -0000 1.47 --- targetrequests.h 23 Nov 2003 03:46:22 -0000 1.48 *************** *** 49,53 **** class cAddItemTarget: public cTargetRequest { - Q_OBJECT QString item_; bool nodecay; --- 49,52 ---- *************** *** 59,63 **** class cAddNpcTarget: public cTargetRequest { - Q_OBJECT QString npc_; public: --- 58,61 ---- *************** *** 68,72 **** class cBuildMultiTarget: public cTargetRequest { - Q_OBJECT QString multisection_; SERIAL deedserial_; --- 66,69 ---- *************** *** 79,83 **** class cSetMultiOwnerTarget: public cTargetRequest { ! Q_OBJECT SERIAL multi_; bool coowner_; --- 76,80 ---- class cSetMultiOwnerTarget: public cTargetRequest { ! SERIAL multi_; bool coowner_; *************** *** 90,94 **** class cMultiAddToListTarget: public cTargetRequest { ! Q_OBJECT SERIAL multi_; bool banlist_; --- 87,91 ---- class cMultiAddToListTarget: public cTargetRequest { ! SERIAL multi_; bool banlist_; *************** *** 101,105 **** class cMultiChangeLockTarget: public cTargetRequest { ! Q_OBJECT private: SERIAL multi_; --- 98,102 ---- class cMultiChangeLockTarget: public cTargetRequest { ! private: SERIAL multi_; *************** *** 113,117 **** class cSkStealing: public cTargetRequest { ! Q_OBJECT public: bool cSkStealing::responsed( cUOSocket *socket, cUORxTarget *target ); --- 110,114 ---- class cSkStealing: public cTargetRequest { ! public: bool cSkStealing::responsed( cUOSocket *socket, cUORxTarget *target ); *************** *** 122,126 **** class cSkForensics: public cTargetRequest { ! Q_OBJECT public: virtual bool responsed( cUOSocket *socket, cUORxTarget *target ) --- 119,123 ---- class cSkForensics: public cTargetRequest { ! public: virtual bool responsed( cUOSocket *socket, cUORxTarget *target ) *************** *** 170,174 **** class cSkPoisoning: public cTargetRequest { ! Q_OBJECT bool poisonSelected; P_ITEM pPoison; --- 167,171 ---- class cSkPoisoning: public cTargetRequest { ! bool poisonSelected; P_ITEM pPoison; *************** *** 204,208 **** class cSkRepairItem : public cTargetRequest { ! Q_OBJECT private: cDoCodeAction* makesection_; --- 201,205 ---- class cSkRepairItem : public cTargetRequest { ! private: cDoCodeAction* makesection_; *************** *** 214,218 **** class cResurectTarget: public cTargetRequest { ! Q_OBJECT public: virtual bool responsed( cUOSocket *socket, cUORxTarget *target ) --- 211,215 ---- class cResurectTarget: public cTargetRequest { ! public: virtual bool responsed( cUOSocket *socket, cUORxTarget *target ) *************** *** 234,238 **** class cKillTarget: public cTargetRequest { ! Q_OBJECT public: virtual bool responsed( cUOSocket *socket, cUORxTarget *target ) --- 231,235 ---- class cKillTarget: public cTargetRequest { ! public: virtual bool responsed( cUOSocket *socket, cUORxTarget *target ) *************** *** 256,260 **** class cSetTarget: public cTargetRequest { ! Q_OBJECT QString key,value; public: --- 253,257 ---- class cSetTarget: public cTargetRequest { ! QString key,value; public: *************** *** 265,269 **** class cRemoveTarget: public cTargetRequest { ! Q_OBJECT public: bool responsed( cUOSocket *socket, cUORxTarget *target ); --- 262,266 ---- class cRemoveTarget: public cTargetRequest { ! public: bool responsed( cUOSocket *socket, cUORxTarget *target ); *************** *** 272,276 **** class cTeleTarget: public cTargetRequest { ! Q_OBJECT public: virtual bool responsed( cUOSocket *socket, cUORxTarget *target ) --- 269,273 ---- class cTeleTarget: public cTargetRequest { ! public: virtual bool responsed( cUOSocket *socket, cUORxTarget *target ) *************** *** 297,301 **** class cShowTarget: public cTargetRequest { ! Q_OBJECT private: QString key; --- 294,298 ---- class cShowTarget: public cTargetRequest { ! private: QString key; *************** *** 307,311 **** class cSetTagTarget: public cTargetRequest { ! Q_OBJECT private: UINT8 type_; --- 304,308 ---- class cSetTagTarget: public cTargetRequest { ! private: UINT8 type_; *************** *** 353,357 **** class cGetTagTarget: public cTargetRequest { ! Q_OBJECT private: QString key_; --- 350,354 ---- class cGetTagTarget: public cTargetRequest { ! private: QString key_; *************** *** 388,392 **** class cRemoveTagTarget: public cTargetRequest { ! Q_OBJECT private: QString key_; --- 385,389 ---- class cRemoveTagTarget: public cTargetRequest { ! private: QString key_; *************** *** 453,457 **** class cTagsInfoTarget: public cTargetRequest { ! Q_OBJECT public: cTagsInfoTarget() {} --- 450,454 ---- class cTagsInfoTarget: public cTargetRequest { ! public: cTagsInfoTarget() {} *************** *** 485,489 **** class cAddEventTarget: public cTargetRequest { ! Q_OBJECT private: QString _event; --- 482,486 ---- class cAddEventTarget: public cTargetRequest { ! private: QString _event; *************** *** 496,500 **** class cRemoveEventTarget: public cTargetRequest { ! Q_OBJECT private: QString _event; --- 493,497 ---- class cRemoveEventTarget: public cTargetRequest { ! private: QString _event; *************** *** 532,536 **** class cMoveTarget: public cTargetRequest { ! Q_OBJECT private: INT16 x,y,z; --- 529,533 ---- class cMoveTarget: public cTargetRequest { ! private: INT16 x,y,z; *************** *** 578,582 **** class cTileTarget: public cTargetRequest { ! Q_OBJECT private: INT16 x1, y1; --- 575,579 ---- class cTileTarget: public cTargetRequest { ! private: INT16 x1, y1; *************** *** 591,595 **** class cRestockTarget: public cTargetRequest { ! Q_OBJECT public: virtual bool responsed( cUOSocket *socket, cUORxTarget *target ) --- 588,592 ---- class cRestockTarget: public cTargetRequest { ! public: virtual bool responsed( cUOSocket *socket, cUORxTarget *target ) *************** *** 616,620 **** class cDyeTubDyeTarget: public cTargetRequest { ! Q_OBJECT UINT16 _color; public: --- 613,617 ---- class cDyeTubDyeTarget: public cTargetRequest { ! UINT16 _color; public: *************** *** 625,629 **** class cStableTarget: public cTargetRequest { ! Q_OBJECT private: P_NPC m_npc; --- 622,626 ---- class cStableTarget: public cTargetRequest { ! private: P_NPC m_npc; *************** *** 644,648 **** class cFollowTarget : public cTargetRequest { ! Q_OBJECT private: P_NPC m_npc; --- 641,645 ---- class cFollowTarget : public cTargetRequest { ! private: P_NPC m_npc; Index: territories.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/territories.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** territories.cpp 23 Sep 2003 11:53:31 -0000 1.33 --- territories.cpp 23 Nov 2003 03:46:22 -0000 1.34 *************** *** 41,44 **** --- 41,45 ---- #include "basechar.h" #include "player.h" + #include "inlines.h" #include "globals.h" // needed for object SrvParams Index: territories.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/territories.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** territories.h 6 Jul 2003 13:48:02 -0000 1.20 --- territories.h 23 Nov 2003 03:46:22 -0000 1.21 *************** *** 120,126 **** }; ! class cAllTerritories : public QObject, public cAllBaseRegions { - Q_OBJECT public: --- 120,125 ---- }; ! class cAllTerritories : public cAllBaseRegions { public: Index: wolfpack.vcproj =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wolfpack.vcproj 21 Nov 2003 11:59:56 -0000 1.1 --- wolfpack.vcproj 23 Nov 2003 03:46:22 -0000 1.2 *************** *** 19,44 **** <Tool Name="VCCLCompilerTool" Optimization="0" ! PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" MinimalRebuild="TRUE" BasicRuntimeChecks="3" ! RuntimeLibrary="5" UsePrecompiledHeader="0" ! WarningLevel="3" Detect64BitPortabilityProblems="TRUE" ! DebugInformationFormat="4" ! AdditionalOptions=""/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" ! OutputFile="$(OutDir)/wolfpack.exe" LinkIncremental="2" GenerateDebugInformation="TRUE" ProgramDatabaseFile="$(OutDir)/wolfpack.pdb" SubSystem="2" ! TargetMachine="1" ! SuppressStartupBanner="1" ! AdditionalOptions=""/> <Tool Name="VCMIDLTool"/> --- 19,58 ---- <Tool Name="VCCLCompilerTool" + AdditionalOptions="/GR" Optimization="0" ! AdditionalIncludeDirectories="sqlite" ! PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;QT_DLL;QT_NO_STL;QT_THREAD_SUPPORT" MinimalRebuild="TRUE" BasicRuntimeChecks="3" ! RuntimeLibrary="1" ! ForceConformanceInForLoopScope="FALSE" UsePrecompiledHeader="0" ! BrowseInformation="1" ! WarningLevel="1" Detect64BitPortabilityProblems="TRUE" ! DebugInformationFormat="3"> ! <IntelOptions ! Optimization="0" ! MinimalRebuild="1" ! BasicRuntimeChecks="3" ! RuntimeLibrary="1" ! RuntimeTypeInfo="1" ! AllOptions="/c /I "sqlite" /Zi /nologo /W1 /Wp64 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /GR /Fo"Debug/" /Fd"Debug/vc70.pdb" /FR"Debug/" /Gd /TP /GR"/> ! </Tool> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" ! AdditionalDependencies="qt-mt321.lib ws2_32.lib" ! OutputFile="../wolfpack.exe" LinkIncremental="2" + SuppressStartupBanner="TRUE" GenerateDebugInformation="TRUE" ProgramDatabaseFile="$(OutDir)/wolfpack.pdb" SubSystem="2" ! TargetMachine="1"> ! <IntelOptions ! AllOptions="/NOLOGO /OUT:"../wolfpack.exe" /INCREMENTAL qt-mt321.lib ws2_32.lib /DEBUG /PDB:"Debug/wolfpack.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/> ! </Tool> <Tool Name="VCMIDLTool"/> *************** *** 61,64 **** --- 75,80 ---- <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + <IntelOptions + CompilerName="1"/> </Configuration> <Configuration *************** *** 70,93 **** <Tool Name="VCCLCompilerTool" ! PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" RuntimeLibrary="4" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3" ! AdditionalOptions=""/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" OutputFile="$(OutDir)/wolfpack.exe" LinkIncremental="1" GenerateDebugInformation="TRUE" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" ! TargetMachine="1" ! SuppressStartupBanner="1" ! AdditionalOptions=""/> <Tool Name="VCMIDLTool"/> --- 86,125 ---- <Tool Name="VCCLCompilerTool" ! PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;QT_DLL;QT_NO_STL;QT_THREAD_SUPPORT" RuntimeLibrary="4" + ForceConformanceInForLoopScope="TRUE" UsePrecompiledHeader="0" + BrowseInformation="1" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3" ! CallingConvention="1"> ! <IntelOptions ! Optimization="2" ! InlineFunctionExpansion="1" ! OmitFramePointers="1" ! StringPooling="1" ! RuntimeLibrary="4" ! BufferSecurityCheck="1" ! EnableFunctionLevelLinking="1" ! RuntimeTypeInfo="1" ! AllOptions="/c /Zi /nologo /W3 /Wp64 /O2 /Ob1 /Oy /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /D "_MBCS" /GF /FD /EHsc /ML /GS /Gy /GR /Fo"Release/" /Fd"Release/vc70.pdb" /FR"Release/" /Gr /TP"/> ! </Tool> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" + AdditionalDependencies="qt-mt321.lib ws2_32.lib" OutputFile="$(OutDir)/wolfpack.exe" LinkIncremental="1" + SuppressStartupBanner="TRUE" GenerateDebugInformation="TRUE" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" ! TargetMachine="1"> ! <IntelOptions ! AllOptions="/NOLOGO /OUT:"Release/wolfpack.exe" /INCREMENTAL:NO qt-mt321.lib ws2_32.lib /DEBUG /PDB:"Release/wolfpack.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/> ! </Tool> <Tool Name="VCMIDLTool"/> *************** *** 115,129 **** <Files> <Filter ! Name="Source Files" ! Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" ! UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"/> <Filter ! Name="Header Files" ! Filter="h;hpp;hxx;hm;inl;inc;xsd" ! UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"/> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" ! UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"/> </Files> <Globals/> --- 147,574 ---- <Files> <Filter ! Name="Server" ! Filter=""> ! <File ! RelativePath=".\accounts.cpp"/> ! <File ! RelativePath=".\accounts.h"/> ! <File ! RelativePath=".\ai.cpp"/> ! <File ! RelativePath=".\ai.h"/> ! <File ! RelativePath=".\ai_animals.cpp"/> ! <File ! RelativePath=".\ai_humans.cpp"/> ! <File ! RelativePath=".\ai_monsters.cpp"/> ! <File ! RelativePath=".\basechar.cpp"/> ! <File ! RelativePath=".\basechar.h"/> ! <File ! RelativePath=".\basedef.cpp"/> ! <File ! RelativePath=".\basedef.h"/> ! <File ! RelativePath=".\baseregion.h"/> ! <File ! RelativePath=".\basics.cpp"/> ! <File ! RelativePath=".\basics.h"/> ! <File ! RelativePath=".\boats.cpp"/> ! <File ! RelativePath=".\boats.h"/> ! <File ! RelativePath=".\chars.cpp"/> ! <File ! RelativePath=".\chars.h"/> ! <File ! RelativePath=".\combat.cpp"/> ! <File ! RelativePath=".\combat.h"/> ! <File ! RelativePath=".\commands.cpp"/> ! <File ! RelativePath=".\commands.h"/> ! <File ! RelativePath=".\console.cpp"/> ! <File ! RelativePath=".\console.h"/> ! <File ! RelativePath=".\console_win.cpp"/> ! <File ! RelativePath=".\contextmenu.cpp"/> ! <File ! RelativePath=".\contextmenu.h"/> ! <File ! RelativePath=".\coord.cpp"/> ! <File ! RelativePath=".\coord.h"/> ! <File ! RelativePath=".\corpse.cpp"/> ! <File ! RelativePath=".\corpse.h"/> ! <File ! RelativePath=".\customtags.cpp"/> ! <File ! RelativePath=".\customtags.h"/> ! <File ! RelativePath=".\dbdriver.cpp"/> ! <File ! RelativePath=".\dbdriver.h"/> ! <File ! RelativePath=".\dbl_single_click.cpp"/> ! <File ! RelativePath=".\dbl_single_click.h"/> ! <File ! RelativePath=".\definable.cpp"/> ! <File ! RelativePath=".\definable.h"/> ! <File ! RelativePath=".\defines.h"/> ! <File ! RelativePath=".\dragdrop.cpp"/> ! <File ! RelativePath=".\dragdrop.h"/> ! <File ! RelativePath=".\encryption.cpp"/> ! <File ! RelativePath=".\encryption.h"/> ! <File ! RelativePath=".\exceptions.h"/> ! <File ! RelativePath=".\factory.h"/> ! <File ! RelativePath=".\globals.cpp"/> ! <File ! RelativePath=".\globals.h"/> ! <File ! RelativePath=".\gumps.cpp"/> ! <File ! RelativePath=".\gumps.h"/> ! <File ! RelativePath=".\house.cpp"/> ! <File ! RelativePath=".\house.h"/> ! <File ! RelativePath=".\inlines.h"/> ! <File ! RelativePath=".\itemid.cpp"/> ! <File ! RelativePath=".\itemid.h"/> ! <File ! RelativePath=".\items.cpp"/> ! <File ! RelativePath=".\items.h"/> ! <File ! RelativePath=".\log.cpp"/> ! <File ! RelativePath=".\log.h"/> ! <File ! RelativePath=".\makemenus.cpp"/> ! <File ! RelativePath=".\makemenus.h"/> ! <File ! RelativePath=".\maps.cpp"/> ! <File ! RelativePath=".\maps.h"/> ! <File ! RelativePath=".\mulstructs.h"/> ! <File ! RelativePath=".\multis.cpp"/> ! <File ! RelativePath=".\multis.h"/> ! <File ! RelativePath=".\multiscache.cpp"/> ! <File ! RelativePath=".\multiscache.h"/> ! <File ! RelativePath=".\network.cpp"/> ! <File ! RelativePath=".\network.h"/> ! <File ! RelativePath=".\npc.cpp"/> ! <File ! RelativePath=".\npc.h"/> ! <File ! RelativePath=".\pagesystem.h"/> ! <File ! RelativePath=".\persistentbroker.cpp"/> ! <File ! RelativePath=".\persistentbroker.h"/> ! <File ! RelativePath=".\persistentobject.cpp"/> ! <File ! RelativePath=".\persistentobject.h"/> ! <File ! RelativePath=".\platform.h"/> ! <File ! RelativePath=".\player.cpp"/> ! <File ! RelativePath=".\player.h"/> ! <File ! RelativePath=".\preferences.cpp"/> ! <File ! RelativePath=".\preferences.h"/> ! <File ! RelativePath=".\progress.h"/> ! <File ! RelativePath=".\pythonscript.cpp"/> ! <File ! RelativePath=".\pythonscript.h"/> ! <File ! RelativePath=".\resource.h"/> ! <File ! RelativePath=".\resources.cpp"/> ! <File ! RelativePath=".\resources.h"/> ! <File ! RelativePath=".\scriptmanager.cpp"/> ! <File ! RelativePath=".\scriptmanager.h"/> ! <File ! RelativePath=".\sectors.cpp"/> ! <File ! RelativePath=".\sectors.h"/> ! <File ! RelativePath=".\singleton.h"/> ! <File ! RelativePath=".\skills.cpp"/> ! <File ! RelativePath=".\skills.h"/> ! <File ! RelativePath=".\spawnregions.cpp"/> ! <File ! RelativePath=".\spawnregions.h"/> ! <File ! RelativePath=".\speech.cpp"/> ! <File ! RelativePath=".\speech.h"/> ! <File ! RelativePath=".\srvparams.cpp"/> ! <File ! RelativePath=".\srvparams.h"/> ! <File ! RelativePath=".\srvparams_win.cpp"/> ! <File ! RelativePath=".\structs.h"/> ! <File ! RelativePath=".\targetactions.cpp"/> ! <File ! RelativePath=".\targetactions.h"/> ! <File ! RelativePath=".\targetrequests.cpp"/> ! <File ! RelativePath=".\targetrequests.h"/> ! <File ! RelativePath=".\territories.cpp"/> ! <File ! RelativePath=".\territories.h"/> ! <File ! RelativePath=".\tilecache.cpp"/> ! <File ! RelativePath=".\tilecache.h"/> ! <File ! RelativePath=".\tileflags.h"/> ! <File ! RelativePath=".\Timing.cpp"/> ! <File ! RelativePath=".\Timing.h"/> ! <File ! RelativePath=".\tmpeff.cpp"/> ! <File ! RelativePath=".\TmpEff.h"/> ! <File ! RelativePath=".\tracking.cpp"/> ! <File ! RelativePath=".\tracking.h"/> ! <File ! RelativePath=".\Trade.cpp"/> ! <File ! RelativePath=".\Trade.h"/> ! <File ! RelativePath=".\typedefs.h"/> ! <File ! RelativePath=".\uobject.cpp"/> ! <File ! RelativePath=".\uobject.h"/> ! <File ! RelativePath=".\verinfo.h"/> ! <File ! RelativePath=".\walking.cpp"/> ! <File ! RelativePath=".\walking.h"/> ! <File ! RelativePath=".\wolfpack.cpp"/> ! <File ! RelativePath=".\wolfpack.h"/> ! <File ! RelativePath=".\world.cpp"/> ! <File ! RelativePath=".\world.h"/> ! <File ! RelativePath=".\wpdefmanager.cpp"/> ! <File ! RelativePath=".\wpdefmanager.h"/> ! <File ! RelativePath=".\wptargetrequests.cpp"/> ! <File ! RelativePath=".\wptargetrequests.h"/> ! </Filter> <Filter ! Name="Network" ! Filter=""> ! <File ! RelativePath=".\network\asyncnetio.cpp"/> ! <File ! RelativePath=".\network\asyncnetio.h"/> ! <File ! RelativePath=".\network\listener.cpp"/> ! <File ! RelativePath=".\network\listener.h"/> ! <File ! RelativePath=".\network\uopacket.cpp"/> ! <File ! RelativePath=".\network\uopacket.h"/> ! <File ! RelativePath=".\network\uorxpackets.cpp"/> ! <File ! RelativePath=".\network\uorxpackets.h"/> ! <File ! RelativePath=".\network\uosocket.cpp"/> ! <File ! RelativePath=".\network\uosocket.h"/> ! <File ! RelativePath=".\network\uotxpackets.cpp"/> ! <File ! RelativePath=".\network\uotxpackets.h"/> ! </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" ! UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> ! <File ! RelativePath=".\res.rc"/> ! </Filter> ! <Filter ! Name="Python" ! Filter=""> ! <File ! RelativePath=".\python\char.cpp"/> ! <File ! RelativePath=".\python\content.h"/> ! <File ! RelativePath=".\python\engine.cpp"/> ! <File ! RelativePath=".\python\engine.h"/> ! <File ! RelativePath=".\python\global.cpp"/> ! <File ! RelativePath=".\python\gump.h"/> ! <File ! RelativePath=".\python\item.cpp"/> ! <File ! RelativePath=".\python\multi.cpp"/> ! <File ! RelativePath=".\python\objectcache.h"/> ! <File ! RelativePath=".\python\pyaccount.cpp"/> ! <File ! RelativePath=".\python\pycoord.cpp"/> ! <File ! RelativePath=".\python\pypacket.cpp"/> ! <File ! RelativePath=".\python\pypacket.h"/> ! <File ! RelativePath=".\python\pyregion.cpp"/> ! <File ! RelativePath=".\python\pytooltip.cpp"/> ! <File ! RelativePath=".\python\region.cpp"/> ! <File ! RelativePath=".\python\regioniterator.h"/> ! <File ! RelativePath=".\python\skills.h"/> ! <File ! RelativePath=".\python\socket.cpp"/> ! <File ! RelativePath=".\python\target.h"/> ! <File ! RelativePath=".\python\tempeffect.h"/> ! <File ! RelativePath=".\python\utilities.h"/> ! <File ! RelativePath=".\python\worlditerator.cpp"/> ! <File ! RelativePath=".\python\worlditerator.h"/> ! </Filter> ! <Filter ! Name="SQLite" ! Filter=""> ! <File ! RelativePath=".\sqlite\attach.c"/> ! <File ! RelativePath=".\sqlite\auth.c"/> ! <File ! RelativePath=".\sqlite\btree.c"/> ! <File ! RelativePath=".\sqlite\btree_rb.c"/> ! <File ! RelativePath=".\sqlite\build.c"/> ! <File ! RelativePath=".\sqlite\copy.c"/> ! <File ! RelativePath=".\sqlite\delete.c"/> ! <File ! RelativePath=".\sqlite\expr.c"/> ! <File ! RelativePath=".\sqlite\func.c"/> ! <File ! RelativePath=".\sqlite\hash.c"/> ! <File ! RelativePath=".\sqlite\insert.c"/> ! <File ! RelativePath=".\sqlite\main.c"/> ! <File ! RelativePath=".\sqlite\opcodes.c"/> ! <File ! RelativePath=".\sqlite\os.c"/> ! <File ! RelativePath=".\sqlite\pager.c"/> ! <File ! RelativePath=".\sqlite\parse.c"/> ! <File ! RelativePath=".\sqlite\pragma.c"/> ! <File ! RelativePath=".\sqlite\printf.c"/> ! <File ! RelativePath=".\sqlite\random.c"/> ! <File ! RelativePath=".\sqlite\select.c"/> ! <File ! RelativePath=".\sqlite\table.c"/> ! <File ! RelativePath=".\sqlite\tokenize.c"/> ! <File ! RelativePath=".\sqlite\trigger.c"/> ! <File ! RelativePath=".\sqlite\update.c"/> ! <File ! RelativePath=".\sqlite\util.c"/> ! <File ! RelativePath=".\sqlite\vacuum.c"/> ! <File ! RelativePath=".\sqlite\vdbe.c"/> ! <File ! RelativePath=".\sqlite\where.c"/> ! </Filter> ! <Filter ! Name="Encryption" ! Filter=""> ! <File ! RelativePath=".\twofish\twofish2.c"/> ! </Filter> </Files> <Globals/> Index: wpdefmanager.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.cpp,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** wpdefmanager.cpp 8 Oct 2003 01:37:59 -0000 1.68 --- wpdefmanager.cpp 23 Nov 2003 03:46:22 -0000 1.69 *************** *** 356,364 **** if( mult <= 0 ) mult = 1; ! int i = 0; ! while( i < mult ) { list.push_back( data ); ! ++i; } } --- 356,365 ---- if( mult <= 0 ) mult = 1; ! ! int j = 0; ! while( j < mult ) { list.push_back( data ); ! ++j; } } Index: wptargetrequests.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wptargetrequests.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** wptargetrequests.h 12 Apr 2003 00:58:50 -0000 1.13 --- wptargetrequests.h 23 Nov 2003 03:46:22 -0000 1.14 *************** *** 44,50 **** // Abstract base-class for target requests ! class cTargetRequest : public QObject { - Q_OBJECT protected: UI32 timeout_; // Timeout in MS --- 44,49 ---- // Abstract base-class for target requests ! class cTargetRequest { protected: UI32 timeout_; // Timeout in MS |
|
From: <dar...@us...> - 2003-11-23 03:46:26
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1:/tmp/cvs-serv23286/network Modified Files: uosocket.h Log Message: Removed QObject inheritance from all objects. This could break tr(). BUT tr() was broken anyway as we were translating too much instead of using the cliloc files. Updated and checked the project file for VS.NET as well. Works fine for me now. Index: uosocket.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.h,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -d -r1.97 -r1.98 *** uosocket.h 15 Sep 2003 19:56:54 -0000 1.97 --- uosocket.h 23 Nov 2003 03:46:22 -0000 1.98 *************** *** 64,70 **** }; ! class cUOSocket : public QObject { - Q_OBJECT public: enum eSocketState { Connecting = 0, LoggingIn, LoggedIn, InGame }; --- 64,69 ---- }; ! class cUOSocket { public: enum eSocketState { Connecting = 0, LoggingIn, LoggedIn, InGame }; |
|
From: <dar...@us...> - 2003-11-23 03:46:26
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1:/tmp/cvs-serv23286/python Modified Files: engine.cpp Log Message: Removed QObject inheritance from all objects. This could break tr(). BUT tr() was broken anyway as we were translating too much instead of using the cliloc files. Updated and checked the project file for VS.NET as well. Works fine for me now. Index: engine.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/engine.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** engine.cpp 20 Sep 2003 01:05:10 -0000 1.17 --- engine.cpp 23 Nov 2003 03:46:23 -0000 1.18 *************** *** 31,34 **** --- 31,35 ---- #include "engine.h" + #include "../srvparams.h" #include "../console.h" #include "../globals.h" *************** *** 68,137 **** Py_NoSiteFlag = 1; // No import because we need to set the search path first ! Py_Initialize(); // Initialize python finally PySys_SetArgv( argc, argv ); // Modify our search-path ! PyObject *sysModule = PyImport_ImportModule( "sys" ); ! PyObject *searchPath = PyObject_GetAttrString( sysModule, "path" ); ! // Sorry but we can't use our DefManager for this ! QDomDocument Document( "python" ); ! QFile File( "python.xml" ); ! ! if ( !File.open( IO_ReadOnly ) ) ! { ! if( !silent ) ! Console::instance()->ProgressSkip(); ! Console::instance()->send( "Unable to open python.xml!\n" ); ! return; ! } ! ! if ( !Document.setContent( &File ) ) { ! File.close(); ! ! if( !silent ) ! Console::instance()->ProgressSkip(); ! Console::instance()->send( "Unable to parse python.xml" ); ! ! return; ! } ! ! File.close(); ! ! QDomElement pythonSettings = Document.documentElement(); ! QDomNodeList nodeList = pythonSettings.childNodes(); ! ! for( UI08 i = 0; i < nodeList.count(); i++ ) { ! if( !nodeList.item( i ).isElement() ) ! continue; ! ! QDomElement element = nodeList.item( i ).toElement(); ! ! if( element.nodeName() != "searchpath" ) ! continue; ! ! PyList_Append( searchPath, PyString_FromString( element.text().ascii() ) ); } - - PyObject_SetAttrString( sysModule, "path", searchPath ); // Import site now PyObject *m = PyImport_ImportModule( "site" ); ! if( m == NULL ) { ! Console::instance()->ProgressFail(); ! if( PyErr_Occurred() ) ! PyErr_Print(); return; } ! else ! { ! Py_XDECREF( m ); ! } try { - init_wolfpack_globals(); // Init wolfpack extensions } --- 69,105 ---- Py_NoSiteFlag = 1; // No import because we need to set the search path first ! Py_Initialize(); PySys_SetArgv( argc, argv ); // Modify our search-path ! PyObject *searchpath = PySys_GetObject( "path" ); ! QStringList elements = QStringList::split( ";", SrvParams->getString( "General", "Python Searchpath", "./scripts;.", true ) ); ! ! // Prepend our items to the searchpath ! for( int i = elements.count() - 1; i >= 0; --i ) { ! PyList_Insert( searchpath, 0, PyString_FromString( elements[i].latin1() ) ); } // Import site now PyObject *m = PyImport_ImportModule( "site" ); ! ! if( !m ) { ! if( !silent ) ! { ! Console::instance()->ProgressFail(); ! if( PyErr_Occurred() ) ! PyErr_Print(); ! } ! return; } ! ! Py_XDECREF( m ); try { init_wolfpack_globals(); // Init wolfpack extensions } *************** *** 140,143 **** --- 108,112 ---- if( !silent ) Console::instance()->ProgressFail(); + Console::instance()->send( "Failed to initialize the python extension modules\n" ); return; |
|
From: <dar...@us...> - 2003-11-21 11:59:59
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv9382
Added Files:
wolfpack.sln wolfpack.vcproj
Removed Files:
Wolfpack updates.txt
Log Message:
M00
--- NEW FILE: wolfpack.sln ---
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wolfpack", "wolfpack.vcproj", "{766437DE-37EB-400E-BF08-4AB9B529C83D}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{766437DE-37EB-400E-BF08-4AB9B529C83D}.Debug.ActiveCfg = Debug|Win32
{766437DE-37EB-400E-BF08-4AB9B529C83D}.Debug.Build.0 = Debug|Win32
{766437DE-37EB-400E-BF08-4AB9B529C83D}.Release.ActiveCfg = Release|Win32
{766437DE-37EB-400E-BF08-4AB9B529C83D}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal
--- NEW FILE: wolfpack.vcproj ---
<?xml version="1.0" encoding = "Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="wolfpack"
ProjectGUID="{766437DE-37EB-400E-BF08-4AB9B529C83D}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="5"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"
AdditionalOptions=""/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/wolfpack.exe"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/wolfpack.pdb"
SubSystem="2"
TargetMachine="1"
SuppressStartupBanner="1"
AdditionalOptions=""/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
RuntimeLibrary="4"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"
AdditionalOptions=""/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/wolfpack.exe"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
SuppressStartupBanner="1"
AdditionalOptions=""/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References/>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"/>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"/>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"/>
</Files>
<Globals/>
</VisualStudioProject>
--- Wolfpack updates.txt DELETED ---
|