Postado Maio 19, 2020 5 anos Autor 5 minutos atrás, DiegoRulez disse: @elitehox É no arquivo item.cpp Procura essa parte aqui: bool dot = true; if(it.isRune()) { if(!it.runeSpellName.empty()) s << "(\"" << it.runeSpellName << "\")"; if(it.runeLevel > 0 || it.runeMagLevel > 0 || (it.vocationString != "" && it.wieldInfo == 0)) { s << "." << std::endl << "It can only be used"; if(it.vocationString != "" && it.wieldInfo == 0) s << " by " << it.vocationString; bool begin = true; if(it.runeLevel > 0) { begin = false; s << " with level " << it.runeLevel; } if(it.runeMagLevel > 0) { begin = false; s << " " << (begin ? "with" : "and") << " magic level " << it.runeMagLevel; } if(!begin) s << " or higher"; } } Acredito que se você trocar pelo código abaixo, funcione: bool dot = true; if(it.isRune()) { if(!it.runeSpellName.empty()) s << "(\"" << it.runeSpellName << "\")"; if(it.runeLevel > 0 || it.runeMagLevel > 0 || (it.vocationString != "" && it.wieldInfo == 0)) { s << "." << std::endl << "It can only be used"; if(it.vocationString != "" && it.wieldInfo == 0) s << " by " << it.vocationString; bool begin = true; if(it.runeMagLevel > 0) { begin = false; s << " " << (begin ? "with" : "and") << " magic level " << it.runeMagLevel; } if(!begin) s << " or higher"; } } Se não funcionar, tenta o seguinte: bool dot = true; if(it.isRune()) { if(!it.runeSpellName.empty()) s << "(\"" << it.runeSpellName << "\")"; if(it.runeLevel > 0 || it.runeMagLevel > 0 || (it.vocationString != "" && it.wieldInfo == 0)) { s << "." << std::endl << "It can only be used"; if(it.vocationString != "" && it.wieldInfo == 0) s << " by " << it.vocationString; bool begin = true; if(it.runeLevel > 0) { begin = false; s << " with level " << it.runeLevel; } if(it.runeMagLevel > 0) { begin = false; s << " " << (begin ? "with") << " magic level " << it.runeMagLevel; } if(!begin) s << " or higher"; } } Se resolver, procura dar um REP+ ai e marcar a melhor resposta. vou testar aqui daq a pouco e dou um retorno. muito obrigado. se nao for pedir muito, poderia sinalizar no codigo as alteraçoes que voce fez? gosto de entender como a coisa funciona rsrs mais uma vez obrigado. Editado Maio 19, 2020 5 anos por elitehox (veja o histórico de edições)
Postado Maio 19, 2020 5 anos Solução Na primeira tentativa, eu removi o IF que fala sobre level: if(it.runeLevel > 0) { begin = false; s << " with level " << it.runeLevel; } Na segunda eu só removi o 'and' na seguinte linha s << " " << (begin ? "with" : "and") << " magic level " << it.runeMagLevel;
Postado Maio 19, 2020 5 anos Autor 1 hora atrás, DiegoRulez disse: @elitehox É no arquivo item.cpp Procura essa parte aqui: bool dot = true; if(it.isRune()) { if(!it.runeSpellName.empty()) s << "(\"" << it.runeSpellName << "\")"; if(it.runeLevel > 0 || it.runeMagLevel > 0 || (it.vocationString != "" && it.wieldInfo == 0)) { s << "." << std::endl << "It can only be used"; if(it.vocationString != "" && it.wieldInfo == 0) s << " by " << it.vocationString; bool begin = true; if(it.runeLevel > 0) { begin = false; s << " with level " << it.runeLevel; } if(it.runeMagLevel > 0) { begin = false; s << " " << (begin ? "with" : "and") << " magic level " << it.runeMagLevel; } if(!begin) s << " or higher"; } } Acredito que se você trocar pelo código abaixo, funcione: bool dot = true; if(it.isRune()) { if(!it.runeSpellName.empty()) s << "(\"" << it.runeSpellName << "\")"; if(it.runeLevel > 0 || it.runeMagLevel > 0 || (it.vocationString != "" && it.wieldInfo == 0)) { s << "." << std::endl << "It can only be used"; if(it.vocationString != "" && it.wieldInfo == 0) s << " by " << it.vocationString; bool begin = true; if(it.runeMagLevel > 0) { begin = false; s << " " << (begin ? "with" : "and") << " magic level " << it.runeMagLevel; } if(!begin) s << " or higher"; } } Se não funcionar, tenta o seguinte: bool dot = true; if(it.isRune()) { if(!it.runeSpellName.empty()) s << "(\"" << it.runeSpellName << "\")"; if(it.runeLevel > 0 || it.runeMagLevel > 0 || (it.vocationString != "" && it.wieldInfo == 0)) { s << "." << std::endl << "It can only be used"; if(it.vocationString != "" && it.wieldInfo == 0) s << " by " << it.vocationString; bool begin = true; if(it.runeLevel > 0) { begin = false; s << " with level " << it.runeLevel; } if(it.runeMagLevel > 0) { begin = false; s << " " << (begin ? "with") << " magic level " << it.runeMagLevel; } if(!begin) s << " or higher"; } } Se resolver, procura dar um REP+ ai e marcar a melhor resposta. infelizmente terminei de testar agora, o primeiro nao deu erro de compilação mas tb nao funcionou. o segundo deu esse log: TheForgottenServer build script- seems to speed things up ALOT. CCache: OK CCache binaries located in /usr/lib/ccache Building on 1 cores, using 2 processes make all-am make[1]: Entering directory `/root/src' g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-array-bounds -pthread -pipe -MT item.o -MD -MP -MF .deps/item.Tpo -c -o item.o item.cpp item.cpp: In static member function 'static std::string Item::getDescription(const ItemType&, int32_t, const Item*, int32_t, bool)': item.cpp:807:32: error: expected ':' before ')' token s << " " << (begin ? "with") << " magic level " << it.runeMagLevel; ^ item.cpp:807:32: error: expected primary-expression before ')' token make[1]: *** [item.o] Error 1 make[1]: Leaving directory `/root/src' make: *** [all] Error 2 EDIT ***************************************** problema resolvido substituindo a palavra "and" por "with". Obrigado @DiegoRulez, tava desde ontem revirando o ot todo e nao achava esse bendido rsrs. e a frase ficou correta: It can only be used with magic level 15 or higher. Editado Maio 19, 2020 5 anos por elitehox (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.