MCPcopy Create free account
hub / github.com/TurningWheel/Barony / alchemyCombinePotions

Method alchemyCombinePotions

src/interface/interface.cpp:9505–10355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9503}
9504
9505void GenericGUIMenu::alchemyCombinePotions()
9506{
9507 if ( !basePotion || !secondaryPotion )
9508 {
9509 return;
9510 }
9511
9512 bool tryDuplicatePotion = false;
9513 bool randomResult = false;
9514 bool explodeSelf = false;
9515 bool samePotion = false;
9516 const ItemType basePotionType = basePotion->type;
9517 const ItemType secondaryPotionType = secondaryPotion->type;
9518 ItemType result = alchemyMixResult(basePotion->type, secondaryPotion->type, randomResult, tryDuplicatePotion, samePotion, explodeSelf);
9519
9520 //switch ( basePotion->type )
9521 //{
9522 // case POTION_WATER:
9523 // if ( secondaryPotion->type == POTION_ACID )
9524 // {
9525 // explodeSelf = true;
9526 // }
9527 // else
9528 // {
9529 // tryDuplicatePotion = true;
9530 // }
9531 // break;
9532 // case POTION_BOOZE:
9533 // switch ( secondaryPotion->type )
9534 // {
9535 // case POTION_SICKNESS:
9536 // result = POTION_CONFUSION;
9537 // break;
9538 // case POTION_CONFUSION:
9539 // result = POTION_ACID;
9540 // break;
9541 // case POTION_CUREAILMENT:
9542 // result = POTION_SPEED;
9543 // break;
9544 // case POTION_BLINDNESS:
9545 // result = POTION_STRENGTH;
9546 // break;
9547 // case POTION_RESTOREMAGIC:
9548 // result = POTION_BLINDNESS;
9549 // break;
9550 // case POTION_SPEED:
9551 // result = POTION_PARALYSIS;
9552 // break;
9553 // case POTION_POLYMORPH:
9554 // randomResult = true;
9555 // break;
9556 // default:
9557 // break;
9558 // }
9559 // break;
9560 // case POTION_JUICE:
9561 // switch ( secondaryPotion->type )
9562 // {

Callers 1

updateAlchemyMenuMethod · 0.80

Calls 15

alchemyMixResultFunction · 0.85
messagePlayerColorFunction · 0.85
consumeItemFunction · 0.85
skillCapstoneUnlockedFunction · 0.85
playSoundPlayerFunction · 0.85
alchemyAddRecipeFunction · 0.85
sendPacketSafeFunction · 0.85
makeColorRGBFunction · 0.85
spawnMagicTowerFunction · 0.85
itemPickupFunction · 0.85
playSoundEntityLocalFunction · 0.85

Tested by

no test coverage detected