Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv2086
Modified Files:
basechar.cpp basechar.h basedef.cpp console.cpp corpse.cpp
dbl_single_click.cpp definable.cpp encryption.cpp gumps.cpp
house.cpp makemenus.h resources.cpp spawnregions.cpp
targetactions.cpp wolfpack.h wolfpack.pro wpdefmanager.cpp
Removed Files:
prototypes.h serbinfile.cpp serbinfile.h
Log Message:
Removed prototypes.h and reintroduced wolfpack.h with intelligent content.
Index: basechar.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** basechar.cpp 11 Sep 2003 15:33:58 -0000 1.42
--- basechar.cpp 11 Sep 2003 16:19:49 -0000 1.43
***************
*** 32,35 ****
--- 32,36 ----
#include "basechar.h"
#include "basedef.h"
+ #include "npc.h"
#include "player.h"
#include "globals.h"
***************
*** 39,42 ****
--- 40,44 ----
#include "console.h"
#include "maps.h"
+ #include "inlines.h"
#include "chars.h"
#include "sectors.h"
***************
*** 2013,2015 ****
--- 2015,2105 ----
soundEffect( sound, hearall );
+ }
+
+ void cBaseChar::showPaperdoll( cUOSocket *source, bool hotkey )
+ {
+ if( !source )
+ return;
+
+ P_PLAYER pChar = source->player();
+
+ if( !pChar || onShowPaperdoll( pChar ) )
+ return;
+
+ // For players we'll always show the Paperdoll
+ if( isHuman() || objectType() != enNPC )
+ {
+ // If we're mounted (item on layer 25) and *not* using a hotkey
+ // We're trying to unmount ourself
+ if( !hotkey && ( this == pChar ) && pChar->unmount() )
+ return; // We have been unmounted
+
+ source->sendPaperdoll( this );
+ }
+
+ // Is that faster ??
+
+ switch( bodyID_ )
+ {
+ case 0x0034:
+ case 0x004E:
+ case 0x0050:
+ case 0x003A:
+ case 0x0039:
+ case 0x003B:
+ case 0x0074:
+ case 0x0075:
+ case 0x0072:
+ case 0x007A:
+ case 0x0084:
+ case 0x0073:
+ case 0x0076:
+ case 0x0077:
+ case 0x0078:
+ case 0x0079:
+ case 0x00AA:
+ case 0x00AB:
+ case 0x00BB:
+ case 0x0090:
+ case 0x00C8:
+ case 0x00E2:
+ case 0x00E4:
+ case 0x00CC:
+ case 0x00DC:
+ case 0x00D2:
+ case 0x00DA:
+ case 0x00DB:
+ case 0x0317:
+ case 0x0319:
+ case 0x031A:
+ case 0x031F:
+ // Try to mount the rideable animal
+ if( dist( pChar ) < 2 || pChar->isGM() )
+ {
+ if( !pChar->isHuman() )
+ {
+ source->sysMessage( tr( "You are unable to ride an animal." ) );
+ return;
+ }
+
+ if( pChar->isDead() )
+ {
+ source->clilocMessage( 0x7A4D5, "", 0x3b2 ); // You can't do that when you're dead.
+ return;
+ }
+
+ if( isAtWar() )
+ source->sysMessage( tr( "Your pet is in battle right now!" ) );
+ else
+ pChar->mount( dynamic_cast<P_NPC>( this ) );
+ }
+ else
+ source->sysMessage( tr( "This is too far away" ) );
+
+ break;
+ case 0x123:
+ case 0x124:
+ if( objectType() == enNPC && dynamic_cast<P_NPC>(this)->owner() == pChar )
+ source->sendContainer( getBackpack() );
+ };
}
Index: basechar.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** basechar.h 11 Sep 2003 15:33:58 -0000 1.33
--- basechar.h 11 Sep 2003 16:19:50 -0000 1.34
***************
*** 148,151 ****
--- 148,152 ----
void bark( enBark ); // Play a body dependant sound
void goldSound( unsigned short amount, bool hearall = true ); // Play a sound for dropping goldcoins depending on the amount
+ void showPaperdoll( cUOSocket *source, bool hotkey );
virtual bool checkSkill( UI16 skill, SI32 min, SI32 max, bool advance = true );
cItem* atLayer( enLayer layer ) const;
Index: basedef.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basedef.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** basedef.cpp 7 Sep 2003 19:07:46 -0000 1.3
--- basedef.cpp 11 Sep 2003 16:19:50 -0000 1.4
***************
*** 33,37 ****
#include "globals.h"
#include "wpdefmanager.h"
- #include "prototypes.h"
#include "basics.h"
--- 33,36 ----
Index: console.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** console.cpp 11 Sep 2003 12:22:24 -0000 1.4
--- console.cpp 11 Sep 2003 16:19:50 -0000 1.5
***************
*** 40,45 ****
#include "player.h"
#include "accounts.h"
- #include "prototypes.h"
#include "inlines.h"
// Library Includes
--- 40,45 ----
#include "player.h"
#include "accounts.h"
#include "inlines.h"
+ #include "wolfpack.h"
// Library Includes
Index: corpse.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/corpse.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** corpse.cpp 27 Aug 2003 23:20:56 -0000 1.34
--- corpse.cpp 11 Sep 2003 16:19:50 -0000 1.35
***************
*** 36,40 ****
#include "persistentbroker.h"
#include "globals.h"
- #include "prototypes.h"
#include "world.h"
#include "player.h"
--- 36,39 ----
Index: dbl_single_click.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbl_single_click.cpp,v
retrieving revision 1.223
retrieving revision 1.224
diff -C2 -d -r1.223 -r1.224
*** dbl_single_click.cpp 11 Sep 2003 12:25:23 -0000 1.223
--- dbl_single_click.cpp 11 Sep 2003 16:19:50 -0000 1.224
***************
*** 690,799 ****
socket->sysMessage( tr( "You can't think of a way to use that item." ) );
}
-
- /*!
- Handles Double clicks over PC/NPCs
- */
- void showPaperdoll( cUOSocket *socket, P_CHAR pTarget, bool hotkey )
- {
- if( !socket )
- return;
-
- P_PLAYER pChar = socket->player();
-
- if( !pChar || !pTarget )
- return;
-
- if( pTarget->onShowPaperdoll( pChar ) )
- return;
-
- // For players we'll always show the Paperdoll
- if( pTarget->isHuman() || pTarget->objectType() != enNPC )
- {
- /* // Theres one exception for player vendors, when you double click them
- // Their packs should open instead of their paperdoll
- if( pTarget->npcaitype() == 17 )
- {
- pTarget->talk( tr( "Take a look at my goods" ) );
-
- if( pTarget->getBackpack() )
- socket->sendContainer( pTarget->getBackpack() );
-
- return;
- }
- */
-
- // If we're mounted (item on layer 25) and *not* using a hotkey
- // We're trying to unmount ourself
- if( !hotkey && ( pTarget == pChar ) && pChar->unmount() )
- return; // We have been unmounted
-
- socket->sendPaperdoll( pTarget );
- }
-
- UINT16 body = pTarget->bodyID();
-
- // Is that faster ??
-
- switch( body )
- {
- case 0x0034:
- case 0x004E:
- case 0x0050:
- case 0x003A:
- case 0x0039:
- case 0x003B:
- case 0x0074:
- case 0x0075:
- case 0x0072:
- case 0x007A:
- case 0x0084:
- case 0x0073:
- case 0x0076:
- case 0x0077:
- case 0x0078:
- case 0x0079:
- case 0x00AA:
- case 0x00AB:
- case 0x00BB:
- case 0x0090:
- case 0x00C8:
- case 0x00E2:
- case 0x00E4:
- case 0x00CC:
- case 0x00DC:
- case 0x00D2:
- case 0x00DA:
- case 0x00DB:
- case 0x0317:
- case 0x0319:
- case 0x031A:
- case 0x031F:
- // Try to mount the rideable animal
- if( pChar->dist( pTarget ) < 2 || pChar->isGM() )
- {
- if( !pChar->isHuman() )
- {
- socket->sysMessage( tr( "You are unable to ride an animal" ) );
- return;
- }
- if( pChar->isDead() )
- {
- socket->clilocMessage( 0x7A4D5, "", 0x3b2 ); // You can't do that when you're dead.
-
- return;
- }
- if( pTarget->isAtWar() )
- socket->sysMessage( tr("Your pet is in battle right now!" ) );
- else
- pChar->mount( dynamic_cast<P_NPC>(pTarget) );
- }
- else
- socket->sysMessage( tr( "This is too far away" ) );
-
- break;
- case 0x123:
- case 0x124:
- if( pTarget->objectType() == enNPC && dynamic_cast<P_NPC>(pTarget)->owner() == pChar )
- socket->sendContainer( pTarget->getBackpack() );
- };
- }
--- 690,691 ----
Index: definable.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/definable.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** definable.cpp 6 Jul 2003 13:48:01 -0000 1.13
--- definable.cpp 11 Sep 2003 16:19:50 -0000 1.14
***************
*** 34,38 ****
#include "globals.h"
#include "basics.h"
- #include "prototypes.h"
// Qt Includes
--- 34,37 ----
Index: encryption.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/encryption.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** encryption.cpp 8 Sep 2003 10:58:47 -0000 1.14
--- encryption.cpp 11 Sep 2003 16:19:50 -0000 1.15
***************
*** 41,45 ****
#include "console.h"
#include "globals.h"
- #include "prototypes.h"
#include "log.h"
#include "basics.h"
--- 41,44 ----
Index: gumps.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/gumps.cpp,v
retrieving revision 1.143
retrieving revision 1.144
diff -C2 -d -r1.143 -r1.144
*** gumps.cpp 7 Sep 2003 19:07:46 -0000 1.143
--- gumps.cpp 11 Sep 2003 16:19:50 -0000 1.144
***************
*** 31,35 ****
#include "accounts.h"
- #include "prototypes.h"
#include "globals.h"
#include "gumps.h"
--- 31,34 ----
Index: house.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/house.cpp,v
retrieving revision 1.115
retrieving revision 1.116
diff -C2 -d -r1.115 -r1.116
*** house.cpp 11 Sep 2003 12:22:24 -0000 1.115
--- house.cpp 11 Sep 2003 16:19:50 -0000 1.116
***************
*** 31,35 ****
/* House code for deed creation by Tal Strake, revised by Cironian */
- //#include "wolfpack.h"
#include "house.h"
#include "persistentbroker.h"
--- 31,34 ----
Index: makemenus.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/makemenus.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** makemenus.h 4 Sep 2003 20:10:03 -0000 1.29
--- makemenus.h 11 Sep 2003 16:19:50 -0000 1.30
***************
*** 36,40 ****
#include "definable.h"
#include "gumps.h"
- #include "prototypes.h"
#include "singleton.h"
--- 36,39 ----
Index: resources.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/resources.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** resources.cpp 8 Sep 2003 10:58:47 -0000 1.46
--- resources.cpp 11 Sep 2003 16:19:50 -0000 1.47
***************
*** 34,38 ****
#include "globals.h"
- #include "prototypes.h"
#include "wpdefmanager.h"
#include "network/uosocket.h"
--- 34,37 ----
Index: spawnregions.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/spawnregions.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** spawnregions.cpp 11 Sep 2003 12:22:24 -0000 1.49
--- spawnregions.cpp 11 Sep 2003 16:19:50 -0000 1.50
***************
*** 50,54 ****
#include "basics.h"
#include "console.h"
- //#include "wolfpack.h" // needed for objects Npcs and Items
using namespace std;
--- 50,53 ----
Index: targetactions.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/targetactions.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** targetactions.cpp 7 Sep 2003 19:07:47 -0000 1.29
--- targetactions.cpp 11 Sep 2003 16:19:50 -0000 1.30
***************
*** 32,36 ****
#include "srvparams.h"
#include "skills.h"
- #include "prototypes.h"
#include "TmpEff.h"
#include "items.h"
--- 32,35 ----
Index: wolfpack.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** wolfpack.h 8 Sep 2003 10:58:47 -0000 1.35
--- wolfpack.h 11 Sep 2003 16:19:50 -0000 1.36
***************
*** 30,58 ****
//==================================================================================
! #ifndef __WOLFPACK_H
! #define __WOLFPACK_H
! // Platform specifics
! #include "platform.h"
- #if defined (__unix__)
- #include <termios.h>
- #include <stdio.h>
- #include <fcntl.h>
#endif
-
- #include "typedefs.h"
- #include "defines.h"
- #include "structs.h"
- #include "globals.h"
- #include "prototypes.h"
- #include "inlines.h"
- #include "items.h"
- #include "basics.h"
- #include "network.h"
- #include "console.h"
- #include "world.h"
-
-
- #endif // __WOLFPACK_H
-
--- 30,37 ----
//==================================================================================
! #if !defined( __WOLFPACK_H__ )
! #define __WOLFPACK_H__
! void reloadScripts();
#endif
Index: wolfpack.pro
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v
retrieving revision 1.157
retrieving revision 1.158
diff -C2 -d -r1.157 -r1.158
*** wolfpack.pro 9 Sep 2003 22:04:48 -0000 1.157
--- wolfpack.pro 11 Sep 2003 16:19:50 -0000 1.158
***************
*** 102,106 ****
pfactory.h \
platform.h \
- prototypes.h \
persistentbroker.h \
persistentobject.h \
--- 102,105 ----
***************
*** 116,120 ****
srvparams.h \
serxmlfile.h \
- serbinfile.h \
skills.h \
stream.h \
--- 115,118 ----
***************
*** 180,184 ****
sectors.cpp \
serxmlfile.cpp \
- serbinfile.cpp \
scriptmanager.cpp \
skills.cpp \
--- 178,181 ----
Index: wpdefmanager.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** wpdefmanager.cpp 11 Sep 2003 12:22:25 -0000 1.64
--- wpdefmanager.cpp 11 Sep 2003 16:19:50 -0000 1.65
***************
*** 41,45 ****
#include "wpdefmanager.h"
#include "globals.h"
- #include "prototypes.h"
#include "basics.h"
#include "inlines.h"
--- 41,44 ----
--- prototypes.h DELETED ---
--- serbinfile.cpp DELETED ---
--- serbinfile.h DELETED ---
|