Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27943
Modified Files:
ChangeLog basechar.cpp basechar.h basedef.cpp basedef.h
gumps.cpp player.cpp player.h res.rc serverconfig.cpp
serverconfig.h verinfo.h
Log Message:
Mounting updates.
Index: verinfo.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/verinfo.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** verinfo.h 9 Sep 2004 23:31:10 -0000 1.45
--- verinfo.h 15 Oct 2004 00:53:10 -0000 1.46
***************
*** 36,40 ****
inline const char* productVersion()
{
! return "12.9.11";
}
--- 36,40 ----
inline const char* productVersion()
{
! return "12.9.12";
}
Index: player.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.h,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** player.h 24 Sep 2004 04:47:37 -0000 1.60
--- player.h 15 Oct 2004 00:53:10 -0000 1.61
***************
*** 106,110 ****
PyObject* getProperty( const QString& name );
P_NPC unmount();
! void mount( P_NPC pMount );
bool isGM() const;
bool isCounselor() const;
--- 106,110 ----
PyObject* getProperty( const QString& name );
P_NPC unmount();
! bool mount( P_NPC pMount );
bool isGM() const;
bool isCounselor() const;
Index: res.rc
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/res.rc,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** res.rc 9 Sep 2004 23:31:10 -0000 1.34
--- res.rc 15 Oct 2004 00:53:10 -0000 1.35
***************
*** 36,40 ****
1 VERSIONINFO
! FILEVERSION 12,9,11,0
PRODUCTVERSION 13,0,0,0
FILEFLAGSMASK 0x3fL
--- 36,40 ----
1 VERSIONINFO
! FILEVERSION 12,9,12,0
PRODUCTVERSION 13,0,0,0
FILEFLAGSMASK 0x3fL
***************
*** 55,59 ****
VALUE "CompanyName", "Wolfpack Development Team"
VALUE "FileDescription", "Ultima Online Server Emulator"
! VALUE "FileVersion", "12.9.11 Beta"
VALUE "LegalCopyright", "© 2001-2004 Wolfpack Dev. Team"
VALUE "OriginalFilename", "wolfpack.exe"
--- 55,59 ----
VALUE "CompanyName", "Wolfpack Development Team"
VALUE "FileDescription", "Ultima Online Server Emulator"
! VALUE "FileVersion", "12.9.12 Beta"
VALUE "LegalCopyright", "© 2001-2004 Wolfpack Dev. Team"
VALUE "OriginalFilename", "wolfpack.exe"
Index: serverconfig.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/serverconfig.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** serverconfig.cpp 14 Oct 2004 18:02:16 -0000 1.15
--- serverconfig.cpp 15 Oct 2004 00:53:10 -0000 1.16
***************
*** 176,179 ****
--- 176,180 ----
logPath_ = QDir::convertSeparators( getString( "General", "LogPath", "./logs/", true ) );
logRotate_ = getBool( "General", "LogRotate", true, true );
+ mountRange_ = getNumber( "General", "Mount Range", 2, true );
// Network
Index: basechar.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v
retrieving revision 1.161
retrieving revision 1.162
diff -C2 -d -r1.161 -r1.162
*** basechar.cpp 12 Oct 2004 23:59:27 -0000 1.161
--- basechar.cpp 15 Oct 2004 00:53:10 -0000 1.162
***************
*** 2526,2596 ****
}
! // Is that faster ??
! switch ( body_ )
! {
! 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->clilocMessage( 1061628 ); // You can't do that while polymorphed
! return;
! }
! if ( pChar->isDead() )
! {
! source->clilocMessage( 500949 );
! return;
}
!
! if ( isAtWar() )
! source->sysMessage( tr( "Your pet is in battle right now!" ) );
! else
! pChar->mount( dynamic_cast<P_NPC>( this ) );
! }
! else
! {
! source->clilocMessage( 500206 );
}
!
! break;
! case 0x123:
! case 0x124:
! if ( objectType() == enNPC && dynamic_cast<P_NPC>( this )->owner() == pChar )
! source->sendContainer( getBackpack() );
! break;
!
! default:
! break;
! };
}
--- 2526,2541 ----
}
! P_NPC npc = dynamic_cast<P_NPC>(this);
! // Mounting and pack animals
! if (npc) {
! if (body_ == 0x123 || body_ == 0x124) {
! if ( npc->owner() == pChar || pChar->isGM() ) {
! source->sendContainer( getBackpack() );
}
! } else {
! pChar->mount(npc); // Try mounting this
}
! }
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v
retrieving revision 1.110
retrieving revision 1.111
diff -C2 -d -r1.110 -r1.111
*** ChangeLog 14 Oct 2004 16:30:40 -0000 1.110
--- ChangeLog 15 Oct 2004 00:53:10 -0000 1.111
***************
*** 51,54 ****
--- 51,55 ----
- Fix for items on very high z values interfering with walking.
- Fix bug #302 ( Char should face mount's direction after mouting )
+ - Moved the mount item information from the core to the bodyinfo file.
Wolfpack 12.9.11 Beta (26. September 2004)
Index: serverconfig.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/serverconfig.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** serverconfig.h 9 Oct 2004 14:28:59 -0000 1.7
--- serverconfig.h 15 Oct 2004 00:53:10 -0000 1.8
***************
*** 90,93 ****
--- 90,94 ----
unsigned int statsAdvanceModifier_;
unsigned short objectDelay_;
+ unsigned char mountRange_;
bool stealing_;
bool guardsActive_;
***************
*** 236,239 ****
--- 237,241 ----
unsigned int itemDecayTime() const;
unsigned int corpseDecayTime() const;
+ unsigned char mountRange() const;
bool lootdecayswithcorpse() const;
float invisTimer() const;
***************
*** 773,776 ****
--- 775,783 ----
}
+ inline unsigned char cConfig::mountRange() const
+ {
+ return mountRange_;
+ }
+
inline unsigned int cConfig::maxCharsPerAccount() const
{
Index: gumps.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/gumps.cpp,v
retrieving revision 1.175
retrieving revision 1.176
diff -C2 -d -r1.175 -r1.176
*** gumps.cpp 14 Oct 2004 01:14:57 -0000 1.175
--- gumps.cpp 15 Oct 2004 00:53:10 -0000 1.176
***************
*** 150,154 ****
unsigned int nextRespawn = 0;
if (region->nextTime() > Server::instance()->time()) {
! (region->nextTime() - Server::instance()->time()) / 1000;
}
addText( 50, 220, tr("Next Respawn: %1 seconds").arg(nextRespawn), 0x834);
--- 150,154 ----
unsigned int nextRespawn = 0;
if (region->nextTime() > Server::instance()->time()) {
! nextRespawn = (region->nextTime() - Server::instance()->time()) / 1000;
}
addText( 50, 220, tr("Next Respawn: %1 seconds").arg(nextRespawn), 0x834);
Index: basedef.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basedef.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** basedef.h 10 Oct 2004 17:51:24 -0000 1.20
--- basedef.h 15 Oct 2004 00:53:10 -0000 1.21
***************
*** 239,242 ****
--- 239,243 ----
unsigned char soundmode;
unsigned char type;
+ unsigned short mountid;
};
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.138
retrieving revision 1.139
diff -C2 -d -r1.138 -r1.139
*** player.cpp 14 Oct 2004 16:30:40 -0000 1.138
--- player.cpp 15 Oct 2004 00:53:10 -0000 1.139
***************
*** 454,468 ****
}
! void cPlayer::mount( P_NPC pMount )
{
if ( !pMount )
! return;
cUOSocket* socket = this->socket();
! if ( !inRange( pMount, 2 ) && !isGM() )
{
if ( socket )
socket->sysMessage( tr( "You are too far away to mount!" ) );
! return;
}
--- 454,478 ----
}
! bool cPlayer::mount( P_NPC pMount )
{
if ( !pMount )
! return false;
!
! if (isDead()) {
! return false;
! }
!
! unsigned short mountId = pMount->mountId();
!
! if (!mountId) {
! return false; // Not mountable
! }
cUOSocket* socket = this->socket();
! if ( !inRange( pMount, Config::instance()->mountRange() ) && !isGM() )
{
if ( socket )
socket->sysMessage( tr( "You are too far away to mount!" ) );
! return true; // Mountable, but not in range
}
***************
*** 473,547 ****
P_ITEM pMountItem = new cItem;
pMountItem->Init();
! pMountItem->setId( 0x915 );
pMountItem->setColor( pMount->skin() );
- switch ( pMount->body() )
- {
- case 0xC8:
- pMountItem->setId( 0x3E9F ); break; // Horse
- case 0xE2:
- pMountItem->setId( 0x3EA0 ); break; // Horse
- case 0xE4:
- pMountItem->setId( 0x3EA1 ); break; // Horse
- case 0xCC:
- pMountItem->setId( 0x3EA2 ); break; // Horse
- case 0xD2:
- pMountItem->setId( 0x3EA3 ); break; // Desert Ostard
- case 0xDA:
- pMountItem->setId( 0x3EA4 ); break; // Frenzied Ostard
- case 0xDB:
- pMountItem->setId( 0x3EA5 ); break; // Forest Ostard
- case 0xDC:
- pMountItem->setId( 0x3EA6 ); break; // LLama
- case 0x34:
- pMountItem->setId( 0x3E9F ); break; // Brown Horse
- case 0x4E:
- pMountItem->setId( 0x3EA0 ); break; // Grey Horse
- case 0x50:
- pMountItem->setId( 0x3EA1 ); break; // Tan Horse
- case 0x74:
- pMountItem->setId( 0x3EB5 ); break; // Nightmare
- case 0x75:
- pMountItem->setId( 0x3EA8 ); break; // Silver Steed
- case 0x72:
- pMountItem->setId( 0x3EA9 ); break; // Dark Steed
- case 0x7A:
- pMountItem->setId( 0x3EB4 ); break; // Unicorn
- case 0x84:
- pMountItem->setId( 0x3EAD ); break; // Kirin
- case 0x73:
- pMountItem->setId( 0x3EAA ); break; // Etheral
- case 0x76:
- pMountItem->setId( 0x3EB2 ); break; // War Horse-Brit
- case 0x77:
- pMountItem->setId( 0x3EB1 ); break; // War Horse-Mage Council
- case 0x78:
- pMountItem->setId( 0x3EAF ); break; // War Horse-Minax
- case 0x79:
- pMountItem->setId( 0x3EB0 ); break; // War Horse-Shadowlord
- case 0xAA:
- pMountItem->setId( 0x3EAB ); break; // Etheral LLama
- case 0x3A:
- pMountItem->setId( 0x3EA4 ); break; // Forest Ostard
- case 0x39:
- pMountItem->setId( 0x3EA3 ); break; // Desert Ostard
- case 0x3B:
- pMountItem->setId( 0x3EA5 ); break; // Frenzied Ostard
- case 0x90:
- pMountItem->setId( 0x3EB3 ); break; // Seahorse
- case 0xAB:
- pMountItem->setId( 0x3EAC ); break; // Etheral Ostard
- case 0xBB:
- pMountItem->setId( 0x3EB8 ); break; // Ridgeback
- case 0x17:
- pMountItem->setId( 0x3EBC ); break; // giant beetle
- case 0x19:
- pMountItem->setId( 0x3EBB ); break; // skeletal mount
- case 0x1a:
- pMountItem->setId( 0x3EBD ); break; // swamp dragon
- case 0x1f:
- pMountItem->setId( 0x3EBE ); break; // armor dragon
- }
-
this->setDirection( pMount->direction() );
this->addItem( cBaseChar::Mount, pMountItem );
--- 483,489 ----
P_ITEM pMountItem = new cItem;
pMountItem->Init();
! pMountItem->setId( mountId );
pMountItem->setColor( pMount->skin() );
this->setDirection( pMount->direction() );
this->addItem( cBaseChar::Mount, pMountItem );
***************
*** 550,555 ****
// if this is a gm lets tame the animal in the process
! if ( isGM() )
! {
pMount->setOwner( this );
}
--- 492,496 ----
// if this is a gm lets tame the animal in the process
! if ( isGM() ) {
pMount->setOwner( this );
}
***************
*** 563,566 ****
--- 504,509 ----
else
socket->sysMessage( tr( "You dont own that creature." ) );
+
+ return true;
}
Index: basedef.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basedef.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** basedef.cpp 10 Oct 2004 17:51:24 -0000 1.25
--- basedef.cpp 15 Oct 2004 00:53:10 -0000 1.26
***************
*** 294,297 ****
--- 294,309 ----
}
+ // Load the mount item for mounting
+ QString mountid = hex2dec(element.attribute("mountid"));
+ if (!mountid.isNull()) {
+ bodyinfo.mountid = mountid.toUShort(&ok);
+ if (!ok) {
+ Console::instance()->log(LOG_WARNING, tr("Invalid mountid in bodyinfo file: %1.\n").arg(mountid));
+ continue;
+ }
+ } else {
+ bodyinfo.mountid = 0;
+ }
+
// Soundmode for skipping non existing sounds
QString soundmode = hex2dec(element.attribute("soundmode"));
Index: basechar.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.h,v
retrieving revision 1.89
retrieving revision 1.90
diff -C2 -d -r1.89 -r1.90
*** basechar.h 10 Oct 2004 17:51:24 -0000 1.89
--- basechar.h 15 Oct 2004 00:53:10 -0000 1.90
***************
*** 562,565 ****
--- 562,569 ----
}
+ inline unsigned short mountId() {
+ return CharBaseDefs::instance()->getBodyInfo(body()).mountid;
+ }
+
virtual QCString bindmenu()
{
|