Hi. I have a problem with the monster level. The point is that the summon is always 255 lvl, no matter if it's created by the player or by the monster
I think the problem is here
map.cpp
any idea ?
I think the problem is here
map.cpp
C++:
bool Map::placeCreature(const Position& centerPos, Creature* creature, bool extendedPos /*= false*/, bool forced /*= false*/)
{
Monster* monster = creature->getMonster();
if(monster && g_config.getBool(ConfigManager::MONSTER_HAS_LEVEL))
{
uint8_t level;
if(!monster->getMonsterType()->hideLevel)
{
if(monster->isSummon())
{
std::string value;
monster->getMaster()->getStorage((uint32_t)9999, value);
uint8_t intValue = atoi(value.c_str());
if(intValue || value == "0")
level = intValue;
else
level = 1;
}
else
level = monster->level;
char buffer [10];
monster->name = monster->getName() + " [LVL " + itoa(level, buffer, 10) + "]";
}
}
any idea ?