i want to have all equipment drop by mob have random item, as of now it need to be listed by id
and I want it to categorized by equip location, i have trying to make it my self by editing mob_readdb_drop multiple time and it failed and the last try give me Segmentation fault
well here my edited code, well i have no knowledge i'm just trying to make it by my self to learn but it always fail
static bool mob_readdb_drop(char* str[], int columns, int current) {
unsigned short i;
for (i = 0; i <= MAX_MOB_DB; i++) {
int j, size;
struct mob_db *mob;
struct s_mob_drop *drop;
struct item_data *id;
if ((mob = mob_db(i)) == mob_dummy) {
continue;
}
drop = mob->dropitem;
size = ARRAYLENGTH(mob->dropitem);
for (j = 0; j < size; j++) {
switch(id->equip) {
case EQP_ARMOR: drop[j].randomopt_group = RDMOPTG_Armor; break;
//case EQP_HAND_L: drop[i].randomopt_group = RDMOPTG_None;
//case EQP_HAND_R: drop[i].randomopt_group = RDMOPTG_None;
//case EQP_GARMENT: db->dropitem[i].randomopt_group = RDMOPTG_None;
case EQP_SHOES: drop[j].randomopt_group = RDMOPTG_Shoes; break;
//case EQP_ACC_L: db->dropitem[i].randomopt_group = RDMOPTG_None;
//case EQP_ACC_R: db->dropitem[i].randomopt_group = RDMOPTG_Acc;
}
}
}
return true;
}
Question
Litro Endemic
i want to have all equipment drop by mob have random item, as of now it need to be listed by id
and I want it to categorized by equip location, i have trying to make it my self by editing mob_readdb_drop multiple time and it failed and the last try give me Segmentation fault
well here my edited code, well i have no knowledge i'm just trying to make it by my self to learn but it always fail
static bool mob_readdb_drop(char* str[], int columns, int current) { unsigned short i; for (i = 0; i <= MAX_MOB_DB; i++) { int j, size; struct mob_db *mob; struct s_mob_drop *drop; struct item_data *id; if ((mob = mob_db(i)) == mob_dummy) { continue; } drop = mob->dropitem; size = ARRAYLENGTH(mob->dropitem); for (j = 0; j < size; j++) { switch(id->equip) { case EQP_ARMOR: drop[j].randomopt_group = RDMOPTG_Armor; break; //case EQP_HAND_L: drop[i].randomopt_group = RDMOPTG_None; //case EQP_HAND_R: drop[i].randomopt_group = RDMOPTG_None; //case EQP_GARMENT: db->dropitem[i].randomopt_group = RDMOPTG_None; case EQP_SHOES: drop[j].randomopt_group = RDMOPTG_Shoes; break; //case EQP_ACC_L: db->dropitem[i].randomopt_group = RDMOPTG_None; //case EQP_ACC_R: db->dropitem[i].randomopt_group = RDMOPTG_Acc; } } } return true; }
please help me...
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.