Update of /cvsroot/wpdev/wolfpack/network
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7148/network
Modified Files:
uorxpackets.cpp uorxpackets.h uosocket.cpp uosocket.h
uotxpackets.h
Log Message:
Implemented the new allnames feature.
Index: uosocket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v
retrieving revision 1.379
retrieving revision 1.380
diff -C2 -d -r1.379 -r1.380
*** uosocket.cpp 15 Jun 2004 02:44:45 -0000 1.379
--- uosocket.cpp 1 Jul 2004 20:07:07 -0000 1.380
***************
*** 336,339 ****
--- 336,341 ----
case 0x91:
handleServerAttach( dynamic_cast<cUORxServerAttach*>( packet ) ); break;
+ case 0x98:
+ handleAllNames(dynamic_cast<cUORxAllNames*>(packet)); break;
case 0x9B:
handleHelpRequest( dynamic_cast<cUORxHelpRequest*>( packet ) ); break;
***************
*** 792,795 ****
--- 794,798 ----
return;
}
+
QValueVector<P_PLAYER> characters = _account->caracterList();
***************
*** 3198,3199 ****
--- 3201,3214 ----
return false;
}
+
+ void cUOSocket::handleAllNames(cUORxAllNames *packet) {
+ cUObject *object = World::instance()->findObject(packet->serial());
+
+ // Send a packet back with the name of the requested object
+ if (object) {
+ cUOTxAllNames allnames;
+ allnames.setSerial(object->serial());
+ allnames.setName(object->name());
+ send(&allnames);
+ }
+ }
Index: uorxpackets.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uorxpackets.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** uorxpackets.cpp 15 Jun 2004 02:44:45 -0000 1.63
--- uorxpackets.cpp 1 Jul 2004 20:07:07 -0000 1.64
***************
*** 92,95 ****
--- 92,97 ----
case 0x91:
return new cUORxServerAttach( data );
+ case 0x98:
+ return new cUORxAllNames( data );
case 0x9B:
return new cUORxHelpRequest( data );
Index: uotxpackets.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uotxpackets.h,v
retrieving revision 1.108
retrieving revision 1.109
diff -C2 -d -r1.108 -r1.109
*** uotxpackets.h 9 Jun 2004 22:49:43 -0000 1.108
--- uotxpackets.h 1 Jul 2004 20:07:08 -0000 1.109
***************
*** 2465,2467 ****
--- 2465,2483 ----
};
+ // 0x98 AllNames
+ class cUOTxAllNames : public cUOPacket {
+ public:
+ cUOTxAllNames() : cUOPacket(0x98, 37) {
+ setShort(1, 37);
+ }
+
+ void setSerial(unsigned int data) {
+ setInt(3, data);
+ }
+
+ void setName(const QString &name) {
+ setAsciiString(7, name.latin1(), 29);
+ }
+ };
+
#endif // __UO_TXPACKETS__
Index: uorxpackets.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uorxpackets.h,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** uorxpackets.h 2 Jun 2004 15:04:09 -0000 1.62
--- uorxpackets.h 1 Jul 2004 20:07:07 -0000 1.63
***************
*** 1227,1229 ****
--- 1227,1244 ----
};
+ // 0x98 AllNames
+ class cUORxAllNames : public cUOPacket {
+ public:
+ cUORxAllNames(const QByteArray &data) : cUOPacket( data ) {
+ }
+
+ unsigned int serial() {
+ return getInt(3);
+ }
+
+ const QString &name() {
+ return getAsciiString(7);
+ }
+ };
+
#endif // __UO_RXPACKETS__
Index: uosocket.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.h,v
retrieving revision 1.118
retrieving revision 1.119
diff -C2 -d -r1.118 -r1.119
*** uosocket.h 2 Jun 2004 15:04:10 -0000 1.118
--- uosocket.h 1 Jul 2004 20:07:08 -0000 1.119
***************
*** 220,223 ****
--- 220,224 ----
void handleExtendedStats( cUORxExtendedStats* packet );
void handleAction( cUORxAction* packet );
+ void handleAllNames( cUORxAllNames *packet );
void handleGumpResponse( cUORxGumpResponse* packet );
void handleHelpRequest( cUORxHelpRequest* packet );
|