comparison UI/UIShops.cpp @ 2092:a869b0376b48

enums and BLV_UpdateDoors()
author Ritor1
date Thu, 12 Dec 2013 13:55:42 +0600
parents 259df09dfb50
children e1e4a8a20b5f
comparison
equal deleted inserted replaced
2091:75edfa36c4de 2092:a869b0376b48
1353 if ( mouse.x > 13 && mouse.x < 462 ) 1353 if ( mouse.x > 13 && mouse.x < 462 )
1354 { 1354 {
1355 if ( pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v117) ) 1355 if ( pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v117) )
1356 { 1356 {
1357 item = &pPlayers[uActiveCharacter]->pInventoryItemList[pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v117) - 1]; 1357 item = &pPlayers[uActiveCharacter]->pInventoryItemList[pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v117) - 1];
1358 if ( item->uAttributes & 1 ) 1358 if ( item->uAttributes & ITEM_IDENTIFIED )
1359 { 1359 {
1360 dialog_window.DrawTitleText(pFontArrus, 0, (212 - pFontArrus->CalcTextHeight(BuildDialogueString("%24", uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 4, 0), &dialog_window, 0, 0)) / 2 + 101, 1360 dialog_window.DrawTitleText(pFontArrus, 0, (212 - pFontArrus->CalcTextHeight(BuildDialogueString("%24", uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 4, 0), &dialog_window, 0, 0)) / 2 + 101,
1361 Color16(255, 255, 255), BuildDialogueString("%24", uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 4, 0), 3); 1361 Color16(255, 255, 255), BuildDialogueString("%24", uActiveCharacter - 1, item, (char *)window_SpeakInHouse->ptr_1C, 4, 0), 3);
1362 return; 1362 return;
1363 } 1363 }
1562 pItemID = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v79); 1562 pItemID = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v79);
1563 if ( pItemID ) 1563 if ( pItemID )
1564 { 1564 {
1565 uPriceItemService = pPlayers[uActiveCharacter]->GetPriceIdentification(p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier); 1565 uPriceItemService = pPlayers[uActiveCharacter]->GetPriceIdentification(p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier);
1566 item = &pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1]; 1566 item = &pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1];
1567 if ( !(item->uAttributes & 1) ) 1567 if ( !(item->uAttributes & ITEM_IDENTIFIED) )
1568 { 1568 {
1569 if ( MerchandiseTest(item, (int)window_SpeakInHouse->ptr_1C) ) 1569 if ( MerchandiseTest(item, (int)window_SpeakInHouse->ptr_1C) )
1570 { 1570 {
1571 if ( pParty->uNumGold >= uPriceItemService ) 1571 if ( pParty->uNumGold >= uPriceItemService )
1572 { 1572 {
1573 dword_F8B1E4 = 1; 1573 dword_F8B1E4 = 1;
1574 Party::TakeGold(uPriceItemService); 1574 Party::TakeGold(uPriceItemService);
1575 item->uAttributes |= 1; 1575 item->uAttributes |= ITEM_IDENTIFIED;
1576 pPlayers[uActiveCharacter]->PlaySound(SPEECH_73, 0); 1576 pPlayers[uActiveCharacter]->PlaySound(SPEECH_73, 0);
1577 ShowStatusBarString(pGlobalTXT_LocalizationStrings[569], 2); 1577 ShowStatusBarString(pGlobalTXT_LocalizationStrings[569], 2);
1578 return; 1578 return;
1579 } 1579 }
1580 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)2); 1580 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)2);
1602 { 1602 {
1603 item = &pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1]; 1603 item = &pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1];
1604 pPriceMultiplier = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier; 1604 pPriceMultiplier = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier;
1605 ItemGen* _v = &pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1]; 1605 ItemGen* _v = &pPlayers[uActiveCharacter]->pInventoryItemList[pItemID - 1];
1606 uPriceItemService = pPlayers[uActiveCharacter]->GetPriceRepair(_v->GetValue(), pPriceMultiplier); 1606 uPriceItemService = pPlayers[uActiveCharacter]->GetPriceRepair(_v->GetValue(), pPriceMultiplier);
1607 if ( item->uAttributes & 2 ) 1607 if ( item->uAttributes & ITEM_BROKEN )
1608 { 1608 {
1609 if ( MerchandiseTest(item, (int)window_SpeakInHouse->ptr_1C) ) 1609 if ( MerchandiseTest(item, (int)window_SpeakInHouse->ptr_1C) )
1610 { 1610 {
1611 if ( pParty->uNumGold >= uPriceItemService ) 1611 if ( pParty->uNumGold >= uPriceItemService )
1612 { 1612 {