Mercurial > mm7
comparison UI/UIPopup.cpp @ 1567:9f8b3e904e14
Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
author | Grumpy7 |
---|---|
date | Sun, 08 Sep 2013 05:22:33 +0200 |
parents | c4ab816fcc5e |
children | 43d3536a20f7 bb2378f58767 |
comparison
equal
deleted
inserted
replaced
1566:1e5086f7d401 | 1567:9f8b3e904e14 |
---|---|
280 if (pItemsTable->pItems[inspect_item->uItemID].uEquipType == EQUIP_GOLD) | 280 if (pItemsTable->pItems[inspect_item->uItemID].uEquipType == EQUIP_GOLD) |
281 v77 = inspect_item->uSpecEnchantmentType; | 281 v77 = inspect_item->uSpecEnchantmentType; |
282 if ( uActiveCharacter ) | 282 if ( uActiveCharacter ) |
283 { | 283 { |
284 //try to identify | 284 //try to identify |
285 if (!inspect_item->Identified()) | 285 if (!inspect_item->IsIdentified()) |
286 { | 286 { |
287 | 287 |
288 v11 = inspect_item; | 288 v11 = inspect_item; |
289 if ( pPlayers[uActiveCharacter]->CanIdentify(inspect_item) == 1 ) | 289 if ( pPlayers[uActiveCharacter]->CanIdentify(inspect_item) == 1 ) |
290 inspect_item->SetIdentified(); | 290 inspect_item->SetIdentified(); |
291 v83 = SPEECH_9; | 291 v83 = SPEECH_9; |
292 if ( !inspect_item->Identified() ) | 292 if ( !inspect_item->IsIdentified() ) |
293 { | 293 { |
294 ShowStatusBarString(pGlobalTXT_LocalizationStrings[446], 2u);//"Identify Failed" | 294 ShowStatusBarString(pGlobalTXT_LocalizationStrings[446], 2u);//"Identify Failed" |
295 } | 295 } |
296 else | 296 else |
297 { | 297 { |
304 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)(int)v83, 0); | 304 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)(int)v83, 0); |
305 dword_4E455C = 0; | 305 dword_4E455C = 0; |
306 } | 306 } |
307 } | 307 } |
308 inspect_item->UpdateTempBonus(pParty->uTimePlayed); | 308 inspect_item->UpdateTempBonus(pParty->uTimePlayed); |
309 if (inspect_item->Broken()) | 309 if (inspect_item->IsBroken()) |
310 { | 310 { |
311 if ( pPlayers[uActiveCharacter]->CanRepair(inspect_item) == 1 ) | 311 if ( pPlayers[uActiveCharacter]->CanRepair(inspect_item) == 1 ) |
312 inspect_item->uAttributes = inspect_item->uAttributes & 0xFFFFFFFD | 1; | 312 inspect_item->uAttributes = inspect_item->uAttributes & 0xFFFFFFFD | 1; |
313 v83 = SPEECH_11; | 313 v83 = SPEECH_11; |
314 if ( !inspect_item->Broken() ) | 314 if ( !inspect_item->IsBroken() ) |
315 v83 = SPEECH_10; | 315 v83 = SPEECH_10; |
316 else | 316 else |
317 ShowStatusBarString(pGlobalTXT_LocalizationStrings[448], 2u);//"Repair Failed" | 317 ShowStatusBarString(pGlobalTXT_LocalizationStrings[448], 2u);//"Repair Failed" |
318 if ( dword_4E455C ) | 318 if ( dword_4E455C ) |
319 { | 319 { |
323 } | 323 } |
324 } | 324 } |
325 //v13 = _this->uAttributes; | 325 //v13 = _this->uAttributes; |
326 //v14 = _this->Identified(); | 326 //v14 = _this->Identified(); |
327 //a2.y = inspect_item->Identified(); | 327 //a2.y = inspect_item->Identified(); |
328 if (inspect_item->Broken()) | 328 if (inspect_item->IsBroken()) |
329 { | 329 { |
330 wHintWindow.DrawMessageBox(0); | 330 wHintWindow.DrawMessageBox(0); |
331 //v15 = &; | 331 //v15 = &; |
332 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12, | 332 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12, |
333 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12, | 333 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12, |
335 wHintWindow.uFrameWidth -= 24; | 335 wHintWindow.uFrameWidth -= 24; |
336 wHintWindow.uFrameHeight -= 12; | 336 wHintWindow.uFrameHeight -= 12; |
337 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1; | 337 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1; |
338 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1; | 338 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1; |
339 pRenderer->DrawTransparentRedShade(wHintWindow.uFrameX + v78, v81 + wHintWindow.uFrameY + 30, v73); | 339 pRenderer->DrawTransparentRedShade(wHintWindow.uFrameX + v78, v81 + wHintWindow.uFrameY + 30, v73); |
340 if ( inspect_item->Identified()) | 340 if ( inspect_item->IsIdentified()) |
341 v16 = inspect_item->GetIdentifiedName(); | 341 v16 = inspect_item->GetIdentifiedName(); |
342 else | 342 else |
343 v16 = item_desc->pUnidentifiedName; | 343 v16 = item_desc->pUnidentifiedName; |
344 wHintWindow.DrawTitleText(pFontArrus, 0, 0xCu, var88, v16, 3u); | 344 wHintWindow.DrawTitleText(pFontArrus, 0, 0xCu, var88, v16, 3u); |
345 v17 = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[32], &wHintWindow, 0, 0); //"Broken Item" | 345 v17 = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[32], &wHintWindow, 0, 0); //"Broken Item" |
352 v73->Release(); | 352 v73->Release(); |
353 pIcons_LOD->SyncLoadedFilesCount(); | 353 pIcons_LOD->SyncLoadedFilesCount(); |
354 } | 354 } |
355 return; | 355 return; |
356 } | 356 } |
357 if (!inspect_item->Identified()) | 357 if (!inspect_item->IsIdentified()) |
358 { | 358 { |
359 wHintWindow.DrawMessageBox(0); | 359 wHintWindow.DrawMessageBox(0); |
360 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12, | 360 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12, |
361 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12, | 361 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12, |
362 wHintWindow.uFrameY + wHintWindow.uFrameHeight - 12); | 362 wHintWindow.uFrameY + wHintWindow.uFrameHeight - 12); |