Fala Galera do xtibia!
estou tentando fazer um metodo para contar as pokeball que o player esta carregar e usar no carry system do server no metodo hasCapaticy da source player.cpp, porem o metodo que eu fiz essa fazendo o servidor crashar ao logar, gostaria de saber oque pode server
double PlayerpokemonCountIn(const Item* item) const{ double count = 0; if(item->getPokeball() >= 1) count += 1; const Container* container; if(container = item->getContainer()){ for(ContainerIterator it = container->begin(), end = container->end(); it != end; ++it) { if(it->getPokeball() >= 1){ count += 1; } } } return count;}
metodo getPokeball da source item.cpp
double Item::getPokeball() const{ if(isStackable()) return items[id].pokeball * std::max((int32_t)1, (int32_t)count); return items[id].pokeball;}
usou tfs 0.4 3777
desde já agradeço a ajuda de todos.
obs: o prefixo de topico nao possui 0.4 somente 0.3 ou tfs 1.x