Kaynağa Gözat

- Added official behavior of displaying party names.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14737 54d463be-8e91-2dee-dedb-b68131a5f0ec
Kisuka 14 yıl önce
ebeveyn
işleme
91250a364c
4 değiştirilmiş dosya ile 20 ekleme ve 4 silme
  1. 4 0
      conf/battle/party.conf
  2. 1 0
      src/map/battle.c
  3. 1 0
      src/map/battle.h
  4. 14 4
      src/map/clif.c

+ 4 - 0
conf/battle/party.conf

@@ -59,3 +59,7 @@ idle_no_share: no
 // Give additional experience bonus per party-member involved on even-share parties?
 // (eg: If set to 10, a even-share party of 5 people will receive +40% exp)
 party_even_share_bonus: 0
+
+// Display party name regardless if player is in a guild.
+// Official servers do not display party name unless the user is in a guild. (Note 1)
+display_party_name: no

+ 1 - 0
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,        },

+ 1 - 0
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;

+ 14 - 4
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 )
 	{