diff options
author | shennetsind <ind@henn.et> | 2014-03-22 17:06:50 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-03-22 17:06:50 -0300 |
commit | 9ea7b143192568a259aa6e7e223420e8d5762b9e (patch) | |
tree | 4dcaa11b8fb9acb6922048e5f4bd411cf348f183 /src | |
parent | 7b71f22331c805a406c57f5a8eff93b464b57018 (diff) | |
download | hercules-9ea7b143192568a259aa6e7e223420e8d5762b9e.tar.gz hercules-9ea7b143192568a259aa6e7e223420e8d5762b9e.tar.bz2 hercules-9ea7b143192568a259aa6e7e223420e8d5762b9e.tar.xz hercules-9ea7b143192568a259aa6e7e223420e8d5762b9e.zip |
Fixed Bug 8107
feintbomb issue which could cause endless hiding.
Special Thanks to kyeme.
http://hercules.ws/board/tracker/issue-8107-feint-bomb-super-bug/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r-- | src/map/skill.c | 13 | ||||
-rw-r--r-- | src/map/status.c | 8 | ||||
-rw-r--r-- | src/map/status.h | 3 |
3 files changed, 15 insertions, 9 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 78f5fe3f1..5b4b79283 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10403,9 +10403,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case SC_FEINTBOMB: skill->unitsetting(src, skill_id, skill_lv, x, y, 0); // Set bomb on current Position clif->skill_nodamage(src, src, skill_id, skill_lv, 1); - if( skill->blown(src, src, 3 * skill_lv, unit->getdir(src), 0) && sc){ - sc->option |= OPTION_INVISIBLE; - clif->changeoption(src); + if( skill->blown(src, src, 3 * skill_lv, unit->getdir(src), 0) && sc) { + sc_start(src, src, SC__FEINTBOMB_MASTER, 100, 0, skill->get_unit_interval(SC_FEINTBOMB)); } break; @@ -15857,13 +15856,9 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) { case UNT_FEINTBOMB: { struct block_list *src = map->id2bl(group->src_id); - if( src ){ - struct status_change *sc = status->get_sc(src); + if( src ) { map->foreachinrange(skill->area_sub, &group->unit->bl, su->range, splash_target(src), src, SC_FEINTBOMB, group->skill_lv, tick, BCT_ENEMY|SD_ANIMATION|1, skill->castend_damage_id); - if(sc){ - sc->option &= ~OPTION_INVISIBLE; - clif->changeoption(src); - } + status_change_end(src, SC__FEINTBOMB_MASTER, INVALID_TIMER); } skill->delunit(su); break; diff --git a/src/map/status.c b/src/map/status.c index 5c0dad8cb..ee72f0319 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -9386,6 +9386,10 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t sc->option |= OPTION_OKTOBERFEST; opt_flag |= 0x4; break; + case SC__FEINTBOMB_MASTER: + sc->option |= OPTION_INVISIBLE; + opt_flag |= 0x4; + break; default: opt_flag = 0; } @@ -10163,6 +10167,10 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const sc->option &= ~OPTION_OKTOBERFEST; opt_flag |= 0x4; break; + case SC__FEINTBOMB_MASTER: + sc->option &= ~OPTION_INVISIBLE; + opt_flag |= 0x4; + break; case SC_ORCISH: sc->option &= ~OPTION_ORCISH; break; diff --git a/src/map/status.h b/src/map/status.h index c0c6c63b7..e47c2b365 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -702,6 +702,9 @@ typedef enum sc_type { SC__MAELSTROM, SC__CHAOS, + + SC__FEINTBOMB_MASTER, + SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; // Official status change ids, used to display status icons on the client. |