Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 09-04-2010, 04:36 PM
wheeljack
Fire Beetle
 
Join Date: Aug 2010
Posts: 18
Default COMMITTED Fix for missing tradeskill favorites

Problem: If you add the tradeskill favorite recipes A, B, C, then remove A, you can no longer see any of your favorites. If you add some other recipe D to your favorites, you can now see B, C, and D when you show your favorites. This is because when you remove a recipe it doesn't rearrange all the other favorites, it just makes the favorite slot unavailable.

Solution: Make the favorites requesting function loop over blank (aka 0 valued) entries in case there are "holes" in the request array.

Code:
Index: zone/client_packet.cpp
===================================================================
--- zone/client_packet.cpp	(revision 1639)
+++ zone/client_packet.cpp	(working copy)
@@ -5544,7 +5544,7 @@
 	//Assumes item IDs are <10 characters long
 	for(r = 0; r < 500; r++) { 
 		if(tsf->favorite_recipes[r] == 0)
-			break;	//assume the first 0 is the end...
+			continue; //what's sent in from the client can have holes in it, need to loop over them all
 
 		if(first) {
 			pos += snprintf(pos, 10, "%u", tsf->favorite_recipes[r]);
Reply With Quote
  #2  
Old 09-11-2010, 04:23 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Committed. Thanks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:01 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3