diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-09-19 18:37:21 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-09-20 00:10:28 -0300 |
commit | 59863921348e17a62f239685e14e6cd7568bf101 (patch) | |
tree | 892828ac2f297a14e901590b655af49911933593 | |
parent | 8245a269b1f611c93a87cd829d10f1846fe8f08c (diff) | |
download | hercules-59863921348e17a62f239685e14e6cd7568bf101.tar.gz hercules-59863921348e17a62f239685e14e6cd7568bf101.tar.bz2 hercules-59863921348e17a62f239685e14e6cd7568bf101.tar.xz hercules-59863921348e17a62f239685e14e6cd7568bf101.zip |
The Mana World modifications for Evolved Server.
******
commit a417c12ee435301498f2d4b162c7f849cefc302a
> Disable Official Walkpath and Partly reverts b5a92f944f126e920442307bebd3c2b53c9b0d54.
> Hopefully will reduce a bit the perceived lag. Official Walkpath only do something if path length > 14.
commit 373b7ffae57f3649cc7f5ecaae1c499833ddb816
> Reserve first char "~" for vault accounts.
commit 823d9ab3138e3d0a447bbf69b1df44bab603cb51
> CI: removed i386 support
commit 6e100e065272887f04ce5b2be03fa80b2c3621ee
commit ee34abef805262263e6d6a196ff0a4e1f5a72259
commit 3218f7ff3076ed390d71b5a6ec717ee96f3e4b85
> Rename command @hide to @invisible
commit d8576b040e4c1e0c2786a4d8472e8152bad57314
> Remove misceffect()
commit a141a20b3a34081e2c4e6eadd0588c47eec76f4e
> Disable renewal mode, while retaining some properties of it.
> It was done directly on server-code but it probably will work with CPPFLAGS.
Also squashes:
commit 719d697fed5bab40e0a2fae6372ecbf88bec16d3
commit fd1996fc83d4b2ab3d8d090ad99af1767fbbcaee
commit afa8255e16445721ac6d33c09934914cc27e019c
commit 08126b77ca9def4524e3d58a48e7943263b29222
commit 53cdeba6f32d786001e195aeb88e3b5814991b4f
-rw-r--r-- | .gitlab-ci.yml | 12 | ||||
-rw-r--r-- | src/config/core.h | 2 | ||||
-rw-r--r-- | src/config/renewal.h | 6 | ||||
-rw-r--r-- | src/login/login.c | 2 | ||||
-rw-r--r-- | src/map/atcommand.c | 4 | ||||
-rw-r--r-- | src/map/battle.c | 2 | ||||
-rw-r--r-- | src/map/script.c | 24 | ||||
-rw-r--r-- | src/map/unit.c | 7 |
8 files changed, 26 insertions, 33 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3d93d7029..c302e00f1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -304,7 +304,8 @@ zero-2018:gcc-8: - ./tools/ci/travis.sh build CC=gcc-8 --enable-debug --enable-Werror --enable-buildbot --enable-packetver-zero --enable-packetver=20180511 # - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST -re:gcc-8_i386: +# deprecated i386 +.re:gcc-8_i386: <<: *branch_exceptions <<: *prerequisites stage: primary @@ -319,7 +320,8 @@ re:gcc-8_i386: - ./tools/ci/travis.sh build CC=gcc-8 --enable-debug --enable-Werror --enable-buildbot # - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST -zero-2018:gcc-8_i386: +# deprecated i386 +.zero-2018:gcc-8_i386: <<: *branch_exceptions <<: *prerequisites stage: clients @@ -364,7 +366,8 @@ zero-2018:gcc-8_sanitize: - ./tools/ci/travis.sh build CC=gcc-8 --enable-debug --enable-Werror --enable-buildbot --disable-manager --enable-sanitize=full --enable-packetver-zero --enable-packetver=20180511 # - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST -re:gcc-8_i386_sanitize: +# deprecated i386 +.re:gcc-8_i386_sanitize: <<: *branch_exceptions <<: *prerequisites stage: secondary @@ -379,7 +382,8 @@ re:gcc-8_i386_sanitize: - ./tools/ci/travis.sh build CC=gcc-8 --enable-debug --enable-Werror --enable-buildbot --disable-manager --enable-sanitize=full # - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST -zero-2018:gcc-8_i386_sanitize: +# deprecated i386 +.zero-2018:gcc-8_i386_sanitize: <<: *branch_exceptions <<: *prerequisites stage: clients diff --git a/src/config/core.h b/src/config/core.h index b091e6dee..5e62e2adb 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -31,7 +31,7 @@ /// The official walkpath disables users from taking non-clear walk paths, /// e.g. if they want to get around an obstacle they have to walk around it, /// while with OFFICIAL_WALKPATH disabled if they click to walk around a obstacle the server will do it automatically -#define OFFICIAL_WALKPATH +//#define OFFICIAL_WALKPATH /// leave this line uncommented to enable callfunc checks when processing scripts. /// while allowed, the script engine will attempt to match user-defined functions diff --git a/src/config/renewal.h b/src/config/renewal.h index 3163a4134..48d1736f0 100644 --- a/src/config/renewal.h +++ b/src/config/renewal.h @@ -47,7 +47,7 @@ /// (disable by commenting the line) /// /// leave this line to enable renewal specific support such as renewal formulas -#define RENEWAL +//#define RENEWAL /// renewal cast time /// (disable by commenting the line) @@ -88,7 +88,7 @@ /// - it does NOT affect grimtooth /// - weapon and status ATK are increased /// - some skill's damage ratio has modified -#define RENEWAL_EDP +//#define RENEWAL_EDP /// renewal ASPD [malufett] /// @@ -97,7 +97,7 @@ /// - AGI has a greater factor in ASPD increase /// - there is a change in how skills/items give ASPD /// - some skill/item ASPD bonuses won't stack -#define RENEWAL_ASPD +//#define RENEWAL_ASPD #endif // DISABLE_RENEWAL #undef DISABLE_RENEWAL diff --git a/src/login/login.c b/src/login/login.c index 1a5c80679..c16dabf4e 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1021,6 +1021,8 @@ static int login_mmo_auth_new(const char *userid, const char *pass, const char s // check for invalid inputs if( sex != 'M' && sex != 'F' ) return 0; // 0 = Unregistered ID + if ( strncmp(userid, "~", strlen("~")) == 0 ) + return 0; // 0 = Unregistered ID // check if the account doesn't exist already if( accounts->load_str(accounts, &acc, userid) ) { diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 9fb2540ef..fc2d8a42e 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -960,7 +960,7 @@ ACMD(option) /*========================================== * *------------------------------------------*/ -ACMD(hide) +ACMD(invisible) { if (pc_isinvisible(sd)) pc->unhide(sd, true); @@ -10136,7 +10136,7 @@ static void atcommand_basecommands(void) ACMD_DEF(storage), ACMD_DEF(guildstorage), ACMD_DEF(option), - ACMD_DEF(hide), // + /hide + ACMD_DEF(invisible), // + /hide ACMD_DEF(jobchange), ACMD_DEF(kill), ACMD_DEF(alive), diff --git a/src/map/battle.c b/src/map/battle.c index 72c3d8963..4f4d43bc3 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7010,12 +7010,14 @@ static bool battle_check_range(struct block_list *src, struct block_list *bl, in if( src->m != bl->m ) return false; +/* [TMW2] Code removed - ManaPlus deals with squares, not circles. #ifndef CIRCULAR_AREA if( src->type == BL_PC ) { // Range for players' attacks and skills should always have a circular check. [Angezerus] if ( !check_distance_client_bl(src, bl, range) ) return false; } else #endif +*/ if( !check_distance_bl(src, bl, range) ) return false; diff --git a/src/map/script.c b/src/map/script.c index 9372299bb..7c03840c8 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -4416,7 +4416,8 @@ static void op_2num(struct script_state *st, int op, int i1, int i2) case C_LT: ret = (i1 < i2); break; case C_LE: ret = (i1 <= i2); break; case C_R_SHIFT: ret = i1>>i2; break; - case C_L_SHIFT: ret = i1<<i2; break; + case C_L_SHIFT: if (i1 < 0) { ShowError("Invalid left shift op=%s i1=%d i2=%d\n", script->op2name(op), i1, i2); script->reportsrc(st); script_pushnil(st); st->state = END; return; } else { ret = i1<<i2; } + break; case C_DIV: case C_MOD: if( i2 == 0 ) @@ -16073,25 +16074,6 @@ static BUILDIN(classchange) } /*========================================== - * Display an effect - *------------------------------------------*/ -static BUILDIN(misceffect) -{ - int type; - - type=script_getnum(st,2); - if(st->oid && st->oid != npc->fake_nd->bl.id) { - struct block_list *bl = map->id2bl(st->oid); - if (bl) - clif->specialeffect(bl,type,AREA); - } else { - struct map_session_data *sd = script->rid2sd(st); - if (sd != NULL) - clif->specialeffect(&sd->bl,type,AREA); - } - return true; -} -/*========================================== * Play a BGM on a single client [Rikter/Yommy] *------------------------------------------*/ static BUILDIN(playbgm) @@ -27486,7 +27468,7 @@ static void script_parse_builtin(void) BUILDIN_DEF(getskilllist,""), BUILDIN_DEF(clearitem,""), BUILDIN_DEF(classchange,"ii?"), - BUILDIN_DEF_DEPRECATED(misceffect,"i"), + //BUILDIN_DEF_DEPRECATED(misceffect,"i"), BUILDIN_DEF(playbgm,"s"), BUILDIN_DEF(playbgmall,"s?????"), BUILDIN_DEF(soundeffect,"si"), diff --git a/src/map/unit.c b/src/map/unit.c index fb6d992ae..c93a69be3 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -460,6 +460,7 @@ static int unit_walk_toxy_timer(int tid, int64 tick, int id, intptr_t data) timer->delete(ud->steptimer, unit->steptimer); ud->steptimer = INVALID_TIMER; } + /* [TMW2] Remove this, even if code is present on TMWA // Delay stepactions by half a step (so they are executed at full step) int timer_delay; if ((ud->walkpath.path[ud->walkpath.path_pos] & 1) != 0) @@ -467,6 +468,7 @@ static int unit_walk_toxy_timer(int tid, int64 tick, int id, intptr_t data) else timer_delay = status->get_speed(bl) / 2; ud->steptimer = timer->add(tick + timer_delay, unit->steptimer, bl->id, 0); + */ } if (ud->state.change_walk_target) { @@ -1572,7 +1574,8 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill } else if( src->type == BL_MER && skill_id == MA_REMOVETRAP ) { if( !battle->check_range(battle->get_master(src), target, range + 1) ) return 0; // Aegis calc remove trap based on Master position, ignoring mercenary O.O - } else if (!battle->check_range(src, target, range)) { + // [TMW2] Reintroduce the arbitrary +1 range bonus (reduces lag) + } else if (!battle->check_range(src, target, range +1)) { return 0; // Arrow-path check failed. } } @@ -2305,7 +2308,7 @@ static int unit_attack_timer_sub(struct block_list *src, int tid, int64 tick) } sstatus = status->get_status_data(src); - range = sstatus->rhw.range; + range = sstatus->rhw.range + 1; // [TMW2] Extra range for anti-lag if( (unit->is_walking(target) || ud->state.step_attack) && (target->type == BL_PC || !map->getcell(target->m, src, target->x, target->y, CELL_CHKICEWALL))) |