|
@@ -2866,14 +2866,14 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if( sd ) {
|
|
|
- struct mob_data *mission_md = map_id2md(sd->mission_mobid);
|
|
|
+ if (sd) {
|
|
|
+ struct mob_db *mission_mdb = mobdb_exists(sd->mission_mobid);
|
|
|
|
|
|
- if( sd->mission_mobid == md->mob_id ||
|
|
|
- ( battle_config.taekwon_mission_mobname == 1 && status_get_race2(&md->bl) == RC2_GOBLIN && status_get_race2(&mission_md->bl) == RC2_GOBLIN && mission_md ) ||
|
|
|
- ( battle_config.taekwon_mission_mobname == 2 && mob_is_samename(md, sd->mission_mobid) ) )
|
|
|
+ if ((sd->mission_mobid == md->mob_id) ||
|
|
|
+ (battle_config.taekwon_mission_mobname == 1 && mission_mdb && status_get_race2(&md->bl) == RC2_GOBLIN && mission_mdb->race2 == RC2_GOBLIN) ||
|
|
|
+ (battle_config.taekwon_mission_mobname == 2 && mob_is_samename(md, sd->mission_mobid)))
|
|
|
{ //TK_MISSION [Skotlex]
|
|
|
- if( ++sd->mission_count >= 100 && (temp = mob_get_random_id(MOBG_Branch_Of_Dead_Tree, 0xE, sd->status.base_level)) )
|
|
|
+ if (++(sd->mission_count) >= 100 && (temp = mob_get_random_id(MOBG_Branch_Of_Dead_Tree, 0xE, sd->status.base_level)))
|
|
|
{
|
|
|
pc_addfame(sd, battle_config.fame_taekwon_mission);
|
|
|
sd->mission_mobid = temp;
|
|
@@ -2884,12 +2884,12 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|
|
pc_setglobalreg(sd, add_str("TK_MISSION_COUNT"), sd->mission_count);
|
|
|
}
|
|
|
|
|
|
- if( sd->status.party_id )
|
|
|
- map_foreachinrange(quest_update_objective_sub,&md->bl,AREA_SIZE,BL_PC,sd->status.party_id,md->mob_id);
|
|
|
- else if( sd->avail_quests )
|
|
|
+ if (sd->status.party_id)
|
|
|
+ map_foreachinrange(quest_update_objective_sub, &md->bl, AREA_SIZE, BL_PC, sd->status.party_id, md->mob_id);
|
|
|
+ else if (sd->avail_quests)
|
|
|
quest_update_objective(sd, md->mob_id);
|
|
|
|
|
|
- if( sd->md && src && src->type == BL_MER && mob_db(md->mob_id)->lv > sd->status.base_level/2 )
|
|
|
+ if (sd->md && src && src->type == BL_MER && mob_db(md->mob_id)->lv > sd->status.base_level / 2)
|
|
|
mercenary_kills(sd->md);
|
|
|
}
|
|
|
|