comparison UI/UIShops.cpp @ 2250:3cc3a29f073b

moved MerchandiseTest to ItemGen::MerchandiseTest
author Grumpy7
date Wed, 26 Feb 2014 01:26:22 +0100
parents 8c5855b842dc
children aff7a7b072b7
comparison
equal deleted inserted replaced
2249:708aa31cad56 2250:3cc3a29f073b
1538 v79 = ((pMouse->GetCursorPos(&cursor)->x - 14) >> 5) + 14 * ((pMouse->GetCursorPos(&cursor)->y - 17) >> 5); 1538 v79 = ((pMouse->GetCursorPos(&cursor)->x - 14) >> 5) + 14 * ((pMouse->GetCursorPos(&cursor)->y - 17) >> 5);
1539 if ( pMouse->GetCursorPos(&cursor)->x <= 13 1539 if ( pMouse->GetCursorPos(&cursor)->x <= 13
1540 || pMouse->GetCursorPos(&cursor)->x >= 462 1540 || pMouse->GetCursorPos(&cursor)->x >= 462
1541 || (v15 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v79), !v15) ) 1541 || (v15 = pPlayers[uActiveCharacter]->GetItemIDAtInventoryIndex((int *)&v79), !v15) )
1542 return; 1542 return;
1543 if ( MerchandiseTest(&pPlayers[uActiveCharacter]->pInventoryItemList[v15 - 1], (int)window_SpeakInHouse->ptr_1C) ) 1543 if ( pPlayers[uActiveCharacter]->pInventoryItemList[v15 - 1].MerchandiseTest((int)window_SpeakInHouse->ptr_1C) )
1544 { 1544 {
1545 dword_F8B1E4 = 1; 1545 dword_F8B1E4 = 1;
1546 pPlayers[uActiveCharacter]->SalesProcess(v79, v15 - 1, (int)window_SpeakInHouse->ptr_1C); 1546 pPlayers[uActiveCharacter]->SalesProcess(v79, v15 - 1, (int)window_SpeakInHouse->ptr_1C);
1547 viewparams->bRedrawGameUI = 1; 1547 viewparams->bRedrawGameUI = 1;
1548 pRenderer->ClearZBuffer(0, 479); 1548 pRenderer->ClearZBuffer(0, 479);
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 & ITEM_IDENTIFIED) ) 1567 if ( !(item->uAttributes & ITEM_IDENTIFIED) )
1568 { 1568 {
1569 if ( MerchandiseTest(item, (int)window_SpeakInHouse->ptr_1C) ) 1569 if ( item->MerchandiseTest((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);
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 & ITEM_BROKEN ) 1607 if ( item->uAttributes & ITEM_BROKEN )
1608 { 1608 {
1609 if ( MerchandiseTest(item, (int)window_SpeakInHouse->ptr_1C) ) 1609 if ( item->MerchandiseTest((int)window_SpeakInHouse->ptr_1C) )
1610 { 1610 {
1611 if ( pParty->uNumGold >= uPriceItemService ) 1611 if ( pParty->uNumGold >= uPriceItemService )
1612 { 1612 {
1613 dword_F8B1E4 = 1; 1613 dword_F8B1E4 = 1;
1614 Party::TakeGold(uPriceItemService); 1614 Party::TakeGold(uPriceItemService);