MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / OperateShrineWeird

Function OperateShrineWeird

Source/objects.cpp:2462–2489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2460}
2461
2462void OperateShrineWeird(Player &player)
2463{
2464 if (&player != MyPlayer)
2465 return;
2466
2467 if (!player.InvBody[INVLOC_HAND_LEFT].isEmpty() && player.InvBody[INVLOC_HAND_LEFT]._itype != ItemType::Shield)
2468 player.InvBody[INVLOC_HAND_LEFT]._iMaxDam++;
2469 if (!player.InvBody[INVLOC_HAND_RIGHT].isEmpty() && player.InvBody[INVLOC_HAND_RIGHT]._itype != ItemType::Shield)
2470 player.InvBody[INVLOC_HAND_RIGHT]._iMaxDam++;
2471
2472 for (Item &item : InventoryPlayerItemsRange { player }) {
2473 switch (item._itype) {
2474 case ItemType::Sword:
2475 case ItemType::Axe:
2476 case ItemType::Bow:
2477 case ItemType::Mace:
2478 case ItemType::Staff:
2479 item._iMaxDam++;
2480 break;
2481 default:
2482 break;
2483 }
2484 }
2485
2486 CalcPlrInv(player, true);
2487
2488 InitDiabloMsg(EMSG_SHRINE_WEIRD);
2489}
2490
2491void OperateShrineMagical(const Player &player)
2492{

Callers 1

OperateShrineFunction · 0.85

Calls 3

CalcPlrInvFunction · 0.85
InitDiabloMsgFunction · 0.85
isEmptyMethod · 0.80

Tested by

no test coverage detected