diff options
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index b1f6e8c61..2fe9fe8fb 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -291,7 +291,7 @@ struct mob_data* mob_spawn_dataset(struct spawn_data *data) { status->set_viewdata(&md->bl, md->class_); status->change_init(&md->bl); unit->dataset(&md->bl); - + map->addiddb(&md->bl); return md; } @@ -468,7 +468,7 @@ int mob_once_spawn(struct map_session_data* sd, int16 m, int16 x, int16 y, const struct mob_data* md = NULL; int count, lv; bool no_guardian_data = false; - + if( ai && ai&0x200 ) { no_guardian_data = true; ai &=~ 0x200; @@ -2371,7 +2371,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { if( drop_rate < 1 ) drop_rate = 1; } - + // attempt to drop the item if (rnd() % 10000 >= drop_rate) continue; @@ -2390,14 +2390,14 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { //MSG: "'%s' won %s's %s (chance: %0.02f%%)" intif->broadcast(message, strlen(message)+1, BC_DEFAULT); } - + /* heres the thing we got the feature set up however we're still discussing how to best define the ids, * so while we discuss, for a small period of time, the list is hardcoded (yes officially only those 2 use it, * thus why we're unsure on how to best place the setting) */ /* temp, will not be hardcoded for long thudu. */ if( it->nameid == 7782 || it->nameid == 7783 ) /* for when not hardcoded: add a check on mvp bonus drop as well */ clif->item_drop_announce(mvp_sd, it->nameid, md->name); - + // Announce first, or else ditem will be freed. [Lance] // By popular demand, use base drop rate for autoloot code. [Skotlex] mob->item_drop(md, dlist, ditem, 0, md->db->dropitem[i].p, homkillonly); @@ -3308,7 +3308,7 @@ int mobskill_event(struct mob_data *md, struct block_list *src, int64 tick, int md->state.alchemist = 1; return mob->skill_use(md, timer->gettick(), MSC_ALCHEMIST); } - + target_id = md->target_id; if (!target_id || battle_config.mob_changetarget_byskill) md->target_id = src->id; @@ -3704,13 +3704,13 @@ bool mob_parse_dbrow(char** str) { db->job_exp = (unsigned int)cap_value(exp, 0, UINT_MAX); mstatus->rhw.range = atoi(str[9]); - + mstatus->rhw.atk = mob_parse_dbrow_cap_value(class_,UINT16_MIN,UINT16_MAX,atoi(str[10])); mstatus->rhw.atk2 = mob_parse_dbrow_cap_value(class_,UINT16_MIN,UINT16_MAX,atoi(str[11])); - + mstatus->def = mob_parse_dbrow_cap_value(class_,DEFTYPE_MIN,DEFTYPE_MAX,atoi(str[12])); mstatus->mdef = mob_parse_dbrow_cap_value(class_,DEFTYPE_MIN,DEFTYPE_MAX,atoi(str[13])); - + mstatus->str = mob_parse_dbrow_cap_value(class_,UINT16_MIN,UINT16_MAX,atoi(str[14])); mstatus->agi = mob_parse_dbrow_cap_value(class_,UINT16_MIN,UINT16_MAX,atoi(str[15])); mstatus->vit = mob_parse_dbrow_cap_value(class_,UINT16_MIN,UINT16_MAX,atoi(str[16])); @@ -3945,7 +3945,7 @@ void mob_readdb(void) { * mob_db table reading *------------------------------------------*/ int mob_read_sqldb(void) { - const char* mob_db_name[] = { + const char* mob_db_name[] = { map->mob_db_db, map->mob_db2_db }; @@ -4521,7 +4521,7 @@ void mob_readskilldb(void) { * seems to work though... */ int mob_read_sqlskilldb(void) { - const char* mob_skill_db_name[] = { + const char* mob_skill_db_name[] = { map->mob_skill_db_db, map->mob_skill_db2_db }; @@ -4532,7 +4532,6 @@ int mob_read_sqlskilldb(void) { return 0; } - for( fi = 0; fi < ARRAYLENGTH(mob_skill_db_name); ++fi ) { uint32 lines = 0, count = 0; @@ -4647,7 +4646,7 @@ void mob_load(bool minimal) { void mob_reload(void) { int i; - + //Mob skills need to be cleared before re-reading them. [Skotlex] for (i = 0; i < MAX_MOB_DB; i++) if (mob->db_data[i] && !mob->is_clone(i)) { @@ -4766,13 +4765,13 @@ void mob_defaults(void) { //Defines the Manuk/Splendide mob groups for the status reductions [Epoque] const int mob_manuk[8] = { 1986, 1987, 1988, 1989, 1990, 1997, 1998, 1999 }; const int mob_splendide[5] = { 1991, 1992, 1993, 1994, 1995 }; - + mob = &mob_s; - + memset(mob->db_data, 0, sizeof(mob->db_data)); mob->dummy = NULL; memset(mob->chat_db, 0, sizeof(mob->chat_db)); - + memcpy(mob->manuk, mob_manuk, sizeof(mob->manuk)); memcpy(mob->splendide, mob_splendide, sizeof(mob->splendide)); /* */ |