From 29c67b8f54918d4cadc174805be14bcbd273051e Mon Sep 17 00:00:00 2001 From: Kisuka Date: Tue, 8 Mar 2011 12:44:53 +0000 Subject: - Added official behavior of displaying party names. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14737 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 1 + src/map/battle.h | 1 + src/map/clif.c | 18 ++++++++++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index ab5dbc102..f60be479a 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4011,6 +4011,7 @@ static const struct _battle_data { { "feature.search_stores", &battle_config.feature_search_stores, 1, 0, 1, }, { "searchstore_querydelay", &battle_config.searchstore_querydelay, 10, 0, INT_MAX, }, { "searchstore_maxresults", &battle_config.searchstore_maxresults, 30, 1, INT_MAX, }, + { "display_party_name", &battle_config.display_party_name, 0, 0, 1, }, // BattleGround Settings { "bg_update_interval", &battle_config.bg_update_interval, 1000, 100, INT_MAX, }, { "bg_short_attack_damage_rate", &battle_config.bg_short_damage_rate, 80, 0, INT_MAX, }, diff --git a/src/map/battle.h b/src/map/battle.h index 72b6be292..b2f33b73b 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -485,6 +485,7 @@ extern struct Battle_Config int feature_search_stores; int searchstore_querydelay; int searchstore_maxresults; + int display_party_name; // [BattleGround Settings] int bg_update_interval; diff --git a/src/map/clif.c b/src/map/clif.c index 1a12ca8aa..960a63c0e 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7653,8 +7653,13 @@ int clif_charnameack (int fd, struct block_list *bl) } memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH); - if (ssd->status.party_id > 0) - p = party_search(ssd->status.party_id); + if (!battle_config.display_party_name) { + if (ssd->status.party_id > 0 && ssd->status.guild_id > 0 && (g = guild_search(ssd->status.guild_id)) != NULL) + p = party_search(ssd->status.party_id); + }else{ + if (ssd->status.party_id > 0) + p = party_search(ssd->status.party_id); + } if( ssd->status.guild_id > 0 && (g = guild_search(ssd->status.guild_id)) != NULL ) { @@ -7769,8 +7774,13 @@ int clif_charnameupdate (struct map_session_data *ssd) memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH); - if( ssd->status.party_id > 0 ) - p = party_search(ssd->status.party_id); + if (!battle_config.display_party_name) { + if (ssd->status.party_id > 0 && ssd->status.guild_id > 0 && (g = guild_search(ssd->status.guild_id)) != NULL) + p = party_search(ssd->status.party_id); + }else{ + if (ssd->status.party_id > 0) + p = party_search(ssd->status.party_id); + } if( ssd->status.guild_id > 0 && (g = guild_search(ssd->status.guild_id)) != NULL ) { -- cgit v1.2.3-60-g2f50