comparison Items.cpp @ 377:243418228760

GetIdentifiedName
author Gloval
date Fri, 22 Feb 2013 22:27:45 +0400
parents c606cabd7cbf
children b509ef97807a
comparison
equal deleted inserted replaced
376:615e6b6f55c2 377:243418228760
75 { 75 {
76 v5 = 8; 76 v5 = 8;
77 *v3 = v5; 77 *v3 = v5;
78 return v5; 78 return v5;
79 } 79 }
80 v8 = v4->uAdditionalValue; 80 v8 = v4->uSpecEnchantmentType;
81 if ( v8 > 46 ) 81 if ( v8 > 46 )
82 { 82 {
83 v5 = 0; 83 v5 = 0;
84 *v3 = v5; 84 *v3 = v5;
85 return v5; 85 return v5;
182 182
183 183
184 //----- (00402F07) -------------------------------------------------------- 184 //----- (00402F07) --------------------------------------------------------
185 void ItemGen::Reset() 185 void ItemGen::Reset()
186 { 186 {
187 this->field_1A = 0; 187 this->uHolderPlayer = 0;
188 this->uAttributes = 0; 188 this->uAttributes = 0;
189 this->uNumCharges = 0; 189 this->uNumCharges = 0;
190 this->uAdditionalValue = 0; 190 this->uSpecEnchantmentType = 0;
191 this->_bonus_strength = 0; 191 this->_bonus_strength = 0;
192 this->_bonus_type = 0; 192 this->uEncantmentType = 0;
193 this->uItemID = 0; 193 this->uItemID = 0;
194 this->uBodyAnchor = 0; 194 this->uBodyAnchor = 0;
195 this->uExpireTime = 0i64; 195 this->uExpireTime = 0i64;
196 } 196 }
197 197
203 v2 = this->uAttributes; 203 v2 = this->uAttributes;
204 if ( v2 & ITEM_TEMP_BONUS ) 204 if ( v2 & ITEM_TEMP_BONUS )
205 { 205 {
206 if ( uTimePlayed > (signed __int64)this->uExpireTime ) 206 if ( uTimePlayed > (signed __int64)this->uExpireTime )
207 { 207 {
208 this->_bonus_type = 0; 208 this->uEncantmentType = 0;
209 LOBYTE(v2) = v2 & 0xF7; 209 LOBYTE(v2) = v2 & 0xF7;
210 this->uAdditionalValue = 0; 210 this->uSpecEnchantmentType = 0;
211 this->uAttributes = v2; 211 this->uAttributes = v2;
212 } 212 }
213 } 213 }
214 } 214 }
215 215
696 break; 696 break;
697 case 8: //material 697 case 8: //material
698 { 698 {
699 if ( !_strcmpi(test_string, "artifact") ) 699 if ( !_strcmpi(test_string, "artifact") )
700 { 700 {
701 pItems[item_counter].uMaterial = 1; 701 pItems[item_counter].uMaterial = MATERIAL_ARTEFACT;
702 break; 702 break;
703 } 703 }
704 if ( !_strcmpi(test_string, "relic") ) 704 if ( !_strcmpi(test_string, "relic") )
705 { 705 {
706 pItems[item_counter].uMaterial = 2; 706 pItems[item_counter].uMaterial = MATERIAL_RELIC;
707 break; 707 break;
708 } 708 }
709 if ( !_strcmpi(test_string, "special") ) 709 if ( !_strcmpi(test_string, "special") )
710 { 710 {
711 pItems[item_counter].uMaterial = 3; 711 pItems[item_counter].uMaterial = MATERIAL_SPECIAL;
712 break; 712 break;
713 } 713 }
714 pItems[item_counter].uMaterial = 0; 714 pItems[item_counter].uMaterial = MATERIAL_COMMON;
715 break;} 715 break;}
716 case 9: //ID/Rep/St 716 case 9: //ID/Rep/St
717 pItems[item_counter].uItemID_Rep_St=atoi(test_string); 717 pItems[item_counter].uItemID_Rep_St=atoi(test_string);
718 break; 718 break;
719 case 10: //Not identified name 719 case 10: //Not identified name
724 break; 724 break;
725 case 12: //VarA 725 case 12: //VarA
726 { 726 {
727 pItems[item_counter]._additional_value=0; 727 pItems[item_counter]._additional_value=0;
728 pItems[item_counter]._bonus_type=0; 728 pItems[item_counter]._bonus_type=0;
729 if (pItems[item_counter].uMaterial==3) 729 if (pItems[item_counter].uMaterial==MATERIAL_SPECIAL)
730 { 730 {
731 for(int ii=0; ii<24; ++ii) 731 for(int ii=0; ii<24; ++ii)
732 { 732 {
733 if (stricmp(test_string,pEnchantments[ii].pBonusStat)) 733 if (stricmp(test_string,pEnchantments[ii].pBonusStat))
734 { 734 {
749 } 749 }
750 750
751 break; 751 break;
752 } 752 }
753 case 13: //VarB 753 case 13: //VarB
754 if ((pItems[item_counter].uMaterial==3)&&(pItems[item_counter]._bonus_type)) 754 if ((pItems[item_counter].uMaterial==MATERIAL_SPECIAL)&&(pItems[item_counter]._bonus_type))
755 { 755 {
756 char b_s=atoi(test_string); 756 char b_s=atoi(test_string);
757 if (b_s) 757 if (b_s)
758 pItems[item_counter]._bonus_strength=b_s; 758 pItems[item_counter]._bonus_strength=b_s;
759 else 759 else
1190 ItemDesc *v2; // eax@1 1190 ItemDesc *v2; // eax@1
1191 1191
1192 v2 = &this->pItems[pItem->uItemID]; 1192 v2 = &this->pItems[pItem->uItemID];
1193 if ( v2->uMaterial == 3 ) 1193 if ( v2->uMaterial == 3 )
1194 { 1194 {
1195 pItem->_bonus_type = v2->_bonus_type; 1195 pItem->uEncantmentType = v2->_bonus_type;
1196 pItem->uAdditionalValue = v2->_additional_value; 1196 pItem->uSpecEnchantmentType = v2->_additional_value;
1197 pItem->_bonus_strength = v2->_bonus_strength; 1197 pItem->_bonus_strength = v2->_bonus_strength;
1198 } 1198 }
1199 } 1199 }
1200 1200
1201 //----- (00456D43) -------------------------------------------------------- 1201 //----- (00456D43) --------------------------------------------------------
1202 bool ItemsTable::_456D43_is_material_equals_3(ItemGen *pItem) 1202 bool ItemsTable::IsMaterialSpecial(ItemGen *pItem)
1203 { 1203 {
1204 return this->pItems[pItem->uItemID].uMaterial == 3; 1204 return this->pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL;
1205 } 1205 }
1206 1206
1207 //----- (00456D5E) -------------------------------------------------------- 1207 //----- (00456D5E) --------------------------------------------------------
1208 bool ItemsTable::_456D5E_is_some_material(ItemGen *pItem) 1208 bool ItemsTable::IsMaterialNonCommon(ItemGen *pItem)
1209 { 1209 {
1210 unsigned __int8 v2; // al@1 1210 unsigned __int8 v2; // al@1
1211 1211
1212 v2 = this->pItems[pItem->uItemID].uMaterial; 1212 v2 = this->pItems[pItem->uItemID].uMaterial;
1213 return v2 == 3 || v2 == 1 || v2 == 2; 1213 return v2 == MATERIAL_SPECIAL || v2 == MATERIAL_RELIC || v2 == MATERIAL_ARTEFACT;
1214 } 1214 }
1215 1215
1216 1216
1217 //----- (00453B3C) -------------------------------------------------------- 1217 //----- (00453B3C) --------------------------------------------------------
1218 void ItemsTable::LoadPotions() 1218 void ItemsTable::LoadPotions()
1383 int v4; // esi@5 1383 int v4; // esi@5
1384 unsigned int result; // eax@7 1384 unsigned int result; // eax@7
1385 1385
1386 v1 = this; 1386 v1 = this;
1387 uBaseValue = pItemsTable->pItems[this->uItemID].uValue; 1387 uBaseValue = pItemsTable->pItems[this->uItemID].uValue;
1388 if ( this->uAttributes & ITEM_TEMP_BONUS || pItemsTable->_456D5E_is_some_material(this) ) 1388 if ( this->uAttributes & ITEM_TEMP_BONUS || pItemsTable->IsMaterialNonCommon(this) )
1389 return uBaseValue; 1389 return uBaseValue;
1390 if ( v1->_bonus_type ) 1390 if ( v1->uEncantmentType )
1391 { 1391 {
1392 v3 = 100 * v1->_bonus_strength; 1392 v3 = 100 * v1->_bonus_strength;
1393 return uBaseValue + v3; 1393 return uBaseValue + v3;
1394 } 1394 }
1395 v4 = v1->uAdditionalValue; 1395 v4 = v1->uSpecEnchantmentType;
1396 if ( !v4 ) 1396 if ( !v4 )
1397 { 1397 {
1398 result = uBaseValue; 1398 result = uBaseValue;
1399 } 1399 }
1400 else 1400 else
1417 } 1417 }
1418 1418
1419 //----- (004564B3) -------------------------------------------------------- 1419 //----- (004564B3) --------------------------------------------------------
1420 const char *ItemGen::GetIdentifiedName() 1420 const char *ItemGen::GetIdentifiedName()
1421 { 1421 {
1422 ItemGen *v1; // esi@1 1422 unsigned __int8 equip_type;
1423 unsigned int v2; // eax@1 1423 const char *player_name;
1424 unsigned __int8 v3; // cl@1 1424 const char *nameModificator;
1425 char *v4; // edi@4 1425 const char *format_str;
1426 char v5; // al@6 1426
1427 const char *v6; // esi@8 1427 equip_type = pItemsTable->pItems[uItemID].uEquipType;
1428 int v7; // eax@15 1428 if ( (equip_type == EQUIP_REAGENT) || (equip_type == EQUIP_POTION) || (equip_type == EQUIP_GOLD) )
1429 const char *v9; // [sp-Ch] [bp-14h]@14 1429 {
1430 const char *v10; // [sp-8h] [bp-10h]@4 1430 sprintf(item__getname_buffer, "%s", pItemsTable->pItems[uItemID].pName);
1431 char *v11; // [sp-4h] [bp-Ch]@4 1431 return item__getname_buffer;
1432 1432 }
1433 v1 = this; 1433 sprintf(item__getname_buffer, "%s", pItemsTable->pItems[uItemID].pName);
1434 v2 = this->uItemID; 1434 if ( uItemID == ITEM_LICH_JAR ) //Lich Jar
1435 v3 = pItemsTable->pItems[v2].uEquipType; 1435 {
1436 if ( v3 >= EQUIP_REAGENT && (v3 <= EQUIP_POTION || v3 == EQUIP_GOLD) ) 1436 if ( (uHolderPlayer >0 )&& (uHolderPlayer <= 4) )
1437 {
1438 v11 = pItemsTable->pItems[v2].pName;
1439 v4 = item__getname_buffer;
1440 v10 = "%s";
1441 sprintf(v4, v10, v11);
1442 return v4;
1443 }
1444 v4 = item__getname_buffer;
1445 sprintf(item__getname_buffer, "%s", pItemsTable->pItems[v2].pName);
1446 if ( v1->uItemID == 601 )
1447 {
1448 v5 = v1->field_1A;
1449 if ( (unsigned __int8)v5 >= 1u )
1450 {
1451 if ( (unsigned __int8)v5 <= 4u )
1452 { 1437 {
1453 v6 = pPlayers[(unsigned __int8)v5]->pName; 1438 player_name = pPlayers[uHolderPlayer]->pName;
1454 strlen(pPlayers[(unsigned __int8)v5]->pName); 1439 strlen(player_name);
1455 v11 = (char *)v6; 1440 if ( player_name[strlen(player_name) - 1] == 's' )
1456 if ( v6[strlen(v6) - 1] == 115 ) 1441 format_str = pGlobalTXT_LocalizationStrings[655]; //"%s' Jar"
1457 v10 = pGlobalTXT_LocalizationStrings[655];
1458 else 1442 else
1459 v10 = pGlobalTXT_LocalizationStrings[654]; 1443 format_str = pGlobalTXT_LocalizationStrings[654]; //"%s's Jar"
1460 sprintf(v4, v10, v11); 1444 sprintf(item__getname_buffer, format_str, pPlayers[uHolderPlayer]->pName);
1461 return v4; 1445 return item__getname_buffer;
1462 } 1446 }
1463 } 1447 }
1464 } 1448 if ( !pItemsTable->IsMaterialNonCommon(this) )
1465 if ( !pItemsTable->_456D5E_is_some_material(v1) ) 1449 {
1466 { 1450 if ( uEncantmentType )
1467 if ( v1->_bonus_type )
1468 { 1451 {
1469 strcat(item__getname_buffer, " "); 1452 strcat(item__getname_buffer, " ");
1470 v9 = (const char *)*((unsigned int *)&pItemsTable->pItems[799].uEquipType + 5 * v1->_bonus_type); 1453 nameModificator = pItemsTable->pEnchantments[uEncantmentType-1].pOfName;
1471 } 1454 }
1472 else 1455 else
1473 { 1456 {
1474 v7 = v1->uAdditionalValue; 1457 if ( !uSpecEnchantmentType )
1475 if ( !v7 ) 1458 return item__getname_buffer;
1476 return v4; 1459 if ( uSpecEnchantmentType == 16 //Drain Hit Points from target.
1477 if ( v7 == 16 1460 || uSpecEnchantmentType == 39 //Double damage vs Demons.
1478 || v7 == 39 1461 || uSpecEnchantmentType == 40 //Double damage vs Dragons
1479 || v7 == 40 1462 || uSpecEnchantmentType == 45 //+5 Speed and Accuracy
1480 || v7 == 45 1463 || uSpecEnchantmentType == 56 //+5 Might and Endurance.
1481 || v7 == 56 1464 || uSpecEnchantmentType == 57 //+5 Intellect and Personality.
1482 || v7 == 57 1465 || uSpecEnchantmentType == 58 //Increased Value.
1483 || v7 == 58 1466 || uSpecEnchantmentType == 60 //+3 Unarmed and Dodging skills
1484 || v7 == 60 1467 || uSpecEnchantmentType == 61 //+3 Stealing and Disarm skills.
1485 || v7 == 61 1468 || uSpecEnchantmentType == 59 //Increased Weapon speed.
1486 || v7 == 59 1469 || uSpecEnchantmentType == 63 //Double Damage vs. Elves.
1487 || v7 == 63 1470 || uSpecEnchantmentType == 64 //Double Damage vs. Undead.
1488 || v7 == 64 1471 || uSpecEnchantmentType == 67 //Adds 5 points of Body damage and +2 Disarm skill.
1489 || v7 == 67 1472 || uSpecEnchantmentType == 68 ) //Adds 6-8 points of Cold damage and +5 Armor Class.
1490 || v7 == 68 ) 1473 { //enchantment and name positions inverted!
1491 { 1474 sprintf( item__getname_buffer, "%s %s",
1492 sprintf( 1475 pItemsTable->pSpecialEnchantments[uSpecEnchantmentType-1].pNameAdd,
1493 item__getname_buffer, 1476 pItemsTable->pItems[uItemID].pName);
1494 "%s %s", 1477 return item__getname_buffer;
1495 pItemsTable->pSpecialEnchantments[v7].pBonusStatement,
1496 pItemsTable->pItems[v1->uItemID].pName);
1497 return v4;
1498 } 1478 }
1499 strcat(item__getname_buffer, " "); 1479 strcat(item__getname_buffer, " ");
1500 v9 = pItemsTable->pSpecialEnchantments[v1->uAdditionalValue].pBonusStatement; 1480 nameModificator = pItemsTable->pSpecialEnchantments[uSpecEnchantmentType-1].pNameAdd;
1501 } 1481 }
1502 strcat(item__getname_buffer, v9); 1482 strcat(item__getname_buffer, nameModificator);
1503 } 1483 }
1504 return v4; 1484 return item__getname_buffer;
1505 } 1485 }
1506 1486
1507 1487
1508 //----- (00456620) -------------------------------------------------------- 1488 //----- (00456620) --------------------------------------------------------
1509 void ItemsTable::GenerateItem(int treasure_level, int a3, ItemGen *out_item) 1489 void ItemsTable::GenerateItem(int treasure_level, int a3, ItemGen *out_item)
1664 } 1644 }
1665 while ( v11 < v10 ); 1645 while ( v11 < v10 );
1666 } 1646 }
1667 if (pItems[v4->uItemID].uEquipType == EQUIP_POTION && v4->uItemID != ITEM_POTION_BOTTLE ) 1647 if (pItems[v4->uItemID].uEquipType == EQUIP_POTION && v4->uItemID != ITEM_POTION_BOTTLE )
1668 { 1648 {
1669 v4->_bonus_type = 0; 1649 v4->uEncantmentType = 0;
1670 v14 = 2; 1650 v14 = 2;
1671 do 1651 do
1672 { 1652 {
1673 v4->_bonus_type += rand() % 4 + 1; 1653 v4->uEncantmentType += rand() % 4 + 1;
1674 v15 = v4->_bonus_type; 1654 v15 = v4->uEncantmentType;
1675 --v14; 1655 --v14;
1676 } 1656 }
1677 while ( v14 ); 1657 while ( v14 );
1678 v4->_bonus_type = v15 * treasure_level; 1658 v4->uEncantmentType = v15 * treasure_level;
1679 } 1659 }
1680 } 1660 }
1681 else 1661 else
1682 { 1662 {
1683 v16 = 0; 1663 v16 = 0;
1707 v4->uItemID = 1; 1687 v4->uItemID = 1;
1708 if ( !v4->uItemID ) 1688 if ( !v4->uItemID )
1709 v4->uItemID = 1; 1689 v4->uItemID = 1;
1710 if (pItems[v4->uItemID].uEquipType == EQUIP_POTION && v4->uItemID != ITEM_POTION_BOTTLE) 1690 if (pItems[v4->uItemID].uEquipType == EQUIP_POTION && v4->uItemID != ITEM_POTION_BOTTLE)
1711 { 1691 {
1712 v4->_bonus_type = 0; 1692 v4->uEncantmentType = 0;
1713 v19 = 2; 1693 v19 = 2;
1714 do 1694 do
1715 { 1695 {
1716 v4->_bonus_type += rand() % 4 + 1; 1696 v4->uEncantmentType += rand() % 4 + 1;
1717 v15 = v4->_bonus_type; 1697 v15 = v4->uEncantmentType;
1718 --v19; 1698 --v19;
1719 } 1699 }
1720 while ( v19 ); 1700 while ( v19 );
1721 v4->_bonus_type = v15 * treasure_level; 1701 v4->uEncantmentType = v15 * treasure_level;
1722 } 1702 }
1723 } 1703 }
1724 if ( v4->uItemID == ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION 1704 if ( v4->uItemID == ITEM_SPELLBOOK_LIGHT_DIVINE_INTERVENTION
1725 && !(unsigned __int16)_449B57_test_bit(pParty->_award_bits, 239) ) 1705 && !(unsigned __int16)_449B57_test_bit(pParty->_award_bits, 239) )
1726 v4->uItemID = ITEM_SPELLBOOK_LIGHT_SUN_BURST; 1706 v4->uItemID = ITEM_SPELLBOOK_LIGHT_SUN_BURST;
1728 v4->uAttributes = 0; 1708 v4->uAttributes = 0;
1729 else 1709 else
1730 v4->uAttributes = 1; 1710 v4->uAttributes = 1;
1731 if ( pItems[v4->uItemID].uEquipType != EQUIP_POTION ) 1711 if ( pItems[v4->uItemID].uEquipType != EQUIP_POTION )
1732 { 1712 {
1733 v4->uAdditionalValue = 0; 1713 v4->uSpecEnchantmentType = 0;
1734 v4->_bonus_type = 0; 1714 v4->uEncantmentType = 0;
1735 } 1715 }
1736 v20 = pItems[v4->uItemID].uEquipType; 1716 v20 = pItems[v4->uItemID].uEquipType;
1737 if ( v20 <= EQUIP_BOW ) 1717 if ( v20 <= EQUIP_BOW )
1738 { 1718 {
1739 v37 = v5->uBonusChanceWpSpecial[v54]; 1719 v37 = v5->uBonusChanceWpSpecial[v54];
1765 return; 1745 return;
1766 if ( v25 < v24 || v23 % 100 < v24) 1746 if ( v25 < v24 || v23 % 100 < v24)
1767 { 1747 {
1768 v26 = rand() % 10;//v5->field_116D8[v5->pItems[v4->uItemID].uEquipType]; 1748 v26 = rand() % 10;//v5->field_116D8[v5->pItems[v4->uItemID].uEquipType];
1769 v27 = v4->uItemID; 1749 v27 = v4->uItemID;
1770 v4->_bonus_type = 0; 1750 v4->uEncantmentType = 0;
1771 for ( i = pEnchantments[0].to_item[pItems[v27].uEquipType + 1]; 1751 for ( i = pEnchantments[0].to_item[pItems[v27].uEquipType + 1];
1772 i < v26; 1752 i < v26;
1773 i += pEnchantments[v4->_bonus_type].to_item[pItems[v29].uEquipType + 1] ) 1753 i += pEnchantments[v4->uEncantmentType].to_item[pItems[v29].uEquipType + 1] )
1774 { 1754 {
1775 v29 = v4->uItemID; 1755 v29 = v4->uItemID;
1776 ++v4->_bonus_type; 1756 ++v4->uEncantmentType;
1777 } 1757 }
1778 ++v4->_bonus_type; 1758 ++v4->uEncantmentType;
1779 v30 = 10;// v5->field_116D8[2 * v54 + 12]; 1759 v30 = 10;// v5->field_116D8[2 * v54 + 12];
1780 v31 = rand(); 1760 v31 = rand();
1781 v32 = v4->_bonus_type - 1; 1761 v32 = v4->uEncantmentType - 1;
1782 v33 = v31 % 10;//(v5->field_116D8[2 * v54 + 13] - v30 + 1) + v30; 1762 v33 = v31 % 10;//(v5->field_116D8[2 * v54 + 13] - v30 + 1) + v30;
1783 v4->_bonus_strength = v33; 1763 v4->_bonus_strength = v33;
1784 if ( v32 == 21 || v32 == 22 || v32 == 23 ) 1764 if ( v32 == 21 || v32 == 22 || v32 == 23 )
1785 v4->_bonus_strength = v33 >> 1; 1765 v4->_bonus_strength = v33 >> 1;
1786 if ( v4->_bonus_strength <= 0 ) 1766 if ( v4->_bonus_strength <= 0 )
1880 v40 += 28; 1860 v40 += 28;
1881 } 1861 }
1882 while ( a2b < pSpecialEnchantments_count ); 1862 while ( a2b < pSpecialEnchantments_count );
1883 } 1863 }
1884 v45 = rand(); 1864 v45 = rand();
1885 v4->uAdditionalValue = *(uint *)Dst; 1865 v4->uSpecEnchantmentType = *(uint *)Dst;
1886 v46 = v45 % v39 + 1; 1866 v46 = v45 % v39 + 1;
1887 a2c = *((unsigned char *)&uAllItemsCount + 28 * (*(uint *)Dst + 1389) + pItems[v4->uItemID].uEquipType); 1867 a2c = *((unsigned char *)&uAllItemsCount + 28 * (*(uint *)Dst + 1389) + pItems[v4->uItemID].uEquipType);
1888 if ( a2c < v46 ) 1868 if ( a2c < v46 )
1889 { 1869 {
1890 for ( j = (int *)&Dst; ; j = (int *)v59 ) 1870 for ( j = (int *)&Dst; ; j = (int *)v59 )
1891 { 1871 {
1892 v48 = v4->uItemID; 1872 v48 = v4->uItemID;
1893 v49 = (int)(j + 1); 1873 v49 = (int)(j + 1);
1894 v59 = v49; 1874 v59 = v49;
1895 v50 = *(unsigned int *)v49; 1875 v50 = *(unsigned int *)v49;
1896 v4->uAdditionalValue = v50; 1876 v4->uSpecEnchantmentType = v50;
1897 a2c += *((unsigned char *)&uAllItemsCount + 28 * (v50 + 1389) + pItems[v48].uEquipType); 1877 a2c += *((unsigned char *)&uAllItemsCount + 28 * (v50 + 1389) + pItems[v48].uEquipType);
1898 if ( a2c >= v46 ) 1878 if ( a2c >= v46 )
1899 break; 1879 break;
1900 } 1880 }
1901 } 1881 }
1902 ++v4->uAdditionalValue; 1882 ++v4->uSpecEnchantmentType;
1903 } 1883 }
1904 1884
1905 //----- (004505CC) -------------------------------------------------------- 1885 //----- (004505CC) --------------------------------------------------------
1906 bool ItemGen::GenerateArtifact() 1886 bool ItemGen::GenerateArtifact()
1907 { 1887 {