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

Method getActionIconForPlayer

src/player.cpp:5341–5544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5339}
5340
5341const int Player::HUD_t::getActionIconForPlayer(ActionPrompts prompt, std::string& promptString) const
5342{
5343 if ( player.ghost.isActive() )
5344 {
5345 switch ( prompt )
5346 {
5347 case ACTION_PROMPT_MAGIC:
5348 if ( player.ghost.isSpiritGhost() )
5349 {
5350 promptString = Language::get(6879); // Return
5351 }
5352 else
5353 {
5354 promptString = Language::get(6047); // Haunt
5355 }
5356 break;
5357 case ACTION_PROMPT_MAINHAND:
5358 if ( player.ghost.isSpiritGhost() )
5359 {
5360 promptString = Language::get(6878); // Distract
5361 }
5362 else
5363 {
5364 promptString = Language::get(6046); // Chill
5365 }
5366 break;
5367 case ACTION_PROMPT_OFFHAND:
5368 promptString = Language::get(6048); // Push
5369 break;
5370 case ACTION_PROMPT_SNEAK:
5371 if ( player.ghost.isSpiritGhost() )
5372 {
5373 promptString = Language::get(6877); // Profile
5374 }
5375 else
5376 {
5377 promptString = Language::get(4077); // Sneak
5378 }
5379 break;
5380 default:
5381 break;
5382 }
5383 return -1;
5384 }
5385
5386 if ( prompt == ACTION_PROMPT_MAGIC )
5387 {
5388 promptString = Language::get(4078);
5389 return PRO_LEGACY_SPELLCASTING;
5390 }
5391
5392 bool shapeshifted = false;
5393 Monster playerRace = HUMAN;
5394
5395 if ( players[player.playernum]->entity )
5396 {
5397 playerRace = players[player.playernum]->entity->getMonsterFromPlayerRace(stats[player.playernum]->playerRace);
5398 if ( players[player.playernum]->entity->effectShapeshift != NOTHING )

Callers

nothing calls this directly

Calls 12

itemTypeIsInstrumentFunction · 0.85
getSpellFromIDFunction · 0.85
getSpellIDFromFociFunction · 0.85
getSpellIDFromSpellbookFunction · 0.85
itemTypeIsQuiverFunction · 0.85
getWeaponSkillFunction · 0.85
isSpiritGhostMethod · 0.80
bUseCompactGUIHeightMethod · 0.80
itemCategoryFunction · 0.70
itemTypeIsFociFunction · 0.70
isActiveMethod · 0.45

Tested by

no test coverage detected