Browse Source

* Fixed party booking search not interpreting level 0 as 'all levels' and using level as upper rather than lower bound (bugreport:4537, since r14412).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14500 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 năm trước cách đây
mục cha
commit
68168bbf6d
2 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 1 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/party.c

+ 1 - 0
Changelog-Trunk.txt

@@ -1,6 +1,7 @@
 Date	Added
 
 2010/11/24
+	* Fixed party booking search not interpreting level 0 as 'all levels' and using level as upper rather than lower bound (bugreport:4537, since r14412). [Ai4rei]
 	* Display a message showing the user where to change MAX_ITEMDELAYS when they have too many entries in the item_delays db. Follow-up to r14455. [Paradox924X]
 	* Fixed pets with player sprites causing the client to crash while looking for non-existing resources (topic:260895, follow up to r14488). [Ai4rei]
 	* Fixed calls to pc_delautobonus assuming map_session_data::autobonus2 and map_session_data::autobonus3 arrays having the same size as map_session_data::autobonus (since r13915). [Ai4rei]

+ 1 - 1
src/map/party.c

@@ -1172,7 +1172,7 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid,
 	
 	for( pb_ad = (struct party_booking_ad_info*)iter->first(iter,NULL);	iter->exists(iter);	pb_ad = (struct party_booking_ad_info*)iter->next(iter,NULL) )
 	{
-		if (pb_ad->index < lastindex || (pb_ad->p_detail.level < level || pb_ad->p_detail.level-15 > level))
+		if (pb_ad->index < lastindex || (level && (pb_ad->p_detail.level < level-15 || pb_ad->p_detail.level > level)))
 			continue;
 		if (count >= 10){
 			more_result = true;