comparison Items.cpp @ 1599:bb2378f58767

Player::GetItemsBonus removed majority of labels
author Grumpy7
date Tue, 10 Sep 2013 08:31:04 +0200
parents 9f8b3e904e14
children c58916c53d8e
comparison
equal deleted inserted replaced
1598:11bb463837b1 1599:bb2378f58767
254 { 254 {
255 this->uHolderPlayer = 0; 255 this->uHolderPlayer = 0;
256 this->uAttributes = 0; 256 this->uAttributes = 0;
257 this->uNumCharges = 0; 257 this->uNumCharges = 0;
258 this->uSpecEnchantmentType = 0; 258 this->uSpecEnchantmentType = 0;
259 this->_bonus_strength = 0; 259 this->m_enchantmentStrength = 0;
260 this->uEnchantmentType = 0; 260 this->uEnchantmentType = 0;
261 this->uItemID = 0; 261 this->uItemID = 0;
262 this->uBodyAnchor = 0; 262 this->uBodyAnchor = 0;
263 this->uExpireTime = 0i64; 263 this->uExpireTime = 0i64;
264 } 264 }
1253 { 1253 {
1254 if ( pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL ) 1254 if ( pItems[pItem->uItemID].uMaterial == MATERIAL_SPECIAL )
1255 { 1255 {
1256 pItem->uEnchantmentType = pItems[pItem->uItemID]._bonus_type; 1256 pItem->uEnchantmentType = pItems[pItem->uItemID]._bonus_type;
1257 pItem->uSpecEnchantmentType = pItems[pItem->uItemID]._additional_value; 1257 pItem->uSpecEnchantmentType = pItems[pItem->uItemID]._additional_value;
1258 pItem->_bonus_strength = pItems[pItem->uItemID]._bonus_strength; 1258 pItem->m_enchantmentStrength = pItems[pItem->uItemID]._bonus_strength;
1259 } 1259 }
1260 } 1260 }
1261 1261
1262 //----- (00456D43) -------------------------------------------------------- 1262 //----- (00456D43) --------------------------------------------------------
1263 bool ItemsTable::IsMaterialSpecial(ItemGen *pItem) 1263 bool ItemsTable::IsMaterialSpecial(ItemGen *pItem)
1442 1442
1443 uBaseValue = pItemsTable->pItems[this->uItemID].uValue; 1443 uBaseValue = pItemsTable->pItems[this->uItemID].uValue;
1444 if ( this->uAttributes & ITEM_TEMP_BONUS || pItemsTable->IsMaterialNonCommon(this) ) 1444 if ( this->uAttributes & ITEM_TEMP_BONUS || pItemsTable->IsMaterialNonCommon(this) )
1445 return uBaseValue; 1445 return uBaseValue;
1446 if (uEnchantmentType ) 1446 if (uEnchantmentType )
1447 return uBaseValue + 100 * _bonus_strength;; 1447 return uBaseValue + 100 * m_enchantmentStrength;;
1448 if (uSpecEnchantmentType ) 1448 if (uSpecEnchantmentType )
1449 { 1449 {
1450 bonus = pItemsTable->pSpecialEnchantments[uSpecEnchantmentType].iTreasureLevel; 1450 bonus = pItemsTable->pSpecialEnchantments[uSpecEnchantmentType].iTreasureLevel;
1451 if ( bonus > 10 ) 1451 if ( bonus > 10 )
1452 return uBaseValue + bonus; 1452 return uBaseValue + bonus;
1796 } while (v26>v27); 1796 } while (v26>v27);
1797 } 1797 }
1798 ++out_item->uEnchantmentType; 1798 ++out_item->uEnchantmentType;
1799 1799
1800 v33 = rand() % (bonus_ranges[v6].maxR - bonus_ranges[v6].minR + 1); 1800 v33 = rand() % (bonus_ranges[v6].maxR - bonus_ranges[v6].minR + 1);
1801 out_item->_bonus_strength = v33 + bonus_ranges[v6].minR; 1801 out_item->m_enchantmentStrength = v33 + bonus_ranges[v6].minR;
1802 v32 = out_item->uEnchantmentType - 1; 1802 v32 = out_item->uEnchantmentType - 1;
1803 if ( v32 == 21 || v32 == 22 || v32 == 23 ) //Armsmaster skill, Dodge skill, Unarmed skill 1803 if ( v32 == 21 || v32 == 22 || v32 == 23 ) //Armsmaster skill, Dodge skill, Unarmed skill
1804 out_item->_bonus_strength = out_item->_bonus_strength/2; 1804 out_item->m_enchantmentStrength = out_item->m_enchantmentStrength/2;
1805 if ( out_item->_bonus_strength <= 0 ) 1805 if ( out_item->m_enchantmentStrength <= 0 )
1806 out_item->_bonus_strength = 1; 1806 out_item->m_enchantmentStrength = 1;
1807 return; 1807 return;
1808 1808
1809 } 1809 }
1810 if ( !uBonusChanceSpecial[v6]) 1810 if ( !uBonusChanceSpecial[v6])
1811 return; 1811 return;