From: <jo...@us...> - 2014-02-11 03:00:02
|
Revision: 9257 http://sourceforge.net/p/planeshift/code/9257 Author: joelyon Date: 2014-02-11 02:59:59 +0000 (Tue, 11 Feb 2014) Log Message: ----------- when client sends a blank spell cast request, the server responds by sending the current active magic list. this corrects the problem where the active magic bar is blank at startup even if there are things active. Modified Paths: -------------- trunk/src/client/gui/pawsactivemagicwindow.cpp trunk/src/server/gem.cpp trunk/src/server/spellmanager.cpp Modified: trunk/src/client/gui/pawsactivemagicwindow.cpp =================================================================== --- trunk/src/client/gui/pawsactivemagicwindow.cpp 2014-02-11 01:17:23 UTC (rev 9256) +++ trunk/src/client/gui/pawsactivemagicwindow.cpp 2014-02-11 02:59:59 UTC (rev 9257) @@ -115,6 +115,11 @@ LoadSetting(); + csString blankSpell; + blankSpell=""; + psSpellCastMessage msg(blankSpell, psengine->GetKFactor()); //request the current Active Mgic list + msg.SendMessage(); + return true; } Modified: trunk/src/server/gem.cpp =================================================================== --- trunk/src/server/gem.cpp 2014-02-11 01:17:23 UTC (rev 9256) +++ trunk/src/server/gem.cpp 2014-02-11 02:59:59 UTC (rev 9257) @@ -4463,8 +4463,6 @@ asp->SetImage(image); } - //psGUIActiveMagicMessage outgoing(GetClientID(), activeSpells, GetActiveMagicSequence()); // <---add message index tracking! - //outgoing.SendMessage(); SendActiveSpells(); } @@ -4479,8 +4477,6 @@ { if(activeSpells.Delete(asp)) { - //psGUIActiveMagicMessage outgoing(GetClientID(), activeSpells, GetActiveMagicSequence()); // <---add message index tracking! - //outgoing.SendMessage(); SendActiveSpells(); return true; } Modified: trunk/src/server/spellmanager.cpp =================================================================== --- trunk/src/server/spellmanager.cpp 2014-02-11 01:17:23 UTC (rev 9256) +++ trunk/src/server/spellmanager.cpp 2014-02-11 02:59:59 UTC (rev 9257) @@ -222,6 +222,13 @@ { psSpell* spell = NULL; + if( spellName=="" ) + { + //this is a request to send the current active magic list + caster->SendActiveSpells(); + return; + } + // Allow developers to cast any spell bool canCastAllSpells; if(client) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |