Browse Source

items table update flags_16384 -> no_transmute, flags2_256 -> no_salvage

image 3 years ago
parent
commit
f374cb4dd4

+ 2 - 0
DB/updates/items_table_update_aug22_2020.sql

@@ -0,0 +1,2 @@
+alter table items change column flags2_256 no_salvage tinyint(3) not null default '0';
+alter table items change column flags_16384 no_transmute tinyint(3) not null default '0';

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

@@ -1293,8 +1293,8 @@ bool Item::CheckFlag2(int32 flag){
 			value = FLAGS2_1024;
 		else if (flag_val >= FLAGS2_512)
 			value = FLAGS2_512;
-		else if (flag_val >= FLAGS2_256)
-			value = FLAGS2_256;
+		else if (flag_val >= NO_SALVAGE)
+			value = NO_SALVAGE;
 		else if (flag_val >= REFINED)
 			value = REFINED;
 		else if (flag_val >= ETHERAL)
@@ -1326,8 +1326,8 @@ bool Item::CheckFlag(int32 flag){
 	while(flag_val>0){
 		if (flag_val >= FLAGS_32768) //change this
 			value = FLAGS_32768;
-		else if (flag_val >= FLAGS_16384) //change this
-			value = FLAGS_16384;
+		else if (flag_val >= NO_TRANSMUTE) //change this
+			value = NO_TRANSMUTE;
 		else if (flag_val >= LORE_EQUIP) //change this
 			value = LORE_EQUIP;
 		else if (flag_val >= STACK_LORE) //change this

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

@@ -133,7 +133,7 @@ extern MasterItemList master_item_list;
 #define EVIL_ONLY		2048
 #define STACK_LORE		4096  
 #define LORE_EQUIP		8192  
-#define FLAGS_16384		16384
+#define NO_TRANSMUTE	16384
 #define FLAGS_32768		32768
 
 #define ORNATE			1
@@ -144,7 +144,7 @@ extern MasterItemList master_item_list;
 #define NO_REPAIR		32
 #define ETHERAL			64
 #define REFINED			128
-#define FLAGS2_256		256 //not used at this time
+#define NO_SALVAGE		256 //not used at this time
 #define FLAGS2_512		512//not used at this time
 #define FLAGS2_1024		1024//not used at this time
 #define FLAGS2_2048		2048//not used at this time

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

@@ -196,8 +196,8 @@ void WorldDatabase::LoadDataFromRow(DatabaseResult* result, Item* item)
 	if (result->GetInt8Str("lore_equip") == 1)
 		item->generic_info.item_flags += LORE_EQUIP;
 
-	if (result->GetInt8Str("flags_16384") == 1)
-		item->generic_info.item_flags += FLAGS_16384;
+	if (result->GetInt8Str("no_transmute") == 1)
+		item->generic_info.item_flags += NO_TRANSMUTE;
 
 	if (result->GetInt8Str("flags_32768") == 1)
 		item->generic_info.item_flags += FLAGS_32768;
@@ -226,8 +226,8 @@ void WorldDatabase::LoadDataFromRow(DatabaseResult* result, Item* item)
 	if (result->GetInt8Str("refined") == 1)
 		item->generic_info.item_flags2 += REFINED;
 
-	if (result->GetInt8Str("flags2_256") == 1)
-		item->generic_info.item_flags2 += FLAGS2_256;
+	if (result->GetInt8Str("no_salvage") == 1)
+		item->generic_info.item_flags2 += NO_SALVAGE;
 
 	
 

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

@@ -64,7 +64,7 @@ bool Transmute::ItemIsTransmutable(Item* item) {
 	//Item level > 0 AND Item is not LORE_EQUP, LORE, NO_VALUE etc AND item rarity is >= 5
 		//(4 is treasured but the rarity used for journeyman spells)
 	//I think flag 16384 is NO-TRANSMUTE but not positive
-	const int32 disqualifyFlags = NO_ZONE | NO_VALUE | TEMPORARY | NO_DESTROY | FLAGS_16384;
+	const int32 disqualifyFlags = NO_ZONE | NO_VALUE | TEMPORARY | NO_DESTROY | NO_TRANSMUTE;
 	const int32 disqualityFlags2 = ORNATE;
 	if (item->generic_info.adventure_default_level > 0
 		&& (item->generic_info.item_flags & disqualifyFlags) == 0