Index: src/common/paws/pawslistbox.cpp =================================================================== --- src/common/paws/pawslistbox.cpp (revision 5388) +++ src/common/paws/pawslistbox.cpp (working copy) @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include "pawslistbox.h" @@ -366,6 +367,7 @@ { pawsListBoxRow* zombie = rows[x]; Remove(zombie); + delete zombie; return; } } @@ -1346,7 +1348,13 @@ } widget->SetParent( this ); - widget->Load( def[column].widgetNode ); + //widget->Load( def[column].widgetNode ); + csRef xml = csPtr(new csTinyDocumentSystem); + csRef doc = xml->CreateDocument(); + csRef node = doc->CreateRoot(); + node = node->CreateNodeBefore(CS_NODE_ELEMENT); + CS::DocSystem::CloneNode(def[column].widgetNode, node); + widget->Load(node); int borderW = 0; int borderH = 0; Index: src/client/gui/pawsskillwindow.h =================================================================== --- src/client/gui/pawsskillwindow.h (revision 5388) +++ src/client/gui/pawsskillwindow.h (working copy) @@ -32,7 +32,6 @@ class pawsMultiLineTextBox; class pawsProgressBar; class pawsObjectView; -class psCharAppearance; /** Describes a skill description inside the GUI system. */ @@ -156,9 +155,6 @@ /// Flag if we have sent our initial request for faction information. Only sent /// once and everything else is an update. bool factRequest; - - - psCharAppearance* charApp; }; CREATE_PAWS_FACTORY( pawsSkillWindow ); Index: src/client/gui/pawsskillwindow.cpp =================================================================== --- src/client/gui/pawsskillwindow.cpp (revision 5388) +++ src/client/gui/pawsskillwindow.cpp (working copy) @@ -23,7 +23,6 @@ #include "globals.h" #include "pscelclient.h" #include "clientvitals.h" -#include "../charapp.h" #include "net/messages.h" #include "net/clientmsghandler.h" #include "util/skillcache.h" @@ -68,7 +67,6 @@ menStaminaMax = 0; factRequest = false; - charApp = new psCharAppearance(PawsManager::GetSingleton().GetObjectRegistry()); } pawsSkillWindow::~pawsSkillWindow() @@ -80,17 +78,10 @@ delete i.Next(); } skillDescriptions.DeleteAll(); - delete charApp; } bool pawsSkillWindow::PostSetup() { - // Setup the Doll - if ( !SetupDoll() ) - { - return false; - } - if (!psengine->GetMsgHandler()->Subscribe(this, MSGTYPE_GUISKILL)) { return false; @@ -150,48 +141,6 @@ return true; } -bool pawsSkillWindow::SetupDoll() -{ - pawsObjectView* widget = dynamic_cast(FindWidget("Doll")); - GEMClientActor* actor = psengine->GetCelClient()->GetMainPlayer(); - if (!widget || !actor) - { - return true; // doll not wanted, not an error - } - - csRef mesh = actor->GetMesh(); - if (!mesh) - { - return false; // doll wanted, but mesh not found -> error - } - - // Set the doll view - widget->View( mesh ); - - // Set the charApp. - widget->SetCharApp(charApp); - - // Register this doll for updates - widget->SetID(actor->GetEID().Unbox()); - - csRef spstate = scfQueryInterface (widget->GetObject()->GetMeshObject()); - if (spstate) - { - // Setup cal3d to select random 0 velocity anims - spstate->SetVelocity(0.0,&psengine->GetRandomGen()); - } - - charApp->SetMesh(widget->GetObject()); - - charApp->ApplyTraits(actor->traits); - charApp->ApplyEquipment(actor->equipment); - - widget->EnableMouseControl(true); - - //return (a && e); - return true; -} - void pawsSkillWindow::HandleFactionMsg(MsgEntry* me) { psFactionMessage factMsg(me); @@ -336,6 +285,7 @@ variousSkillList->Clear(); skillString.Clear(); selectedSkill.Clear(); + unsortedSkills.DeleteAll(); } bool pawsSkillWindow::OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget ) @@ -427,10 +377,10 @@ if (skills->hasRemoved()) flush = true; + selectedSkill.Clear(); + if (flush) { - selectedSkill.Clear(); - // Clear descriptions statsSkillDescription->SetText(""); combatSkillDescription->SetText(""); @@ -452,7 +402,6 @@ int idx = 0; // Row index counter psSkillCacheIter p = skills->iterBegin(); - bool stats = false, combat = false, magic = false, jobs = false, various = false; while (p.HasNext()) { psSkillCacheItem *skill = p.Next(); @@ -468,31 +417,26 @@ { case 0://Stats { - stats = true; HandleSkillCategory(statsSkillList, "StatsIndicator", "Stats Button", skill, idx, flush); break; } case 1://Combat skills { - combat = true; HandleSkillCategory(combatSkillList, "CombatIndicator", "Combat Button", skill, idx, flush); break; } case 2://Magic skills { - magic = true; HandleSkillCategory(magicSkillList, "MagicIndicator", "Magic Button", skill, idx, flush); break; } case 3://Jobs skills { - jobs = true; HandleSkillCategory(jobsSkillList, "JobsIndicator", "Jobs Button", skill, idx, flush); break; } case 4://Various skills { - various = true; HandleSkillCategory(variousSkillList, "VariousIndicator", "Various Button", skill, idx, flush); break; } @@ -505,35 +449,19 @@ } } - if (stats) + if (flush) { - statsSkillList->SetSortedColumn(0); - statsSkillList->SortRows(); + statsSkillList->SetSortedColumn(0); + statsSkillList->SortRows(); + combatSkillList->SetSortedColumn(0); + combatSkillList->SortRows(); + magicSkillList->SetSortedColumn(0); + magicSkillList->SortRows(); + jobsSkillList->SetSortedColumn(0); + jobsSkillList->SortRows(); + variousSkillList->SetSortedColumn(0); + variousSkillList->SortRows(); } - - if (combat) - { - combatSkillList->SetSortedColumn(0); - combatSkillList->SortRows(); - } - - if (magic) - { - magicSkillList->SetSortedColumn(0); - magicSkillList->SortRows(); - } - - if (jobs) - { - jobsSkillList->SetSortedColumn(0); - jobsSkillList->SortRows(); - } - - if (various) - { - variousSkillList->SetSortedColumn(0); - variousSkillList->SortRows(); - } if (!foundSelected) {