Mercurial > mm7
comparison Items.cpp @ 1989:33787c8938a5
Single and Two-handed ENUM
author | zipi |
---|---|
date | Sat, 02 Nov 2013 17:45:58 +0000 |
parents | 5fcf6023f9c3 |
children | d28d3c006077 |
comparison
equal
deleted
inserted
replaced
1988:7e2dd49832b5 | 1989:33787c8938a5 |
---|---|
547 break; | 547 break; |
548 case 4: //Equip Stat | 548 case 4: //Equip Stat |
549 { | 549 { |
550 if ( !_stricmp(test_string, "weapon") ) | 550 if ( !_stricmp(test_string, "weapon") ) |
551 { | 551 { |
552 pItems[item_counter].uEquipType = EQUIP_OFF_HAND; | 552 pItems[item_counter].uEquipType = EQUIP_SINGLE_HANDED; |
553 break; | 553 break; |
554 } | 554 } |
555 if ( !_stricmp(test_string, "weapon2") ) | 555 if ( !_stricmp(test_string, "weapon2") ) |
556 { | 556 { |
557 pItems[item_counter].uEquipType = EQUIP_MAIN_HAND; | 557 pItems[item_counter].uEquipType = EQUIP_TWO_HANDED; |
558 break; | 558 break; |
559 } | 559 } |
560 if ( !_stricmp(test_string, "weapon1or2") ) | 560 if ( !_stricmp(test_string, "weapon1or2") ) |
561 { | 561 { |
562 pItems[item_counter].uEquipType = EQUIP_OFF_HAND; | 562 pItems[item_counter].uEquipType = EQUIP_SINGLE_HANDED; |
563 break; | 563 break; |
564 } | 564 } |
565 if ( !(_stricmp(test_string, "missile")&&_stricmp(test_string, "bow"))) | 565 if ( !(_stricmp(test_string, "missile")&&_stricmp(test_string, "bow"))) |
566 { | 566 { |
567 pItems[item_counter].uEquipType = EQUIP_BOW; | 567 pItems[item_counter].uEquipType = EQUIP_BOW; |
1616 { | 1616 { |
1617 ITEM_EQUIP_TYPE requested_equip; | 1617 ITEM_EQUIP_TYPE requested_equip; |
1618 PLAYER_SKILL_TYPE requested_skill = PLAYER_SKILL_INVALID; | 1618 PLAYER_SKILL_TYPE requested_skill = PLAYER_SKILL_INVALID; |
1619 switch (uTreasureType) | 1619 switch (uTreasureType) |
1620 { | 1620 { |
1621 case 20: requested_equip = EQUIP_OFF_HAND; break; | 1621 case 20: requested_equip = EQUIP_SINGLE_HANDED; break; |
1622 case 21: requested_equip = EQUIP_ARMOUR; break; | 1622 case 21: requested_equip = EQUIP_ARMOUR; break; |
1623 case 22: requested_skill = PLAYER_SKILL_MISC; break; | 1623 case 22: requested_skill = PLAYER_SKILL_MISC; break; |
1624 case 23: requested_skill = PLAYER_SKILL_SWORD; break; | 1624 case 23: requested_skill = PLAYER_SKILL_SWORD; break; |
1625 case 24: requested_skill = PLAYER_SKILL_DAGGER; break; | 1625 case 24: requested_skill = PLAYER_SKILL_DAGGER; break; |
1626 case 25: requested_skill = PLAYER_SKILL_AXE; break; | 1626 case 25: requested_skill = PLAYER_SKILL_AXE; break; |
1767 out_item->uEnchantmentType = 0; | 1767 out_item->uEnchantmentType = 0; |
1768 } | 1768 } |
1769 //try get special enhansment | 1769 //try get special enhansment |
1770 switch (out_item->GetItemEquipType()) | 1770 switch (out_item->GetItemEquipType()) |
1771 { | 1771 { |
1772 case EQUIP_OFF_HAND: | 1772 case EQUIP_SINGLE_HANDED: |
1773 case EQUIP_MAIN_HAND : | 1773 case EQUIP_TWO_HANDED : |
1774 case EQUIP_BOW : | 1774 case EQUIP_BOW : |
1775 if ( !uBonusChanceWpSpecial[v6] ) | 1775 if ( !uBonusChanceWpSpecial[v6] ) |
1776 return; | 1776 return; |
1777 if ((rand() % 100)>=uBonusChanceWpSpecial[v6]) | 1777 if ((rand() % 100)>=uBonusChanceWpSpecial[v6]) |
1778 return; | 1778 return; |