- 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://svn.code.sf.net/p/rathena/svn/trunk@7867 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-07-25 00:42:38 +00:00
parent 1b9b599e2a
commit b2a4d6446c
3 changed files with 36 additions and 13 deletions

View File

@ -4,6 +4,11 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/07/24 2006/07/24
* Cleaned up the skill_landprotector function to correctly block only magic
skills from being placed on land protectors. [Skotlex]
* 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) [Skotlex]
* Cleaned up the Mistress Card related code so that the no-gemstone bonus * Cleaned up the Mistress Card related code so that the no-gemstone bonus
reduces item requirements by one rather than totally skip them. [Skotlex] reduces item requirements by one rather than totally skip them. [Skotlex]
* Cleaned up the logs "can log"function to use the IT constants. Also * Cleaned up the logs "can log"function to use the IT constants. Also

View File

@ -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 itemdb_group (int nameid)
{ {
int i, j; int i, j;
for (i=0; i < MAX_ITEMGROUP; i++) { 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++) { for (j=0; j < itemgroup_db[i].qty; j++) {
if (itemgroup_db[i].id[j] == nameid) if (itemgroup_db[i].id[j] == nameid)
return i; return i;

View File

@ -9320,21 +9320,24 @@ int skill_landprotector (struct block_list *bl, va_list ap)
return 1; return 1;
} }
if (skill_get_type(unit->group->skill_id) != BF_MAGIC) if((skillid == SA_LANDPROTECTOR || skillid == HW_GANBANTEIN) &&
return 0; //Only blocks out magical skills. skill_get_type(unit->group->skill_id) == BF_MAGIC)
{ //Delete Magical effects
if (skillid == SA_LANDPROTECTOR || skillid == HW_GANBANTEIN ) {
skill_delunit(unit); skill_delunit(unit);
} else return 1;
if (unit->group->skill_id == SA_LANDPROTECTOR) { }
if (unit->group->skill_id == SA_LANDPROTECTOR &&
skill_get_type(skillid) == BF_MAGIC)
{ //Magic tile won't be activated
(*alive) = 0; (*alive) = 0;
} else return 1;
if (skillid == HP_BASILICA && unit->group->skill_id == HP_BASILICA) { }
//Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex] if (skillid == HP_BASILICA && unit->group->skill_id == HP_BASILICA)
{ //Basilica can't be placed on top of itself to avoid map-cell stacking problems. [Skotlex]
(*alive) = 0; (*alive) = 0;
} else return 1;
return 0; }
return 1; return 0;
} }
/*========================================== /*==========================================