From: <wel...@us...> - 2008-12-18 19:13:56
|
Revision: 2713 http://planeshift.svn.sourceforge.net/planeshift/?rev=2713&view=rev Author: weltall2 Date: 2008-12-18 19:13:47 +0000 (Thu, 18 Dec 2008) Log Message: ----------- merged r2690 from trunk Modified Paths: -------------- stable/docs/history.txt stable/src/client/gui/inventorywindow.cpp Property Changed: ---------------- stable/ Property changes on: stable ___________________________________________________________________ Modified: svn:mergeinfo - /personal/Xordan:1745,1812,1894,2270,2272,2283,2330,2333,2336 /trunk:1-2108,2110,2112,2114,2116-2119,2121,2123-2124,2126,2128,2130,2132-2133,2135-2465,2469,2472,2481,2487,2489,2497-2502,2507,2510-2512,2526,2528-2530,2540-2541,2549,2552-2556,2558,2561,2564,2568,2570,2572,2574-2575,2577,2579,2581,2583,2604,2606-2607,2609,2611,2622,2628-2629,2631,2638-2639,2642,2661,2668,2670,2680,2685,2696-2706,2709 + /personal/Xordan:1745,1812,1894,2270,2272,2283,2330,2333,2336 /trunk:1-2108,2110,2112,2114,2116-2119,2121,2123-2124,2126,2128,2130,2132-2133,2135-2465,2469,2472,2481,2487,2489,2497-2502,2507,2510-2512,2526,2528-2530,2540-2541,2549,2552-2556,2558,2561,2564,2568,2570,2572,2574-2575,2577,2579,2581,2583,2604,2606-2607,2609,2611,2622,2628-2629,2631,2638-2639,2642,2661,2668,2670,2680,2685,2690,2696-2706,2709 Modified: stable/docs/history.txt =================================================================== --- stable/docs/history.txt 2008-12-18 19:00:29 UTC (rev 2712) +++ stable/docs/history.txt 2008-12-18 19:13:47 UTC (rev 2713) @@ -2,6 +2,10 @@ - Changed ReadableRaceGender() to use csstring fixing the data being sent to clients. Now when doing groups you will see the icon of the race again. +*** 2008-12-14 by Stefano Angeleri +- Committed a patch for FS#1115 - After depleting a stack of arrows, + a shadow of the last arrow remains. by peeg + *** 2008-12-15 by Stefano Angeleri - Fixed FS#2608 - Deleting a char which has the same name of another makes all getting kicked by using the pid to search for the client in place of the char name Modified: stable/src/client/gui/inventorywindow.cpp =================================================================== --- stable/src/client/gui/inventorywindow.cpp 2008-12-18 19:00:29 UTC (rev 2712) +++ stable/src/client/gui/inventorywindow.cpp 2008-12-18 19:13:47 UTC (rev 2713) @@ -149,38 +149,53 @@ SetupSlot("mind"); pawsListBox * bulkList = dynamic_cast <pawsListBox*> (FindWidget("BulkList")); - if (bulkList){ - int colCount = bulkList->GetTotalColumns(); - int rowCount = (int) ceil(float(INVENTORY_BULK_COUNT)/colCount); + if (bulkList) + { + int colCount = bulkList->GetTotalColumns(); + int rowCount = (int) ceil(float(INVENTORY_BULK_COUNT)/colCount); - for(int r = 0; r < rowCount; r ++) - { - pawsListBoxRow * listRow = bulkList->NewRow(r); - for (int j = 0; j < colCount; j++) + for(int r = 0; r < rowCount; r ++) { - int i = r*colCount + j; - pawsSlot * slot; - slot = dynamic_cast <pawsSlot*> (listRow->GetColumn(j)); - slot->SetContainer( CONTAINER_INVENTORY_BULK ); - //csString name; - slot->SetSlotID( i ); - csString name; - name.Format("invslot_%d", 16 + i ); // 16 equip slots come first - slot->SetSlotName(name); + pawsListBoxRow * listRow = bulkList->NewRow(r); + for (int j = 0; j < colCount; j++) + { + int i = r*colCount + j; + pawsSlot * slot; + slot = dynamic_cast <pawsSlot*> (listRow->GetColumn(j)); + slot->SetContainer( CONTAINER_INVENTORY_BULK ); + //csString name; + slot->SetSlotID( i ); + csString name; + name.Format("invslot_%d", 16 + i ); // 16 equip slots come first + slot->SetSlotName(name); - if(i >= INVENTORY_BULK_COUNT) - { - slot->Hide(); - continue; + if(i >= INVENTORY_BULK_COUNT) + { + slot->Hide(); + continue; + } + + //printf("Subscribing bulk slot to %s.\n",name.GetData() ); + PawsManager::GetSingleton().Subscribe( name, slot ); + PawsManager::GetSingleton().Subscribe("sigClearInventorySlots", slot); + bulkSlots[i] = slot; } - - //printf("Subscribing bulk slot to %s.\n",name.GetData() ); - PawsManager::GetSingleton().Subscribe( name, slot ); - PawsManager::GetSingleton().Subscribe("sigClearInventorySlots", slot); - bulkSlots[i] = slot; } } - } + + // also subscribe lefthand and righthand slots to sigClearInventorySlots - needed e.g for stacks of ammo + pawsSlot * lefthand = dynamic_cast<pawsSlot*>(FindWidget("lefthand")); + if(lefthand) + { + PawsManager::GetSingleton().Subscribe("sigClearInventorySlots", lefthand); + } + + pawsSlot * righthand = dynamic_cast<pawsSlot*>(FindWidget("righthand")); + if(righthand) + { + PawsManager::GetSingleton().Subscribe("sigClearInventorySlots", righthand); + } + // Ask the server to send us the inventory inventoryCache = psengine->GetInventoryCache(); if (!inventoryCache) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |