Jelajahi Sumber

- Cleaned up some more party_sub_count, so that idle_no_share will also disable people in a chat or vending from counting towards the total.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8827 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 18 tahun lalu
induk
melakukan
186f349ed7
1 mengubah file dengan 5 tambahan dan 4 penghapusan
  1. 5 4
      src/map/party.c

+ 5 - 4
src/map/party.c

@@ -823,11 +823,12 @@ int party_send_dot_remove(struct map_session_data *sd)
 // party_foreachsamemap(party_sub_count, sd, 0, &c);
 int party_sub_count(struct block_list *bl, va_list ap)
 {
-	if(((TBL_PC *)bl)->state.autotrade)
+	struct map_session_data *sd = (TBL_PC *)bl;
+
+	if (sd->state.autotrade)
 		return 0;
-		  
-	if(battle_config.idle_no_share &&
-		((TBL_PC *)bl)->idletime >= (last_tick - battle_config.idle_no_share))
+	
+	if (battle_config.idle_no_share && (sd->chatID || sd->vender_id || (sd->idletime < (last_tick - battle_config.idle_no_share))))
 		return 0;
 
 	return 1;