diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf index 9fbbd62ef9..d24c7a38ab 100644 --- a/conf/battle/skill.conf +++ b/conf/battle/skill.conf @@ -291,3 +291,10 @@ bowling_bash_area: 0 // On official servers, hitting a wall will always cause the unit to stop moving. // If "no", the unit will continue moving when approaching walls diagonally (old Athena behavior). path_blown_halt: yes + +// Taekwon Mission mob name check +// iRO Wiki States: If your target is Goblin, any monster called "Goblin" will count toward the mission. +// 0: Off (default) +// 1: All 5 of the Goblin monsters will count, regardless of Mob ID (Mob ID: 1122-1126) - iRO default +// 2: Any monster with the same exact name will count, regardless of Mob ID - Comparison based off of jName +taekwon_mission_mobname: 0 diff --git a/db/pre-re/skill_unit_db.txt b/db/pre-re/skill_unit_db.txt index 96f8e30ecc..96c70d4d64 100644 --- a/db/pre-re/skill_unit_db.txt +++ b/db/pre-re/skill_unit_db.txt @@ -128,7 +128,6 @@ 2303,0xd0, , 0, 2, -1,all, 0x2018 //SC_BLOODYLUST 2304,0xd1, , 0, 2,1000,enemy, 0x018 //SC_FEINTBOMB -2317,0x86, , -1, 0, -1,enemy, 0x010 //LG_OVERBRAND 2319,0xec, , 0, 3,5000,all, 0x000 //LG_BANDING 2414,0xda, , 0, 1,1000,enemy, 0x008 //WM_REVERBERATION diff --git a/db/re/skill_unit_db.txt b/db/re/skill_unit_db.txt index f1d3a92199..4f55f2c936 100644 --- a/db/re/skill_unit_db.txt +++ b/db/re/skill_unit_db.txt @@ -130,7 +130,6 @@ 2303,0xd0, , 0, 2, -1,all, 0x2018 //SC_BLOODYLUST 2304,0xd1, , 0, 2,1000,enemy, 0x018 //SC_FEINTBOMB -2317,0x86, , -1, 0, -1,enemy, 0x010 //LG_OVERBRAND 2319,0xec, , 0, 3,5000,all, 0x000 //LG_BANDING 2414,0xda, , 0, 1,1000,enemy, 0x008 //WM_REVERBERATION diff --git a/src/map/battle.c b/src/map/battle.c index 2dba414ec2..68bacb235a 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7371,6 +7371,7 @@ static const struct _battle_data { { "path_blown_halt", &battle_config.path_blown_halt, 1, 0, 1, }, { "rental_mount_speed_boost", &battle_config.rental_mount_speed_boost, 25, 0, 100, }, { "feature.warp_suggestions", &battle_config.warp_suggestions_enabled, 0, 0, 1, }, + { "taekwon_mission_mobname", &battle_config.taekwon_mission_mobname, 0, 0, 2, }, }; #ifndef STATS_OPT_OUT /** diff --git a/src/map/battle.h b/src/map/battle.h index 77f8694a6e..2897f56454 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -533,6 +533,7 @@ extern struct Battle_Config int path_blown_halt; int rental_mount_speed_boost; int warp_suggestions_enabled; + int taekwon_mission_mobname; } battle_config; void do_init_battle(void); diff --git a/src/map/map.c b/src/map/map.c index 5a8f714e34..5601a1f930 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1681,6 +1681,10 @@ int map_quit(struct map_session_data *sd) { status_change_end(&sd->bl, SC_SATURDAYNIGHTFEVER, INVALID_TIMER); status_change_end(&sd->bl, SC_KYOUGAKU, INVALID_TIMER); status_change_end(&sd->bl, SC_C_MARKER, INVALID_TIMER); + status_change_end(&sd->bl, SC_READYSTORM, INVALID_TIMER); + status_change_end(&sd->bl, SC_READYDOWN, INVALID_TIMER); + status_change_end(&sd->bl, SC_READYTURN, INVALID_TIMER); + status_change_end(&sd->bl, SC_READYCOUNTER, INVALID_TIMER); if (battle_config.debuff_on_logout&1) { //Remove negative buffs status_change_end(&sd->bl, SC_ORCISH, INVALID_TIMER); status_change_end(&sd->bl, SC_STRIPWEAPON, INVALID_TIMER); diff --git a/src/map/map.h b/src/map/map.h index ce94e1c791..e143d4658b 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -54,6 +54,11 @@ void map_msg_reload(void); /** Added definitions for WoESE objects and other [L0ne_W0lf], [aleos] */ enum MOBID { MOBID_PORING = 1002, + MOBID_GOBLIN_1 = 1122, + MOBID_GOBLIN_2, + MOBID_GOBLIN_3, + MOBID_GOBLIN_4, + MOBID_GOBLIN_5, MOBID_MARINE_SPHERE = 1142, MOBID_A_GUARDIAN = 1285, MOBID_K_GUARDIAN, diff --git a/src/map/mob.c b/src/map/mob.c index 82d6501923..17a950e1f9 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2583,7 +2583,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) } if( sd ) { - if( sd->mission_mobid == md->mob_id) { //TK_MISSION [Skotlex] + if( sd->mission_mobid == md->mob_id || + ( battle_config.taekwon_mission_mobname == 1 && mob_is_goblin(md, sd->mission_mobid) ) || + ( 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(0, 0xE, sd->status.base_level)) ) { pc_addfame(sd, 1); sd->mission_mobid = temp; diff --git a/src/map/mob.h b/src/map/mob.h index 6b5d415634..0f585d0d22 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -274,6 +274,8 @@ void mob_heal(struct mob_data *md,unsigned int heal); #define mob_is_gvg(md) (map[(md)->bl.m].flag.gvg_castle && ( (md)->mob_id == MOBID_EMPERIUM || (md)->mob_id == MOBID_BARRICADE1 || (md)->mob_id == MOBID_GUARIDAN_STONE1 || (md)->mob_id == MOBID_GUARIDAN_STONE2) ) #define mob_is_treasure(md) (((md)->mob_id >= MOBID_TREAS01 && (md)->mob_id <= MOBID_TREAS40) || ((md)->mob_id >= MOBID_TREAS41 && (md)->mob_id <= MOBID_TREAS49)) #define mob_is_guardian(mob_id) ((mob_id >= MOBID_A_GUARDIAN && mob_id <= MOBID_S_GUARDIAN) || mob_id == MOBID_S_GUARDIAN_ || mob_id == MOBID_A_GUARDIAN_) +#define mob_is_goblin(md, mid) (((md)->mob_id >= MOBID_GOBLIN_1 && (md)->mob_id <= MOBID_GOBLIN_5) && (mid >= MOBID_GOBLIN_1 && mid <= MOBID_GOBLIN_5)) +#define mob_is_samename(md, mid) (strcmp(mob_db((md)->mob_id)->jname, mob_db(mid)->jname) == 0) void mob_clear_spawninfo(); int do_init_mob(void); diff --git a/src/map/pc.c b/src/map/pc.c index a2e280916b..f4856a8ef4 100755 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -370,9 +370,9 @@ void pc_addfame(struct map_session_data *sd,int count) sd->status.fame = MAX_FAME; switch(sd->class_&MAPID_UPPERMASK){ - case MAPID_BLACKSMITH: ranktype=0; break; - case MAPID_ALCHEMIST: ranktype=1; break; - case MAPID_TAEKWON: ranktype=2; break; + case MAPID_BLACKSMITH: ranktype = 0; break; + case MAPID_ALCHEMIST: ranktype = 1; break; + case MAPID_TAEKWON: ranktype = 2; break; } clif_update_rankingpoint(sd,ranktype,count); @@ -1490,7 +1490,7 @@ int pc_calc_skilltree(struct map_session_data *sd) if (sd->status.skill[k].id == 0 || sd->status.skill[k].flag == SKILL_FLAG_TEMPORARY || sd->status.skill[k].flag == SKILL_FLAG_PLAGIARIZED) k = 0; //Not learned. else - if (sd->status.skill[k].flag >= SKILL_FLAG_REPLACED_LV_0) //Real lerned level + if (sd->status.skill[k].flag >= SKILL_FLAG_REPLACED_LV_0) //Real learned level k = sd->status.skill[skill_tree[c][i].need[j].id].flag - SKILL_FLAG_REPLACED_LV_0; else k = pc_checkskill(sd,k); @@ -1531,29 +1531,22 @@ int pc_calc_skilltree(struct map_session_data *sd) } } while(flag); - // - if( c > 0 && (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && sd->status.skill_point == 0 && pc_famerank(sd->status.char_id, MAPID_TAEKWON) ) - { - /* Taekwon Ranger Bonus Skill Tree + if( c > 0 && (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && sd->status.skill_point == 0 && pc_famerank(sd->status.char_id, MAPID_TAEKWON) ) { + /* Taekwon Ranker Bonus Skill Tree ============================================ - Grant All Taekwon Tree, but only as Bonus Skills in case they drop from ranking. - (c > 0) to avoid grant Novice Skill Tree in case of Skill Reset (need more logic) - - (sd->status.skill_point == 0) to wait until all skill points are asigned to avoid problems with Job Change quest. */ + - (sd->status.skill_point == 0) to wait until all skill points are assigned to avoid problems with Job Change quest. */ - for( i = 0; i < MAX_SKILL_TREE && (id = skill_tree[c][i].id) > 0; i++ ) - { + for( i = 0; i < MAX_SKILL_TREE && (id = skill_tree[c][i].id) > 0; i++ ) { if( (skill_get_inf2(id)&(INF2_QUEST_SKILL|INF2_WEDDING_SKILL)) ) continue; //Do not include Quest/Wedding skills. - if( sd->status.skill[id].id == 0 ) - { + if( sd->status.skill[id].id == 0 ) { sd->status.skill[id].id = id; sd->status.skill[id].flag = SKILL_FLAG_TEMPORARY; // So it is not saved, and tagged as a "bonus" skill. - } - else if( id != NV_BASIC ) - { + } else if( id != NV_BASIC ) sd->status.skill[id].flag = SKILL_FLAG_REPLACED_LV_0 + sd->status.skill[id].lv; // Remember original level - } sd->status.skill[id].lv = skill_tree_get_max(id, sd->status.class_); } @@ -6340,7 +6333,7 @@ int pc_skillup(struct map_session_data *sd,uint16 skill_id) if( !skill_get_inf(skill_id) ) status_calc_pc(sd,0); // Only recalculate for passive skills. else if( sd->status.skill_point == 0 && (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc_famerank(sd->status.char_id, MAPID_TAEKWON) ) - pc_calc_skilltree(sd); // Required to grant all TK Ranger skills. + pc_calc_skilltree(sd); // Required to grant all TK Ranker skills. else pc_check_skilltree(sd, skill_id); // Check if a new skill can Lvlup @@ -6583,7 +6576,7 @@ int pc_resetskill(struct map_session_data* sd, int flag) if( !(flag&2) ) { //Remove stuff lost when resetting skills. /** - * It has been confirmed on official server that when you reset skills with a ranked tweakwon your skills are not reset (because you have all of them anyway) + * It has been confirmed on official servers that when you reset skills with a ranked Taekwon your skills are not reset (because you have all of them anyway) **/ if( (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc_famerank(sd->status.char_id, MAPID_TAEKWON) ) return 0; diff --git a/src/map/skill.c b/src/map/skill.c index fe02c75ee6..c7fd52174a 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -930,16 +930,13 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, uint if(sc && !sc->data[SC_COMBO]) { if(sc->data[SC_READYSTORM] && sc_start(src,src,SC_COMBO, 15, TK_STORMKICK, - (2000 - 4*sstatus->agi - 2*sstatus->dex))) - ; //Stance triggered + (2000 - 4*sstatus->agi - 2*sstatus->dex))); //Stance triggered else if(sc->data[SC_READYDOWN] && sc_start(src,src,SC_COMBO, 15, TK_DOWNKICK, - (2000 - 4*sstatus->agi - 2*sstatus->dex))) - ; //Stance triggered + (2000 - 4*sstatus->agi - 2*sstatus->dex))); //Stance triggered else if(sc->data[SC_READYTURN] && sc_start(src,src,SC_COMBO, 15, TK_TURNKICK, - (2000 - 4*sstatus->agi - 2*sstatus->dex))) - ; //Stance triggered + (2000 - 4*sstatus->agi - 2*sstatus->dex))); //Stance triggered else if (sc->data[SC_READYCOUNTER]) { //additional chance from SG_FRIEND [Komurka] rate = 20; if (sc->data[SC_SKILLRATE_UP] && sc->data[SC_SKILLRATE_UP]->val1 == TK_COUNTER) { @@ -2646,9 +2643,6 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list * tsc= status_get_sc(bl); if (tsc && !tsc->count) tsc = NULL; //Don't need it. - // Is this check really needed? FrostNova won't hurt you if you step right where the caster is? - if(skill_id == WZ_FROSTNOVA && dsrc->x == bl->x && dsrc->y == bl->y) - return 0; //Trick Dead protects you from damage, but not from buffs and the like, hence it's placed here. if (tsc && tsc->data[SC_TRICKDEAD]) return 0;