Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Melhoria no goback (quando desloga e quando morre) #41

Open
SuggestName opened this issue Nov 2, 2018 · 1 comment
Open

Melhoria no goback (quando desloga e quando morre) #41

SuggestName opened this issue Nov 2, 2018 · 1 comment

Comments

@SuggestName
Copy link

Acredito que podemos melhorar o goback no ondeath e onlogin fazendo uma pequena mudança de código,

no creature.cpp remover da função dropCorpse as linhas

Player* player = getPlayer(); if (player && player->getHisPokemon()) { Item* item = player->getInventoryItem(CONST_SLOT_POKEBALL); player->gobackPokemon(item); }

no protocolgame.cpp remover da função logout as linhas

if (player->getHisPokemon()) { Item* item = player->getInventoryItem(CONST_SLOT_POKEBALL); player->gobackPokemon(item); }

e no player.cpp na função onRemoveCreature adicionar o
Player* player = getPlayer(); if (player && player->getHisPokemon()) { Item* item = player->getInventoryItem(CONST_SLOT_POKEBALL); player->gobackPokemon(item); }

Nos meus testes essa pequena mudança funcionou e ajudou a organizar melhor o código

@Vinicius-rodrigues
Copy link

Projeto ainda continua?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants