diff options
author | Led Mitz <smoothshifter@tuta.io> | 2023-08-28 23:45:06 +0000 |
---|---|---|
committer | Led Mitz <smoothshifter@tuta.io> | 2023-08-28 23:45:06 +0000 |
commit | 6b1fa57c42b1265626eece004b527b99dd0834f7 (patch) | |
tree | dd97a2f2b58e5af38f07a3c95469d08c4301bf19 /src | |
parent | e8fbc9c718ac01aa10ce82d5bfc58754e8ba1e13 (diff) | |
parent | c3ee6602842e60509342869a92eadf8cb4d0dc9e (diff) | |
download | tmwa-6b1fa57c42b1265626eece004b527b99dd0834f7.tar.gz tmwa-6b1fa57c42b1265626eece004b527b99dd0834f7.tar.bz2 tmwa-6b1fa57c42b1265626eece004b527b99dd0834f7.tar.xz tmwa-6b1fa57c42b1265626eece004b527b99dd0834f7.zip |
Merge branch 'magic_delay' into 'master'
Revert magic attack delay to original behaviour
See merge request legacy/tmwa!250
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pc.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 63c7614..d496c5f 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -1106,10 +1106,11 @@ void pc_set_weapon_look(dumb_ptr<map_session_data> sd) * Actively changed parameters should be send on their own * * First is a bitmask - * &1 = ? - * &2 = ? - * &4 = ? - * &8 = magic override + * &0 = Status Recalculation | ステータス再計算 + * &1 = Status initial calculation, etc.| ステータス初期計算など + * &2 = Recalculate item bonus (used in pc_checkitem but not handled in this function atm, so if function is called with first = 2 its basically first = 0 only) + * &4 = Status Recalculation but don't use any clif_updatestatus to send status to client (used by map_quit) + * &8 = magic override (used in pc_set_attack_info) *------------------------------------------ */ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first) @@ -1556,14 +1557,13 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first) sd->speed_cap = interval_t::zero(); if (sd->speed < sd->speed_cap) sd->speed = sd->speed_cap; + if (aspd_rate != 100) + sd->aspd = sd->aspd * aspd_rate / 100; /* Magic speed */ if (sd->attack_spell_override || first & 8) sd->aspd = sd->attack_spell_delay; - if (aspd_rate != 100) - sd->aspd = sd->aspd * aspd_rate / 100; - /* Red Threshold Calculation (TODO) */ if (sd->aspd < 300_ms) { sd->aspd = 300_ms + ((sd->aspd - 300_ms) * 20 / 20); @@ -1581,12 +1581,12 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first) if (first & 4) return 0; - if (first & 3) + if (first & 3) // never executed atm { clif_updatestatus(sd, SP::SPEED); clif_updatestatus(sd, SP::MAXHP); clif_updatestatus(sd, SP::MAXSP); - if (first & 1) + if (first & 1) // its always 1 here if first is 3 so this if is not needed normally { clif_updatestatus(sd, SP::HP); clif_updatestatus(sd, SP::SP); |