MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / getSpellCooldownTurns

Method getSpellCooldownTurns

source/game/Player.cpp:159–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159uint32_t Player::getSpellCooldownTurns(SpellType spellType) const
160{
161 uint32_t spellIndex = static_cast<uint32_t>(spellType);
162 if(spellIndex >= mSpellsCooldown.size())
163 {
164 OD_LOG_ERR("seatId=" + Helper::toString(getId()) + ", spellType=" + SpellManager::getSpellNameFromSpellType(spellType));
165 return 0;
166 }
167
168 return mSpellsCooldown.at(spellIndex).mCooldownNbTurnPending;
169}
170
171float Player::getSpellCooldownSmooth(SpellType spellType) const
172{

Callers 1

Calls 1

toStringFunction · 0.70

Tested by

no test coverage detected