diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-27 14:42:17 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-27 14:42:17 +0000 |
commit | b3dae1ee6a703c8e42230d12b93929e48b75553f (patch) | |
tree | 82582277459e24395365ae5f61f944708cfe85bd | |
parent | f19f87054c9666877ad925f9d95d40ff7dc6c15e (diff) | |
download | hercules-b3dae1ee6a703c8e42230d12b93929e48b75553f.tar.gz hercules-b3dae1ee6a703c8e42230d12b93929e48b75553f.tar.bz2 hercules-b3dae1ee6a703c8e42230d12b93929e48b75553f.tar.xz hercules-b3dae1ee6a703c8e42230d12b93929e48b75553f.zip |
- Added config setting "party_hp_mode" (battle/party.conf) which determines method to use to update party-mate hp bars. Aegis style is to update HP bars whenever HP changes, while eAthena style is to update it together with the map party dots. Defaults to aegis style.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7920 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 4 | ||||
-rw-r--r-- | conf-tmpl/battle/party.conf | 5 | ||||
-rw-r--r-- | src/map/battle.c | 2 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/clif.c | 2 | ||||
-rw-r--r-- | src/map/party.c | 3 |
6 files changed, 16 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 25b21d436..ab52b6bec 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/07/27
+ * Added config setting "party_hp_mode" (battle/party.conf) which determines
+ method to use to update party-mate hp bars. Aegis style is to update HP
+ bars whenever HP changes, while eAthena style is to update it together with
+ the map party dots. Defaults to aegis style. [Skotlex]
* Fixed packet 0x22a having the manner and opt3 packets in inverted
offsets. [Skotlex]
* Readded the check which prevents Cloaking from activating when your
diff --git a/conf-tmpl/battle/party.conf b/conf-tmpl/battle/party.conf index 5be96b6ec..f8152e1ce 100644 --- a/conf-tmpl/battle/party.conf +++ b/conf-tmpl/battle/party.conf @@ -30,6 +30,11 @@ // If someone loots, show name in party? (Note 1)
show_steal_in_same_party: no
+// Method used to update party-mate hp-bars:
+// 0: Aegis - bar is updated every time HP changes (bandwidth intensive)
+// 1: eAthena - bar is updated with the party map dots (up to 1 second delay)
+party_hp_mode: 0
+
// When 'Party Share' item sharing is enabled in a party,
// tell the picker which party-member received the item? (Note 1)
show_party_share_picker: no
diff --git a/src/map/battle.c b/src/map/battle.c index 50bde0a58..f9a6a18c5 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3516,6 +3516,7 @@ static const struct battle_data_short { { "mob_npc_warp", &battle_config.mob_npc_warp }, { "dead_branch_active", &battle_config.dead_branch_active }, { "show_steal_in_same_party", &battle_config.show_steal_in_same_party }, + { "party_hp_mode", &battle_config.party_hp_mode }, { "show_party_share_picker", &battle_config.party_show_share_picker }, { "party_item_share_type", &battle_config.party_share_type }, { "mob_ghostring_fix", &battle_config.mob_ghostring_fix }, @@ -3930,6 +3931,7 @@ void battle_set_defaults() { battle_config.vending_max_value = 10000000; battle_config.show_steal_in_same_party = 0; battle_config.party_share_type = 0; + battle_config.party_hp_mode = 0; battle_config.party_show_share_picker = 0; battle_config.attack_attr_none = 0; battle_config.mob_ghostring_fix = 1; diff --git a/src/map/battle.h b/src/map/battle.h index 6e665f10f..259ae26e1 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -274,6 +274,7 @@ extern struct Battle_Config { unsigned int vending_max_value;
unsigned short show_steal_in_same_party;
unsigned short party_share_type;
+ unsigned short party_hp_mode;
unsigned short party_show_share_picker;
unsigned short mob_ghostring_fix;
unsigned short attack_attr_none;
diff --git a/src/map/clif.c b/src/map/clif.c index eeb866c43..671609279 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2679,6 +2679,8 @@ int clif_updatestatus(struct map_session_data *sd,int type) WFIFOL(fd,4)=sd->battle_status.hp;
if (battle_config.disp_hpmeter)
clif_hpmeter(sd);
+ if (!battle_config.party_hp_mode && sd->status.party_id)
+ clif_party_hp(sd);
break;
case SP_SP:
WFIFOL(fd,4)=sd->battle_status.sp;
diff --git a/src/map/party.c b/src/map/party.c index 490f5eb19..309995d9d 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -668,7 +668,8 @@ int party_send_xy_timer_sub(DBKey key,void *data,va_list ap) p->data[i].x = sd->bl.x;
p->data[i].y = sd->bl.y;
}
- if (p->data[i].hp != sd->battle_status.hp)
+ if (battle_config.party_hp_mode &&
+ p->data[i].hp != sd->battle_status.hp)
{
clif_party_hp(sd);
p->data[i].hp = sd->battle_status.hp;
|