Mercurial > mm7
comparison UI/UICharacter.cpp @ 2156:eaaaa50d34e9
GetItemBonusEnchantment
author | Ritor1 |
---|---|
date | Fri, 10 Jan 2014 17:42:37 +0600 |
parents | d28d3c006077 |
children | c6d8253d4cbc |
comparison
equal
deleted
inserted
replaced
2153:d28d3c006077 | 2156:eaaaa50d34e9 |
---|---|
2176 | 2176 |
2177 a2 = format_4E2E10; | 2177 a2 = format_4E2E10; |
2178 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 ) | 2178 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 ) |
2179 a2 = "%s\f%05u\t180%d\f00000 / %d\n"; | 2179 a2 = "%s\f%05u\t180%d\f00000 / %d\n"; |
2180 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | 2180 pY += LOBYTE(pFontArrus->uFontHeight) - 2; |
2181 int it = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY); | |
2181 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[29], | 2182 sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[29], |
2182 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)), | 2183 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)), |
2183 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)); | 2184 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)); |
2184 if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) == 200 ) | 2185 if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) == 200 ) |
2185 sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[29], | 2186 sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[29], |
2329 unsigned int v19; // eax@55 | 2330 unsigned int v19; // eax@55 |
2330 unsigned int v22; // eax@61 | 2331 unsigned int v22; // eax@61 |
2331 int v23; // eax@62 | 2332 int v23; // eax@62 |
2332 int v26; // eax@69 | 2333 int v26; // eax@69 |
2333 int v34; // esi@90 | 2334 int v34; // esi@90 |
2334 int v36; // esi@93 | |
2335 ItemGen *v38; // edi@93 | |
2336 ItemGen _this; // [sp+Ch] [bp-40h]@1 | 2335 ItemGen _this; // [sp+Ch] [bp-40h]@1 |
2337 unsigned int v48; // [sp+30h] [bp-1Ch]@88 | 2336 unsigned int v48; // [sp+30h] [bp-1Ch]@88 |
2338 unsigned int v50; // [sp+38h] [bp-14h]@50 | 2337 unsigned int v50; // [sp+38h] [bp-14h]@50 |
2339 int v51; // [sp+3Ch] [bp-10h]@1 | 2338 int v51; // [sp+3Ch] [bp-10h]@1 |
2340 int v52; // [sp+40h] [bp-Ch]@5 | 2339 int v52; // [sp+40h] [bp-Ch]@5 |
2341 ITEM_EQUIP_TYPE pEquipType; | 2340 ITEM_EQUIP_TYPE pEquipType; |
2341 CastSpellInfo *pSpellInfo; | |
2342 | 2342 |
2343 v51 = 0; | 2343 v51 = 0; |
2344 _this.Reset(); | 2344 _this.Reset(); |
2345 v1 = pPlayers[uActiveCharacter]->pEquipment.uMainHand; | 2345 v1 = pPlayers[uActiveCharacter]->pEquipment.uMainHand; |
2346 v2 = pPlayers[uActiveCharacter]->pEquipment.uShield; | 2346 v2 = pPlayers[uActiveCharacter]->pEquipment.uShield; |
2616 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) ) | 2616 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) ) |
2617 { | 2617 { |
2618 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); | 2618 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); |
2619 return; | 2619 return; |
2620 } | 2620 } |
2621 if ( v1 )//взять двуручный меч кода нет щита(замещение оружия) | 2621 if ( v1 )//взять двуручный меч когда нет щита(замещение оружия) |
2622 { | 2622 { |
2623 if ( v2 ) | 2623 if ( v2 ) |
2624 { | 2624 { |
2625 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); | 2625 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); |
2626 return; | 2626 return; |
2637 else | 2637 else |
2638 { | 2638 { |
2639 v52 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); | 2639 v52 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); |
2640 if ( v52 >= 0 ) | 2640 if ( v52 >= 0 ) |
2641 { | 2641 { |
2642 if ( v2 )//взять двуручный меч кода есть щит(замещение щитом) | 2642 if ( v2 )//взять двуручный меч когда есть щит(замещение щитом) |
2643 { | 2643 { |
2644 v2--; | 2644 v2--; |
2645 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | 2645 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); |
2646 pPlayers[uActiveCharacter]->pInventoryItemList[v2].uBodyAnchor = 0; | 2646 pPlayers[uActiveCharacter]->pInventoryItemList[v2].uBodyAnchor = 0; |
2647 pParty->pPickedItem.Reset(); | 2647 pParty->pPickedItem.Reset(); |
2670 } | 2670 } |
2671 | 2671 |
2672 v34 = pRenderer->pActiveZBuffer[pMouse->uMouseClickX + pSRZBufferLineOffsets[pMouse->uMouseClickY]] & 0xFFFF; | 2672 v34 = pRenderer->pActiveZBuffer[pMouse->uMouseClickX + pSRZBufferLineOffsets[pMouse->uMouseClickY]] & 0xFFFF; |
2673 if ( v34 ) | 2673 if ( v34 ) |
2674 { | 2674 { |
2675 v36 = v34 - 1; | 2675 //v36 = v34 - 1; |
2676 v38 = &pPlayers[uActiveCharacter]->pInventoryItemList[v36]; | 2676 //v38 = &pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1]; |
2677 pEquipType = v38->GetItemEquipType(); | 2677 pEquipType = pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].GetItemEquipType(); |
2678 if ( v38->uItemID == ITEM_WETSUIT ) | 2678 if ( pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].uItemID == ITEM_WETSUIT ) |
2679 { | 2679 { |
2680 if ( bUnderwater ) | 2680 if ( bUnderwater ) |
2681 { | 2681 { |
2682 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); | 2682 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); |
2683 return; | 2683 return; |
2684 } | 2684 } |
2685 WetsuitOff(uActiveCharacter); | 2685 WetsuitOff(uActiveCharacter); |
2686 } | 2686 } |
2687 if ( _50C9A0_IsEnchantingInProgress )//наложить закл на экипировку | 2687 if ( _50C9A0_IsEnchantingInProgress )//наложить закл на экипировку |
2688 { | 2688 { |
2689 *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu;//CastSpellInfo | 2689 /* *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu;//CastSpellInfo |
2690 *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1; | 2690 *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1; |
2691 *((int *)pGUIWindow_Settings->ptr_1C + 3) = v36; | 2691 *((int *)pGUIWindow_Settings->ptr_1C + 3) = v36; |
2692 *((short *)pGUIWindow_Settings->ptr_1C + 3) = pEquipType; | 2692 *((short *)pGUIWindow_Settings->ptr_1C + 3) = pEquipType;*/ |
2693 ptr_50C9A4_ItemToEnchant = v38; | 2693 pSpellInfo = (CastSpellInfo *)pGUIWindow_Settings->ptr_1C; |
2694 pSpellInfo->uFlags &= 0x7F; | |
2695 pSpellInfo->uPlayerID_2 = uActiveCharacter - 1; | |
2696 pSpellInfo->spell_target_pid = v34 - 1; | |
2697 pSpellInfo->field_6 = pEquipType; | |
2698 | |
2699 ptr_50C9A4_ItemToEnchant = &pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1]; | |
2694 _50C9A0_IsEnchantingInProgress = 0; | 2700 _50C9A0_IsEnchantingInProgress = 0; |
2695 if ( pMessageQueue_50CBD0->uNumMessages ) | 2701 if ( pMessageQueue_50CBD0->uNumMessages ) |
2696 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2702 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2697 pMouse->SetCursorBitmap("MICON1"); | 2703 pMouse->SetCursorBitmap("MICON1"); |
2698 _50C9D4_AfterEnchClickEventSecondParam = 0; | 2704 _50C9D4_AfterEnchClickEventSecondParam = 0; |
2701 } | 2707 } |
2702 else | 2708 else |
2703 { | 2709 { |
2704 if ( !ptr_50C9A4_ItemToEnchant )//снять вещь | 2710 if ( !ptr_50C9A4_ItemToEnchant )//снять вещь |
2705 { | 2711 { |
2706 pParty->SetHoldingItem(v38); | 2712 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1]); |
2707 pPlayers[uActiveCharacter]->pEquipment.pIndices[pPlayers[uActiveCharacter]->pInventoryItemList[v36].uBodyAnchor - 1] = 0; | 2713 pPlayers[uActiveCharacter]->pEquipment.pIndices[pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].uBodyAnchor - 1] = 0; |
2708 v38->Reset(); | 2714 pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].Reset(); |
2709 } | 2715 } |
2710 } | 2716 } |
2711 } | 2717 } |
2712 else//снять лук | 2718 else//снять лук |
2713 { | 2719 { |