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

Method getXPNeededWhenLevel

source/entities/CreatureDefinition.cpp:229–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229double CreatureDefinition::getXPNeededWhenLevel(unsigned int level) const
230{
231 // Return 0.0, meaning there is an error.
232 if (level < 1 || level > mXPTable.size())
233 {
234 // This should never happen
235 OD_LOG_ERR("class=" + getClassName() + ", level=" + Helper::toString(level) + ", max level=" + Helper::toString(mXPTable.size()));
236 return 0.0;
237 }
238
239 return mXPTable[level - 1];
240}
241
242CreatureDefinition::CreatureJob CreatureDefinition::creatureJobFromString(const std::string& s)
243{

Callers 1

checkLevelUpMethod · 0.80

Calls 1

toStringFunction · 0.50

Tested by

no test coverage detected