Преглед изворни кода

Added ability to search broker for tinkered items. SQL update needed.

Devn00b пре 2 година
родитељ
комит
364f9ff210

+ 206 - 0
DB/updates/tinkered-items_july20_2022.sql

@@ -0,0 +1,206 @@
+ALTER TABLE `items` ADD COLUMN `tinkered` TINYINT(1) NOT NULL DEFAULT '0' AFTER `effect_type`;
+UPDATE items SET tinkered=1 WHERE NAME='%miscalibrated%';
+UPDATE items SET tinkered=1 WHERE NAME LIKE '%miscalibrated%';
+UPDATE items SET tinkered=1 WHERE NAME LIKE '%automated%';
+UPDATE items SET tinkered=1 WHERE NAME LIKE '%Calibrated%';
+UPDATE items SET tinkered=1 WHERE NAME LIKE '%Overclocked%';
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=9028;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=45002;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46503;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46502;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46500;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46433;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46499;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46515;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46514;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46513;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46512;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46511;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46510;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46508;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46507;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46506;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46504;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46505;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46516;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46654;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=155621;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=155631;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=155635;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=155643;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=155652;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=181705;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10045002;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046499;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046500;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046502;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046503;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046504;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046505;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046506;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046507;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046508;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046510;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046511;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046512;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046513;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046514;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046515;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046516;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046654;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10155621;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10155631;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10155635;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10155643;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10155652;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=9028;
+
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=155687;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=154346;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=180676;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=185002;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10154346;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10155687;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=174513;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10174513;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10180676;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47706;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047706;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47701;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=48982;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047701;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10048982;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46301;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046301;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046708;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46708;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=48161;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10048161;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046702;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46702;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=45927;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46628;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46812;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10045927;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046628;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046812;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47069;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047069;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046424;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46424;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=132721;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=147147;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=166369;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10132721;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10147147;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10166369;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=49139;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10049139;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=45528;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10045528;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046831;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46831;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10557;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10558;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10559;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47553;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47554;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47555;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47556;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47557;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47558;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47559;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47560;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47563;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47564;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47565;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47566;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47567;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47568;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047553;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047554;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047555;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047556;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047557;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047558;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047559;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047560;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047563;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047564;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047565;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047566;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047567;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047568;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10172622;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=172622;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46477;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046477;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46492;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046492;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046517;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46517;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046916;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46916;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046334;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46334;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047659;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47659;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046609;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46609;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046425;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46425;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046335;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46335;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047368;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47368;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046154;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46154;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046289;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46289;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10049148;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=49148;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10047968;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=47968;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10045311;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=45311;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46899;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046899;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=48552;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10048552;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=49163;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=49164;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=49165;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=49166;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10049163;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10049164;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10049165;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10049166;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=48550;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10048550;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46250;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=46251;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046250;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046251;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10045461;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=45461;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=45527;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10045527;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=45768;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10045768;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10046629;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10048996;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=48996;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=50321;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=51680;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=53369;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10050321;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10051680;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10053369;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=140568;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=167761;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=175803;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10140568;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10167761;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10175803;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=10048397;
+UPDATE `eq2emu`.`items` SET `tinkered`='1' WHERE  `id`=48397;

+ 6 - 4
EQ2/source/WorldServer/Items/Items.cpp

@@ -305,7 +305,9 @@ vector<Item*>* MasterItemList::GetItems(string name, int64 itype, int64 ltype, i
 						break;
 					}
 					case ITEM_BROKER_TYPE_TINKERED:{
-						if(item->IsTinkered())
+						//this is handled by item->tinkered
+						//if(item->IsTinkered())
+						if(item->tinkered == 1)
 							should_add = true;
 						break;
 					}
@@ -1447,11 +1449,11 @@ bool Item::IsHarvest() {
 bool Item::IsBodyDrop() {
 	return generic_info.body_drop == 1;
 }
-
-bool Item::IsTradeskill(){
+//devn00b: temp: this is now covered with item->crafted.
+/*bool Item::IsTradeskill(){
 	LogWrite(MISC__TODO, 1, "TODO", "Item Is Crafted\n\t(%s, function: %s, line #: %i)", __FILE__, __FUNCTION__, __LINE__);
 	return false;
-}
+}*/
 
 void Item::SetItemType(int8 in_type){
 	generic_info.item_type = in_type;

+ 2 - 1
EQ2/source/WorldServer/Items/Items.h

@@ -949,7 +949,8 @@ public:
 	std::time_t				created;
 	std::map<int32, bool>	grouped_char_ids;
 	ItemEffectType			effect_type;
-	int8 					crafted;
+	bool 					crafted;
+	bool					tinkered;
 	
 	void AddEffect(string effect, int8 percentage, int8 subbulletflag);
 	void AddBookPage(int8 page, string page_text,int8 valign, int8 halign);

+ 2 - 0
EQ2/source/WorldServer/Items/ItemsDB.cpp

@@ -223,6 +223,8 @@ void WorldDatabase::LoadDataFromRow(DatabaseResult* result, Item* item)
 	item->generic_info.transmuted_material		= result->GetInt8Str("transmuted_material");
 	
 	item->crafted = result->GetInt8Str("crafted");
+	item->tinkered = result->GetInt8Str("tinkered");
+	
 }
 
 int32 WorldDatabase::LoadSkillItems()