Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4716
Modified Files:
commands.cpp
Log Message:
Moved more commands to Python.
Index: commands.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v
retrieving revision 1.248
retrieving revision 1.249
diff -C2 -d -r1.248 -r1.249
*** commands.cpp 9 Jul 2004 10:14:02 -0000 1.248
--- commands.cpp 13 Jul 2004 22:51:07 -0000 1.249
***************
*** 252,267 ****
/*
- \command remove
- \description Delete an item or character.
- */
- void commandRemove( cUOSocket* socket, const QString& command, const QStringList& args ) throw()
- {
- Q_UNUSED( socket );
- Q_UNUSED( command );
- Q_UNUSED( args );
- socket->attachTarget( new cRemoveTarget );
- }
-
- /*
\command save
\description Forces the world to be saved.
--- 252,255 ----
***************
*** 579,622 ****
/*
- \command move
- \description Move an object relatively to its current position.
- \usage - <code>move [x]</code>
- - <code>move [x],[y]</code>
- - <code>move [x],[y],[z]</code>
- X, y and z are the offsets the object should be moved by.
- */
- void commandMove( cUOSocket* socket, const QString& command, const QStringList& args ) throw()
- {
- Q_UNUSED( command );
- if ( args.size() < 1 )
- {
- socket->sysMessage( "Usage: move <x,y,z>" );
- return;
- }
-
- // Our first argument should be the relative position
- QStringList relPos = QStringList::split( ",", args[0] );
-
- if ( relPos.count() < 1 )
- {
- socket->sysMessage( "Usage: move <x,y,z>" );
- return;
- }
-
- if ( relPos.count() < 2 )
- relPos.push_back( "0" );
-
- if ( relPos.count() < 3 )
- relPos.push_back( "0" );
-
- INT16 x = relPos[0].toInt();
- INT16 y = relPos[1].toInt();
- INT16 z = relPos[2].toInt();
-
- socket->sysMessage( tr( "Please select a target to 'move %1,%2,%3'." ).arg( x ).arg( y ).arg( z ) );
- socket->attachTarget( new cMoveTarget( x, y, z ) );
- }
-
- /*
\command allshow
\description Toggles the allshow flag of your account.
--- 567,570 ----
***************
*** 684,718 ****
/*
- \command allskills
- \description Sets all skills of your character.
- \usage - <code>allskills [value]</code>
- Value is the value all skills should be set to. It's multiplied by 10 (100.0% = 1000).
- */
- void commandAllSkills( cUOSocket* socket, const QString& command, const QStringList& args ) throw()
- {
- Q_UNUSED( command );
- if ( args.count() < 1 )
- {
- socket->sysMessage( tr( "Usage: allskills <value>" ) );
- return;
- }
-
- P_PLAYER pChar = socket->player();
- UINT32 value = args[0].toInt();
-
- if ( pChar )
- {
- for ( int i = 0; i < ALLSKILLS; ++i )
- {
- pChar->setSkillValue( i, value );
-
-
- if ( pChar->socket() )
- pChar->socket()->sendSkill( i );
- }
- }
- }
-
- /*
\command broadcast
\description Broadcast a message to all connected clients.
--- 632,635 ----
***************
*** 1012,1024 ****
{ "ALLMOVE", commandAllMove },
{ "ALLSHOW", commandAllShow },
- { "ALLSKILLS", commandAllSkills },
{ "BROADCAST", commandBroadcast },
{ "DOORGEN", commandDoorGenerator },
{ "GMTALK", commandGmtalk },
- { "MOVE", commandMove },
{ "PAGES", commandPages },
{ "PAGENOTIFY", commandPageNotify },
{ "RELOAD", commandReload },
- { "REMOVE", commandRemove },
{ "RESTOCK", commandRestock },
{ "SAVE", commandSave },
--- 929,938 ----
|