summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-25 00:42:38 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-25 00:42:38 +0000
commitf2465bfa9245ae73e0320f36b766df352bd71d44 (patch)
tree4f282de5424835f1c357a5b83122f0fb73cd23d3 /src/map/itemdb.c
parentb0d0e25720191d6971636760442d58d9f15aa875 (diff)
downloadhercules-f2465bfa9245ae73e0320f36b766df352bd71d44.tar.gz
hercules-f2465bfa9245ae73e0320f36b766df352bd71d44.tar.bz2
hercules-f2465bfa9245ae73e0320f36b766df352bd71d44.tar.xz
hercules-f2465bfa9245ae73e0320f36b766df352bd71d44.zip
- Cleaned up the skill_landprotector function to correctly block only magic skills from being placed on land protectors.
- Corrected itemdb_group so that it will not return the random item givers (should give priority to actual item groups, so that the item heal bonuses work correctly) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7867 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 29b676aed..4b40a93e7 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -113,13 +113,28 @@ int itemdb_searchrandomid(int group)
}
/*==========================================
- *
+ * Returns the group this item belongs to.
+ * Skips general random item givers (gift/blue/violet box)
*------------------------------------------
*/
int itemdb_group (int nameid)
{
int i, j;
for (i=0; i < MAX_ITEMGROUP; i++) {
+ switch (i) {
+ case IG_BLUEBOX:
+ case IG_VIOLETBOX:
+ case IG_CARDALBUM:
+ case IG_GIFTBOX:
+ case IG_COOKIEBAG:
+ case IG_GIFTBOX_1:
+ case IG_GIFTBOX_2:
+ case IG_GIFTBOX_3:
+ case IG_GIFTBOX_4:
+ case IG_GIFTBOXCHINA:
+ continue;
+ }
+
for (j=0; j < itemgroup_db[i].qty; j++) {
if (itemgroup_db[i].id[j] == nameid)
return i;