From: Jorrit T. <jo...@us...> - 2005-03-02 20:48:53
|
Update of /cvsroot/planeshift/planeshift/src/server/bulkobjects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12371/src/server/bulkobjects Modified Files: dictionary.cpp psactionlocationinfo.cpp pscharacter.cpp psnpcdialog.cpp psspell.cpp Log Message: More fixes. Index: dictionary.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/dictionary.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** dictionary.cpp 28 Feb 2005 02:24:47 -0000 1.46 --- dictionary.cpp 2 Mar 2005 20:48:42 -0000 1.47 *************** *** 881,885 **** { csString str; ! str.Format("You don't have any progression points to be trained in %s, Sorry",skill->name.Downcase().GetData()); who->Say(str,target); return false; --- 881,886 ---- { csString str; ! csString downcase = skill->name.Downcase(); ! str.Format("You don't have any progression points to be trained in %s, Sorry",downcase.GetData()); who->Say(str,target); return false; *************** *** 890,894 **** { csString str; ! str.Format("Sorry, but I see that you don't have enough money to be trained in %s",skill->name.Downcase().GetData()); who->Say(str,target); return false; --- 891,896 ---- { csString str; ! csString downcase = skill->name.Downcase(); ! str.Format("Sorry, but I see that you don't have enough money to be trained in %s",downcase.GetData()); who->Say(str,target); return false; *************** *** 898,902 **** { csString str; ! str.Format("You can't train %s higher yet",skill->name.Downcase().GetData()); who->Say(str,target); return false; --- 900,905 ---- { csString str; ! csString downcase = skill->name.Downcase(); ! str.Format("You can't train %s higher yet",downcase.GetData()); who->Say(str,target); return false; *************** *** 934,938 **** character->Train(skill->id,1); ! psserver->SendSystemInfo(target->GetClientNum(), "You've received some %s training", skill->name.Downcase().GetData()); } --- 937,942 ---- character->Train(skill->id,1); ! csString downcase = skill->name.Downcase(); ! psserver->SendSystemInfo(target->GetClientNum(), "You've received some %s training", downcase.GetData()); } Index: psactionlocationinfo.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/psactionlocationinfo.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** psactionlocationinfo.cpp 16 Feb 2005 02:52:12 -0000 1.10 --- psactionlocationinfo.cpp 2 Mar 2005 20:48:42 -0000 1.11 *************** *** 266,282 **** csString xml; const char* formatXML = "<location><id>%u</id><masterid>%u</masterid><name>%s</name><sector>%s</sector><mesh>%s</mesh><polygon>%s</polygon><position><x>%f</x><y>%f</y><z>%f</z></position><radius>%f</radius><responsetype>%s</responsetype><response>%s</response></location>"; xml.Format( formatXML, id, master_id, ! EscpXML(name).GetData(), ! EscpXML(sectorname).GetData(), ! EscpXML(meshname).GetData(), ! EscpXML(polygon).GetData(), position.x, position.y, position.z, radius, ! EscpXML(responseType).GetData(), ! EscpXML(response).GetData() ); return xml; --- 266,288 ---- csString xml; const char* formatXML = "<location><id>%u</id><masterid>%u</masterid><name>%s</name><sector>%s</sector><mesh>%s</mesh><polygon>%s</polygon><position><x>%f</x><y>%f</y><z>%f</z></position><radius>%f</radius><responsetype>%s</responsetype><response>%s</response></location>"; + csString escpxml_name = EscpXML(name); + csString escpxml_sectorname = EscpXML(sectorname); + csString escpxml_meshname = EscpXML(meshname); + csString escpxml_polygon = EscpXML(polygon); + csString escpxml_responsetype = EscpXML(responseType); + csString escpxml_response = EscpXML(response); xml.Format( formatXML, id, master_id, ! escpxml_name.GetData(), ! escpxml_sectorname.GetData(), ! escpxml_meshname.GetData(), ! escpxml_polygon.GetData(), position.x, position.y, position.z, radius, ! escpxml_responsetype.GetData(), ! escpxml_response.GetData() ); return xml; Index: pscharacter.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/pscharacter.cpp,v retrieving revision 1.203 retrieving revision 1.204 diff -C2 -d -r1.203 -r1.204 *** pscharacter.cpp 28 Feb 2005 23:46:00 -0000 1.203 --- pscharacter.cpp 2 Mar 2005 20:48:42 -0000 1.204 *************** *** 1628,1634 **** { csString item; item.Format("<li><image icon=\"%s\" count=\"1\" /><desc text=\"%s\" /><id text=\"%d\" /></li>", ! EscpXML(loot_pending[i]->GetImageName()).GetData(), ! EscpXML(loot_pending[i]->GetName()).GetData(), loot_pending[i]->GetUID()); loot.Append(item); --- 1628,1636 ---- { csString item; + csString escpxml_imagename = EscpXML(loot_pending[i]->GetImageName()); + csString escpxml_name = EscpXML(loot_pending[i]->GetName()); item.Format("<li><image icon=\"%s\" count=\"1\" /><desc text=\"%s\" /><id text=\"%d\" /></li>", ! escpxml_imagename.GetData(), ! escpxml_name.GetData(), loot_pending[i]->GetUID()); loot.Append(item); *************** *** 2433,2439 **** csString buff; buff.Format("<equip slot=\"%s\" mesh=\"%s\" />", slotname, ! EscpXML(item->GetMeshName()).GetData() ); equipment.Append( buff ); } --- 2435,2442 ---- csString buff; + csString escpxml = EscpXML(item->GetMeshName()); buff.Format("<equip slot=\"%s\" mesh=\"%s\" />", slotname, ! escpxml.GetData() ); equipment.Append( buff ); } *************** *** 2502,2508 **** { csString item; item.Format("<q><image icon=\"%s\" /><desc text=\"%s\" /><id text=\"%d\" /><status text=\"%c\" /></q>", ! EscpXML(assigned_quests[i]->quest->GetImage()).GetData(), ! EscpXML(assigned_quests[i]->quest->GetName()).GetData(), assigned_quests[i]->quest->GetID(), assigned_quests[i]->status ); --- 2505,2513 ---- { csString item; + csString escpxml_image = EscpXML(assigned_quests[i]->quest->GetImage()); + csString escpxml_name = EscpXML(assigned_quests[i]->quest->GetName()); item.Format("<q><image icon=\"%s\" /><desc text=\"%s\" /><id text=\"%d\" /><status text=\"%c\" /></q>", ! escpxml_image.GetData(), ! escpxml_name.GetData(), assigned_quests[i]->quest->GetID(), assigned_quests[i]->status ); Index: psnpcdialog.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/psnpcdialog.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** psnpcdialog.cpp 28 Feb 2005 02:24:47 -0000 1.39 --- psnpcdialog.cpp 2 Mar 2005 20:48:42 -0000 1.40 *************** *** 523,527 **** if (resp != NULL) { ! CPrintf(CON_DEBUG, "Found response to: '%s'\n", gens[i]->GetText(possGenerOfPhrases).GetData()); currentClient->SetLastResponse(resp->id); break; --- 523,528 ---- if (resp != NULL) { ! csString txt = gens[i]->GetText(possGenerOfPhrases); ! CPrintf(CON_DEBUG, "Found response to: '%s'\n", txt.GetData()); currentClient->SetLastResponse(resp->id); break; Index: psspell.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/psspell.cpp,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** psspell.cpp 26 Feb 2005 21:06:24 -0000 1.77 --- psspell.cpp 2 Mar 2005 20:48:42 -0000 1.78 *************** *** 685,690 **** } csString xml; xml.Format("<SPELL NAME=\"%s\" WAY=\"%s\" REALM=\"%d\" GLYPHS=\"%s\"/>", ! EscpXML(name).GetData(), EscpXML(way->name).GetData(),realm,EscpXML(glyphs).GetData()); return xml; } --- 685,693 ---- } csString xml; + csString escpxml_name = EscpXML(name); + csString escpxml_wayname = EscpXML(way->name); + csString escpxml_glyphs = EscpXML(glyphs); xml.Format("<SPELL NAME=\"%s\" WAY=\"%s\" REALM=\"%d\" GLYPHS=\"%s\"/>", ! escpxml_name.GetData(), escpxml_wayname.GetData(),realm,escpxml_glyphs.GetData()); return xml; } *************** *** 693,698 **** { csString xml; xml.Format("<DESCRIPTION NAME=\"%s\" IMAGE=\"%s\" DESC=\"%s\" />", ! EscpXML(name).GetData(), EscpXML(image).GetData(), EscpXML(description).GetData()); return xml; } --- 696,704 ---- { csString xml; + csString escpxml_name = EscpXML(name); + csString escpxml_image = EscpXML(image); + csString escpxml_description = EscpXML(description); xml.Format("<DESCRIPTION NAME=\"%s\" IMAGE=\"%s\" DESC=\"%s\" />", ! escpxml_name.GetData(), escpxml_image.GetData(), escpxml_description.GetData()); return xml; } |