From: <lpa...@us...> - 2013-07-31 22:35:45
|
Revision: 8745 http://sourceforge.net/p/planeshift/code/8745 Author: lpancallo Date: 2013-07-31 22:35:40 +0000 (Wed, 31 Jul 2013) Log Message: ----------- Fixed active bar icon display by Eredin. Modified Paths: -------------- trunk/src/common/net/messages.h trunk/src/server/gem.cpp Modified: trunk/src/common/net/messages.h =================================================================== --- trunk/src/common/net/messages.h 2013-07-30 20:20:29 UTC (rev 8744) +++ trunk/src/common/net/messages.h 2013-07-31 22:35:40 UTC (rev 8745) @@ -3711,17 +3711,14 @@ if( image.Length()>0 ) //<-- { msgSize += image.Length() +1; -//printf( "psGUIActiveMagicMessage::psGUIActiveMagicMessage got image '%s'\n", image.GetData()); } else { -//printf( "psGUIActiveMagicMessage::psGUIActiveMagicMessage got zero-length image\n"); } } else { msgSize += sizeof(uint8_t); -//printf( "psGUIActiveMagicMessage::psGUIActiveMagicMessage got no image\n" ); } //msg.AttachNew(new MsgEntry(sizeof(bool) + sizeof(uint8_t) + sizeof(int32_t) + name.Length() + image.Length() + 2)); @@ -3741,7 +3738,6 @@ msg->Add((uint8_t)0); valid = !(msg->overrun); -//printf( "psGUIActiveMagicMessage::psGUIActiveMagicMessage sending message ( %i, %i, %i, %s, %s)\n", clientNum, cmd, type, name?name.GetData():"N/A", image?image.GetData():"N/A" ); } /// Crack this message off the network. @@ -3752,11 +3748,9 @@ name = message->GetStr(); //if there was no name when the message was sent, this should read a null string image = message->GetStr(); //if there was no name when the message was sent, this should read a null string valid = true; -//printf( "psGUIActiveMagicMessage::psGUIActiveMagicMessage receiving message ( %i, %i, %s, %s)\n", command, type, name.GetData(), image.GetData() ); } PSF_DECLARE_MSG_FACTORY(); - /** * Converts the message into human readable string. * Modified: trunk/src/server/gem.cpp =================================================================== --- trunk/src/server/gem.cpp 2013-07-30 20:20:29 UTC (rev 8744) +++ trunk/src/server/gem.cpp 2013-07-31 22:35:40 UTC (rev 8745) @@ -4368,18 +4368,12 @@ csString imageName; if( !lname ) { -printf( "gemActor::AddActiveSpell name invalid\n" ); -// return; - //lname = csString(); - //lname = null; } else if( lname ) { - psSpell* lspell = psserver->GetCacheManager()->GetSpellByName(asp->Name()); - csString imageName; + psSpell* lspell = psserver->GetCacheManager()->GetSpellByName(lname); if( !lspell ) { -printf( "gemActor::AddActiveSpell psSpell invalid\n" ); imageName = csString(); } else @@ -4387,13 +4381,11 @@ imageName = lspell->GetImage(); if( !imageName ) { -printf( "gemActor::AddActiveSpell image invalid\n" ); imageName = csString(); } } } - //psGUIActiveMagicMessage outgoing(GetClientID(), psGUIActiveMagicMessage::Add, asp->Type(), asp->Name(), imageName ); psGUIActiveMagicMessage outgoing(GetClientID(), psGUIActiveMagicMessage::Add, asp->Type(), lname, imageName ); outgoing.SendMessage(); } @@ -4402,7 +4394,6 @@ { if (activeSpells.Delete(asp)) { -// psGUIActiveMagicMessage outgoing(GetClientID(), psGUIActiveMagicMessage::Remove, asp->Type(), asp->Name()); psGUIActiveMagicMessage outgoing(GetClientID(), psGUIActiveMagicMessage::Remove, asp->Type(), asp->Name(), csString() ); outgoing.SendMessage(); return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |