RE:Initial release item random option for monster drop (#2065)
* Initial release item random option for monster drop * To add item for monster with random option group, see 'db/[pre-]re/mob_drop.txt' * To add item random option group with random option group, see 'db/[pre-]re/mob_item_randomopt_group.txt' * Default entries for random options are follow iRO Crimson/Scarlet Weapon based on * "[Renewal] Episode 15.2 Crimson Weapon System", see http://www.playragnarok.com/news/updatedetail.aspx?id=280&p=1. * File uploaded by Oda (iRO's CM) on https://forums.warpportal.com/index.php?/topic/168763-fansitedb-information-distribution-and-request-station/?p=2495922 Signed-off-by: Cydh Ramdh <cydh@pservero.com> * Follow up3b7db36288* Moved `RDMOPTG_Crimson_Weapon` from const.txt to `enum Random_Option_Group` in `itemdb.h`. * Removed `RDMOPT_WEAPON_ATTR_POISON`, `RDMOPT_WEAPON_ATTR_TELEKINESIS`, and `RDMOPT_WEAPON_ATTR_UNDEAD` from Crimson Weapon random group (`RDMOPTG_Crimson_Weapon`), thanks to @atemo * Added db header for impot-tmpl files, thanks to @secretdataz Signed-off-by: Cydh Ramdh <cydh@pservero.com> * Follow upac0cdd8dc8* Fixed type on steal checking Signed-off-by: Cydh Ramdh <cydh@pservero.com> * Cleared some drop slot for crimson weapon
This commit is contained in:
@@ -10033,7 +10033,7 @@ BUILDIN_FUNC(getmobdrops)
|
||||
|
||||
mob = mob_db(class_);
|
||||
|
||||
for( i = 0; i < MAX_MOB_DROP; i++ )
|
||||
for( i = 0; i < MAX_MOB_DROP_TOTAL; i++ )
|
||||
{
|
||||
if( mob->dropitem[i].nameid < 1 )
|
||||
continue;
|
||||
@@ -16734,7 +16734,7 @@ BUILDIN_FUNC(addmonsterdrop)
|
||||
|
||||
if(mob) { //We got a valid monster, check for available drop slot
|
||||
unsigned char i, c = 0;
|
||||
for(i = 0; i < MAX_MOB_DROP; i++) {
|
||||
for(i = 0; i < MAX_MOB_DROP_TOTAL; i++) {
|
||||
if(mob->dropitem[i].nameid) {
|
||||
if(mob->dropitem[i].nameid == item_id) { //If it equals item_id we update that drop
|
||||
c = i;
|
||||
@@ -16790,7 +16790,7 @@ BUILDIN_FUNC(delmonsterdrop)
|
||||
|
||||
if(mob) { //We got a valid monster, check for item drop on monster
|
||||
unsigned char i;
|
||||
for(i = 0; i < MAX_MOB_DROP; i++) {
|
||||
for(i = 0; i < MAX_MOB_DROP_TOTAL; i++) {
|
||||
if(mob->dropitem[i].nameid == item_id) {
|
||||
mob->dropitem[i].nameid = 0;
|
||||
mob->dropitem[i].p = 0;
|
||||
|
||||
Reference in New Issue
Block a user