Update of /cvsroot/wpdev/wolfpack/network
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10484/network
Modified Files:
uosocket.cpp
Log Message:
fixes
Index: uosocket.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v
retrieving revision 1.417
retrieving revision 1.418
diff -C2 -d -r1.417 -r1.418
*** uosocket.cpp 25 Sep 2004 02:03:21 -0000 1.417
--- uosocket.cpp 25 Sep 2004 19:57:12 -0000 1.418
***************
*** 68,71 ****
--- 68,72 ----
#include <qhostaddress.h>
+ #include <vector>
#include <qvaluelist.h>
#include <functional>
***************
*** 2534,2537 ****
--- 2535,2557 ----
void cUOSocket::handleGumpResponse( cUORxGumpResponse* packet )
{
+ // There is special handling for the virtue gump button
+ // on the paperdoll.
+ if (packet->type() == 461) {
+ P_CHAR target = World::instance()->findChar(packet->serial());
+ std::vector<unsigned int> switches = packet->choice().switches;
+
+ if (!target && switches.size() != 0) {
+ target = World::instance()->findChar(switches[0]);
+ }
+
+ if (target) {
+ PyObject *args = Py_BuildValue("(NN)", target->getPyObject(), _player->getPyObject());
+ target->callEventHandler(EVENT_SHOWVIRTUEGUMP, args);
+ Py_DECREF(args);
+ }
+
+ return;
+ }
+
QMap<SERIAL, cGump*>::iterator it( gumps.find( packet->serial() ) );
|