diff options
author | HoraK-FDF <horak-fdf@web.de> | 2024-08-06 23:11:17 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-08-30 21:05:24 +0200 |
commit | 2af706705bf6dd3d147eb3b7f84fba3d3713a498 (patch) | |
tree | 4f186195d31042c05e8978ad864b40f03edde85d | |
parent | 587fc350d7ab825c2cb82bdb216694893d3a2413 (diff) | |
download | tmwa-2af706705bf6dd3d147eb3b7f84fba3d3713a498.tar.gz tmwa-2af706705bf6dd3d147eb3b7f84fba3d3713a498.tar.bz2 tmwa-2af706705bf6dd3d147eb3b7f84fba3d3713a498.tar.xz tmwa-2af706705bf6dd3d147eb3b7f84fba3d3713a498.zip |
sc_cooldown_sg, sc_slowmove, sc_cantmove
-rw-r--r-- | src/map/clif.cpp | 6 | ||||
-rw-r--r-- | src/map/pc.cpp | 10 | ||||
-rw-r--r-- | src/map/script-fun.cpp | 5 | ||||
-rw-r--r-- | src/map/skill.cpp | 6 | ||||
-rw-r--r-- | src/mmo/skill.t.hpp | 3 |
5 files changed, 26 insertions, 4 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 6381c09..4d36f17 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -3865,6 +3865,12 @@ RecvResult clif_parse_WalkToXY(Session *s, dumb_ptr<map_session_data> sd) if (bool(sd->opt1) && sd->opt1 != (Opt1::_stone6)) return rv; + if (sd->sc_data[StatusChange::SC_CANTMOVE].timer) + { + pc_stop_walking(sd, 1); // this is a little hack since client is a bit bugged and still moves several tiles and then gets reset to the position where status was triggered with this it only moves 1 pixel or so and gets set back + return rv; + } + if (sd->invincible_timer) pc_delinvincibletimer(sd); diff --git a/src/map/pc.cpp b/src/map/pc.cpp index d28dda4..df5423e 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -1122,7 +1122,7 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first) b_attackrange, b_matk1, b_matk2, b_mdef, b_mdef2; int b_base_atk; int bl; - int aspd_rate, refinedef = 0; + int aspd_rate, speed_rate, refinedef = 0; int str, dstr, dex; int b_pvpchannel = 0; @@ -1474,6 +1474,7 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first) } aspd_rate = sd->aspd_rate; + speed_rate = sd->speed_rate; //攻撃速度増加 | Increased attack speed @@ -1554,10 +1555,13 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first) if (sd->sc_data[StatusChange::SC_PHYS_SHIELD].timer) aspd_rate += sd->sc_data[StatusChange::SC_PHYS_SHIELD].val1; + + if (sd->sc_data[StatusChange::SC_SLOWMOVE].timer) + speed_rate += sd->sc_data[StatusChange::SC_SLOWMOVE].val1; } - if (sd->speed_rate != 100) - sd->speed = sd->speed * sd->speed_rate / 100; + if (speed_rate != 100) + sd->speed = sd->speed * speed_rate / 100; sd->speed = std::max(sd->speed, 1_ms); if (sd->speed_cap < interval_t::zero()) sd->speed_cap = interval_t::zero(); diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 74a70b3..3bbd369 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -3929,7 +3929,10 @@ void builtin_sc_start(ScriptState *st) case StatusChange::SC_COOLDOWN_ENCH: case StatusChange::SC_COOLDOWN_KOY: case StatusChange::SC_COOLDOWN_UPMARMU: - break; + case StatusChange::SC_COOLDOWN_SG: + case StatusChange::SC_SLOWMOVE: + case StatusChange::SC_CANTMOVE: + break; default: // work around old behaviour of: diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 87bbbda..65df758 100644 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -754,6 +754,7 @@ void skill_status_change_end(dumb_ptr<block_list> bl, StatusChange type, TimerDa case StatusChange::SC_MATKPOT: /* magic attack potion [Valaris] */ case StatusChange::SC_PHYS_SHIELD: case StatusChange::SC_HASTE: + case StatusChange::SC_SLOWMOVE: calc_flag = 1; break; @@ -765,6 +766,8 @@ void skill_status_change_end(dumb_ptr<block_list> bl, StatusChange type, TimerDa case StatusChange::SC_COOLDOWN_ENCH: case StatusChange::SC_COOLDOWN_KOY: case StatusChange::SC_COOLDOWN_UPMARMU: + case StatusChange::SC_COOLDOWN_SG: + case StatusChange::SC_CANTMOVE: break; /* option2 */ @@ -1031,6 +1034,7 @@ int skill_status_effect(dumb_ptr<block_list> bl, StatusChange type, case StatusChange::SC_HASTE: case StatusChange::SC_PHYS_SHIELD: case StatusChange::SC_MBARRIER: + case StatusChange::SC_SLOWMOVE: calc_flag = 1; break; case StatusChange::SC_HALT_REGENERATE: @@ -1043,6 +1047,8 @@ int skill_status_effect(dumb_ptr<block_list> bl, StatusChange type, case StatusChange::SC_COOLDOWN_ENCH: case StatusChange::SC_COOLDOWN_KOY: case StatusChange::SC_COOLDOWN_UPMARMU: + case StatusChange::SC_COOLDOWN_SG: + case StatusChange::SC_CANTMOVE: break; case StatusChange::SC_FLYING_BACKPACK: updateflag = SP::WEIGHT; diff --git a/src/mmo/skill.t.hpp b/src/mmo/skill.t.hpp index 782980c..25d7b3e 100644 --- a/src/mmo/skill.t.hpp +++ b/src/mmo/skill.t.hpp @@ -60,8 +60,11 @@ enum class StatusChange : uint16_t SC_COOLDOWN_ENCH = 76, // Enchanter cooldown SC_COOLDOWN_KOY = 77, // Koyntety cooldown SC_COOLDOWN_UPMARMU = 78, // Upmarmu cooldown + SC_COOLDOWN_SG = 79, // Stone Golem cooldown SC_POISON = 132, // bad; actually used + SC_SLOWMOVE = 133, // slows down movement + SC_CANTMOVE = 134, // stops all movement SC_ATKPOT = 185, // item script SC_MATKPOT = 186, // unused, but kept for parallel |