View Single Post
  #6  
Old 04-18-2010, 12:56 PM
Leere
Sarnak
 
Join Date: Sep 2008
Location: Home
Posts: 31
Default

Bit logic is evil when you're tired... *embarrassed* And Java breeds very stupid habits for datatypes in expressions... *headdesk*

Code:
--- zone\client_packet.cpp	Sun Apr 18 04:44:01 2010
+++ zone\client_packet.cpp
@@ -5295,7 +5295,7 @@
 		" LEFT JOIN tradeskill_recipe_entries AS tre ON tr.id=tre.recipe_id "
 		" LEFT JOIN (SELECT recipe_id, madecount FROM char_recipe_list WHERE char_id = %u) AS crl ON tr.id=crl.recipe_id " 
 		" WHERE tr.id IN (%s) "
-		"  AND tr.must_learn & 0x20 = 0 AND((tr.must_learn & 0x3 <> 0 AND crl.madecount IS NOT NULL) OR (tr.must_learn & 0x3 = 0)) "
+		"  AND tr.must_learn & 0x20 <> 0x20 AND ((tr.must_learn & 0x3 <> 0 AND crl.madecount IS NOT NULL) OR (tr.must_learn & 0x3 = 0)) "
 		" GROUP BY tr.id "
 		" HAVING sum(if(tre.item_id %s AND tre.iscontainer > 0,1,0)) > 0 "
 		" LIMIT 100 ", CharacterID(), buf, containers);
@@ -5350,7 +5350,7 @@
 		" LEFT JOIN tradeskill_recipe_entries AS tre ON tr.id=tre.recipe_id "
 		" LEFT JOIN (SELECT recipe_id, madecount FROM char_recipe_list WHERE char_id = %u) AS crl ON tr.id=crl.recipe_id "
 		" WHERE %s tr.trivial >= %u AND tr.trivial <= %u "
-		"  AND tr.must_learn & 0x20 = 0 AND ((tr.must_learn & 0x3 <> 0 AND crl.madecount IS NOT NULL) OR (tr.must_learn & 0x3 = 0)) "
+		"  AND tr.must_learn & 0x20 <> 0x20 AND((tr.must_learn & 0x3 <> 0 AND crl.madecount IS NOT NULL) OR (tr.must_learn & 0x3 = 0)) "
 		" GROUP BY tr.id "
 		" HAVING sum(if(tre.item_id %s AND tre.iscontainer > 0,1,0)) > 0 "
 		" LIMIT 200 "
Code:
--- zone\tradeskills.cpp	Sun Apr 18 04:44:01 2010
+++ zone\tradeskills.cpp
@@ -505,10 +505,11 @@
 		// Recipes that have either been made before or were
 		// explicitly learned are excempt from that limit
 		if (RuleB(Skills, UseLimitTradeskillSearchSkillDiff)) {
-			if ((trivial - GetSkill((SkillType)tradeskill)) > RuleI(Skills, MaxTradeskillSearchSkillDiff)
-				&& row[4] == NULL
-			)
+			if (((sint32)trivial - (sint32)GetSkill((SkillType)tradeskill)) > RuleI(Skills, MaxTradeskillSearchSkillDiff)
+				&& row[4] == NULL)
+			{
 				continue;
+			}
 		}
Reply With Quote