From: <eri...@us...> - 2008-03-27 15:04:56
|
Revision: 1281 http://planeshift.svn.sourceforge.net/planeshift/?rev=1281&view=rev Author: eriroley Date: 2008-03-27 08:05:00 -0700 (Thu, 27 Mar 2008) Log Message: ----------- - This update removes the artificial psudo-limit of 10000 for item_stats.id to determine if an item is base, or random-loot/personalized - Updated cachemanager to allow it to load items with stat_type of B, U, or R (expansion from just 'B') - updated adminmanager to only display items in the /item windows where stat_type == B Modified Paths: -------------- trunk/docs/history.txt trunk/src/server/adminmanager.cpp trunk/src/server/cachemanager.cpp Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2008-03-27 06:49:25 UTC (rev 1280) +++ trunk/docs/history.txt 2008-03-27 15:05:00 UTC (rev 1281) @@ -1,3 +1,7 @@ +*** 2008-03-27 by Eriroley +- Updated cachemanager to allow it to load items with stat_type of B, U, or R (expansion from just 'B') +- updated adminmanager to only display items in the /item windows where stat_type == B + *** 2008-03-26 by Andrew Dai - Fixed various crashes on server startup and shutdown. - Changed the /slide command so it no longer affects NPC spawn points. Modified: trunk/src/server/adminmanager.cpp =================================================================== --- trunk/src/server/adminmanager.cpp 2008-03-27 06:49:25 UTC (rev 1280) +++ trunk/src/server/adminmanager.cpp 2008-03-27 15:05:00 UTC (rev 1281) @@ -87,8 +87,6 @@ #include "progressionmanager.h" -// Show only items up to this ID when using the item spawn GUI (hide randomly generated items with IDs set above this) -#define SPAWN_ITEM_ID_CEILING 10000 // Define maximum value for awarded experience #define MAXIMUM_EXP_CHANGE 100 //----------------------------------------------------------------------------- @@ -5283,7 +5281,7 @@ // Database hit. // Justification: This is a rare event and it is quicker than us doing a sort. // Is also a read only event. - Result result(db->Select("SELECT id FROM item_stats WHERE category_id=%d AND flags NOT LIKE '%%BUY_PERSONALISE%%' AND id < %d ORDER BY Name ", category->id, SPAWN_ITEM_ID_CEILING)); + Result result(db->Select("SELECT id FROM item_stats WHERE category_id=%d AND stat_type not in ('U','R') ORDER BY Name ", category->id)); if (!result.IsValid() || result.Count() == 0) { psserver->SendSystemError(me->clientnum, "Could not query database for category %s.", msg.type.GetData() ); Modified: trunk/src/server/cachemanager.cpp =================================================================== --- trunk/src/server/cachemanager.cpp 2008-03-27 06:49:25 UTC (rev 1280) +++ trunk/src/server/cachemanager.cpp 2008-03-27 15:05:00 UTC (rev 1281) @@ -1984,7 +1984,7 @@ csString escape; db->Escape( escape, name ); - Result result(db->Select("SELECT * from item_stats where stat_type='B' and name='%s'", (const char *) name)); + Result result(db->Select("SELECT * from item_stats where stat_type in ('B','U','R') and name='%s'", (const char *) name)); if (!result.IsValid() || result.Count() == 0) { @@ -2040,7 +2040,7 @@ return itemstats; } - Result result(db->Select("SELECT * from item_stats where stat_type='B' and id='%u'", id)); + Result result(db->Select("SELECT * from item_stats where stat_type in ('B','U','R') and id='%u'", id)); if (!result.IsValid() || result.Count() == 0) { @@ -2466,7 +2466,7 @@ { uint32 currentrow; psItemStats *newitem; - Result result(db->Select("SELECT * from item_stats where stat_type='B'")); + Result result(db->Select("SELECT * from item_stats where stat_type in ('B','U','R') ")); if (!result.IsValid()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |