Преглед на файлове

Added ability to search 'Tradeskill' items from the broker

Devn00b преди 2 години
родител
ревизия
828b080559
променени са 3 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 1 1
      EQ2/source/WorldServer/Items/Items.cpp
  2. 1 0
      EQ2/source/WorldServer/Items/Items.h
  3. 2 1
      EQ2/source/WorldServer/Items/ItemsDB.cpp

+ 1 - 1
EQ2/source/WorldServer/Items/Items.cpp

@@ -310,7 +310,7 @@ vector<Item*>* MasterItemList::GetItems(string name, int64 itype, int64 ltype, i
 						break;
 					}
 					case ITEM_BROKER_TYPE_TRADESKILL:{
-						if(item->IsTradeskill())
+						if(item->crafted == 1)
 							should_add = true;
 						break;
 					}

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

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

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

@@ -174,7 +174,6 @@ void WorldDatabase::LoadDataFromRow(DatabaseResult* result, Item* item)
 	item->generic_info.display_charges			= result->GetInt8Str("display_charges");
 	item->generic_info.tradeskill_default_level	= result->GetInt16Str("tradeskill_default_level");
 
-
 	item->generic_info.adventure_classes		= result->GetInt64Str("adventure_classes");
 	item->generic_info.tradeskill_classes		= result->GetInt64Str("tradeskill_classes");
 
@@ -222,6 +221,8 @@ void WorldDatabase::LoadDataFromRow(DatabaseResult* result, Item* item)
 		strcpy(item->generic_info.required_by_quest_name,"");
 		
 	item->generic_info.transmuted_material		= result->GetInt8Str("transmuted_material");
+	
+	item->crafted = result->GetInt8Str("crafted");
 }
 
 int32 WorldDatabase::LoadSkillItems()