diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-05-11 05:28:20 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-05-11 05:28:20 -0600 |
commit | 60b484ae49c375d4cdf174a203f952ec11431d4c (patch) | |
tree | e22cde5418b22b8e527f71ee958f75a71349602f /src | |
parent | 83f5b8b2e1cabe9e1871be381dd424f19b433eb1 (diff) | |
download | tmwa-60b484ae49c375d4cdf174a203f952ec11431d4c.tar.gz tmwa-60b484ae49c375d4cdf174a203f952ec11431d4c.tar.bz2 tmwa-60b484ae49c375d4cdf174a203f952ec11431d4c.tar.xz tmwa-60b484ae49c375d4cdf174a203f952ec11431d4c.zip |
Don't spam healing changes
Diffstat (limited to 'src')
-rw-r--r-- | src/map/map.h | 1 | ||||
-rw-r--r-- | src/map/pc.c | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/map/map.h b/src/map/map.h index abd4988..c1ec3a0 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -182,6 +182,7 @@ struct map_session_data { unsigned unbreakable_weapon : 1; unsigned unbreakable_armor : 1; unsigned infinite_autospell : 1; + unsigned heal_effect : 1; } special_state; int char_id, login_id1, login_id2, sex; unsigned char tmw_version; // tmw client version diff --git a/src/map/pc.c b/src/map/pc.c index 86e1c94..cf1e101 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5469,7 +5469,10 @@ int pc_itemheal(struct map_session_data *sd,int hp,int sp) pc_heal_quick_accumulate(hp, &sd->quick_regeneration_hp, sd->status.max_hp - sd->status.hp); - //clif_status_change(&sd->bl, SC_HEALING, 1); + if (!sd->special_state.heal_effect) { + sd->special_state.heal_effect = 1; + clif_status_change(&sd->bl, SC_HEALING, 1); + } hp = 0; } if (sp > 0) { @@ -7094,8 +7097,9 @@ static int pc_natural_heal_sub(struct map_session_data *sd,va_list ap) { int sp_bonus = pc_quickregenerate_effect(&sd->quick_regeneration_sp, sd->nhealsp); pc_itemheal_effect(sd, hp_bonus, sp_bonus); - } else if (!sd->quick_regeneration_hp.amount) { - //clif_status_change(&sd->bl, SC_HEALING, 0); + } else if (!sd->quick_regeneration_hp.amount && sd->special_state.heal_effect) { + sd->special_state.heal_effect = 0; + clif_status_change(&sd->bl, SC_HEALING, 0); } // -- moonsoul (if conditions below altered to disallow natural healing if under berserk status) |