Arcadius
Banned User
I have fixed the ammunition conjure bug not removing capacity from the player, it will be addressed to the public distribution on Monday.
But if you would like to fix it yourself:
Make public void updateInventoryWeight();
In spells.cpp, add player->updateInventoryWeight();
At true results / success conjures at:
bool ConjureSpell::ConjureItem(const ConjureSpell* spell, Creature* creature, const std::string& param)
And at
ReturnValue ConjureSpell::internalConjureItem(Player* player, uint32_t conjureId, uint32_t conjureCount)
And at
ReturnValue ConjureSpell::internalConjureItem(Player* player, uint32_t conjureId,
uint32_t conjureCount, uint32_t reagentId, slots_t slot, bool test /*= false*/)
As @Schmanky said, I had fixed most of the bugs reported here in the first test server that was ran months ago, but the server is so big it's literally hard for me to maintain the code and changes from my partner, so it can sometimes mess up / remove bug fixes.
Im currently editing "bool ConjureSpell::ConjureItem(const ConjureSpell* spell, Creature* creature, const std::string& param)"
So I have edited line 1887 to add: player->updateInventoryWeight();
I get this error:
Code:
make[1]: Warning: File `spells.cpp' has modification time 38 s in the future
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__USE_MYSQL__ -DSYSCONFDIR=\"/usr/local/etc\" -DPKGDATADIR=\"/usr/local/share/otserv\" -D_THREAD_SAFE -D__OLD_GUILD_SYSTEM__ -D_REENTRANT -Wall -g -O2 -MT spells.o -MD -MP -MF .deps/spells.Tpo -c -o spells.o spells.cpp
spells.cpp: In static member function ‘static bool ConjureSpell::ConjureItem(const ConjureSpell*, Creature*, const std::string&)’:
spells.cpp:1887: error: no matching function for call to ‘Player::updateInventoryWeight(ReturnValue)’
player.h:651: note: candidates are: void Player::updateInventoryWeight()
make[1]: *** [spells.o] Error 1
If I change to player->updateInventoryWeight(RET_NOERROR);
I get this error:
Code:
make[1]: Warning: File `spells.cpp' has modification time 37 s in the future
g++ -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -I/usr/include/lua5.1 -D__USE_MYSQL__ -DSYSCONFDIR=\"/usr/local/etc\" -DPKGDATADIR=\"/usr/local/share/otserv\" -D_THREAD_SAFE -D__OLD_GUILD_SYSTEM__ -D_REENTRANT -Wall -g -O2 -MT spells.o -MD -MP -MF .deps/spells.Tpo -c -o spells.o spells.cpp
player.h: In static member function ‘static bool ConjureSpell::ConjureItem(const ConjureSpell*, Creature*, const std::string&)’:
player.h:651: error: ‘void Player::updateInventoryWeight()’ is protected
spells.cpp:1887: error: within this context
make[1]: *** [spells.o] Error 1
Any ideas how to fix?