Update of /cvsroot/wpdev/wolfpack/network
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30003/network
Modified Files:
uosocket.cpp uotxpackets.h
Log Message:
Haven enabled.
Index: uosocket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v
retrieving revision 1.390
retrieving revision 1.391
diff -C2 -d -r1.390 -r1.391
*** uosocket.cpp 12 Aug 2004 03:16:20 -0000 1.390
--- uosocket.cpp 13 Aug 2004 02:53:53 -0000 1.391
***************
*** 551,559 ****
// Send the server/account features here as well
// AoS needs it most likely for account creation
cUOTxClientFeatures clientFeatures;
clientFeatures.setLbr( true );
clientFeatures.setT2a( true );
//clientFeatures.setShort( 1, 0xFFFF ); // AoS TEST
! clientFeatures.setShort(1, 0x1F);
send( &clientFeatures );
--- 551,564 ----
// Send the server/account features here as well
// AoS needs it most likely for account creation
+ const uint maxChars = QMIN( 6, Config::instance()->maxCharsPerAccount() );
cUOTxClientFeatures clientFeatures;
clientFeatures.setLbr( true );
clientFeatures.setT2a( true );
+ clientFeatures.setAos( true );
+ clientFeatures.setAllowPaladinNecromancer( true );
+ if ( maxChars == 6 )
+ clientFeatures.setSixthCharacterSlot( true );
//clientFeatures.setShort( 1, 0xFFFF ); // AoS TEST
! clientFeatures.setShort(1, 0x801F);
send( &clientFeatures );
***************
*** 571,575 ****
charList.addTown( i, startLocations[i].name, startLocations[i].name );
! charList.setAgeOfShadows( true );
charList.compile();
--- 576,585 ----
charList.addTown( i, startLocations[i].name, startLocations[i].name );
! charList.setAgeOfShadows( true ); // Activates Heaven city
! charList.setContextMenus( true );
! if ( maxChars == 1 )
! charList.setOneCharacter( true );
! else if ( maxChars == 6 )
! charList.setEnableSixthSlot( true );
charList.compile();
Index: uotxpackets.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uotxpackets.h,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -d -r1.112 -r1.113
*** uotxpackets.h 10 Aug 2004 03:24:29 -0000 1.112
--- uotxpackets.h 13 Aug 2004 02:53:53 -0000 1.113
***************
*** 129,143 ****
}
! virtual void addCharacter( const QString& name );
! virtual void addTown( unsigned char index, const QString& name, const QString& area );
! virtual void setCharLimit( short limit = -1 )
{
charLimit = limit;
}
virtual void compile();
! virtual void setAgeOfShadows( bool data )
{
! data ? flags |= 0x20 : flags &= 0xFFFFFFDF;
}
};
--- 129,165 ----
}
! void addCharacter( const QString& name );
! void addTown( unsigned char index, const QString& name, const QString& area );
! void setCharLimit( short limit = -1 )
{
charLimit = limit;
}
virtual void compile();
!
! void setAgeOfShadows( bool data )
{
! data ? flags |= 0x20 : flags &= ~0x20;
}
+
+ void setLimitCharacters( bool data )
+ {
+ data ? flags |= 0x4 : flags &= ~0x4;
+ }
+
+ void setContextMenus( bool data )
+ {
+ data ? flags |= 0x8 : flags &= ~0x8;
+ }
+
+ void setOneCharacter( bool data )
+ {
+ data ? flags |= 0x10 : flags &= ~0x10;
+ }
+
+ void setEnableSixthSlot( bool data )
+ {
+ data ? flags |= 0x40 : flags &= ~0x40;
+ }
+
};
***************
*** 384,405 ****
};
! // 0xB9 ClientFeatures
class cUOTxClientFeatures : public cUOPacket
{
public:
cUOTxClientFeatures() : cUOPacket( 0xB9, 3 )
{
}
cUOTxClientFeatures( const QByteArray& d ) : cUOPacket( d )
{
}
void setLbr( bool enable )
{
! enable ? ( *this )[2] |= 0x02 : ( *this )[2] &= 0xFD;
}
! void setT2a( bool enable )
{
! enable ? ( *this )[2] |= 0x01 : ( *this )[2] &= 0xFE;
}
};
--- 406,457 ----
};
! /*!
! 0xB9 ClientFeatures, server side packet.
! This packet enables various client-side features, and should be sent
! before the Character List packet.
!
! Note that in order to create a Paladin or Necromancer or use the sixth
! character slot, the corresponding flags in the Character List packet
! must be set.
! */
class cUOTxClientFeatures : public cUOPacket
{
public:
+
cUOTxClientFeatures() : cUOPacket( 0xB9, 3 )
{
}
+
cUOTxClientFeatures( const QByteArray& d ) : cUOPacket( d )
{
}
+ void setT2a( bool enable )
+ {
+ enable ? ( *this )[2] |= 0x01 : ( *this )[2] &= ~0x01;
+ }
+
void setLbr( bool enable )
{
! enable ? ( *this )[2] |= 0x02 : ( *this )[2] &= ~0x02;
}
!
! void setSixthCharacterSlot( bool enable )
{
! enable ? ( *this )[2] |= 0x20 : ( *this )[2] &= ~0x20;
! }
!
! void setAllowPaladinNecromancer( bool enable )
! {
! enable ? ( *this )[2] |= 0x10 : ( *this )[2] &= ~0x10;
! }
!
! /*!
! This flag must be present to enable Age of Shadows
! features or the Sixth Character Slot
! */
! void setAos( bool enable )
! {
! enable ? (*this)[1] |= 0x80 : (*this)[1] &= ~0x80;
}
};
|