GM Exploze
Member
- Joined
- Aug 6, 2014
- Messages
- 90
- Reaction score
- 8
Giving it 24 hours until Im done asking for help, Ill pay 10$ for a fix. If you want the money, send me an inbox message with your skype. We will chat about the problem, you can tell me why its happening; I'll send you the money then you can provide the fix.
When players conjure bolts/arrows/etc it will fill the 100 stack even if they have 0 cap to hold it.
The reason behind this is because the cap does not update after the first 10 stack is added to the backpack until the 100 stack is finished and the new 10 stack is added and changes cap. It's only then that the system realizes the player does not have enough cap to make more, I suppose if you filled a backpack with 10x bolts in each slot; then made bolts while having no cap - you could reach as many bolts as you can fill backpacks with 10x which makes this a serious bug.
@Ezzz said "That has to be a bug with spells.cpp / conjure spell, maybe when adding the ammunition to the player it's using internalAddThing instead of __addThing, will check."
This is the only addthing I could find in spells.cpp
uint32_t cid = env->addThing(creature);
Does anyone know the fix for the conjure spell bug? @Nottinghster maybe?
Link to OTHire; http://otland.net/threads/7-72-othire-0-0-1b-based-in-otserv-trunk-latest.212153/
Bump! Any help is appreciated.
Anyone have a clue on this? Should it be simply "uint32_t cid = env->__addThing(creature);" or what?
Edit, tried to compile with that edit but it didn't work just got this error.
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 member function âbool BaseSpell::internalExecuteCastSpell(Event*, Creature*, const LuaVariant&, bool&)â:
spells.cpp:192: error: âclass ScriptEnviromentâ has no member named â__addThingâ
make[1]: *** [spells.o] Error 1
When players conjure bolts/arrows/etc it will fill the 100 stack even if they have 0 cap to hold it.
The reason behind this is because the cap does not update after the first 10 stack is added to the backpack until the 100 stack is finished and the new 10 stack is added and changes cap. It's only then that the system realizes the player does not have enough cap to make more, I suppose if you filled a backpack with 10x bolts in each slot; then made bolts while having no cap - you could reach as many bolts as you can fill backpacks with 10x which makes this a serious bug.
@Ezzz said "That has to be a bug with spells.cpp / conjure spell, maybe when adding the ammunition to the player it's using internalAddThing instead of __addThing, will check."
This is the only addthing I could find in spells.cpp
uint32_t cid = env->addThing(creature);
Does anyone know the fix for the conjure spell bug? @Nottinghster maybe?
Link to OTHire; http://otland.net/threads/7-72-othire-0-0-1b-based-in-otserv-trunk-latest.212153/
Bump! Any help is appreciated.
Anyone have a clue on this? Should it be simply "uint32_t cid = env->__addThing(creature);" or what?
Edit, tried to compile with that edit but it didn't work just got this error.
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 member function âbool BaseSpell::internalExecuteCastSpell(Event*, Creature*, const LuaVariant&, bool&)â:
spells.cpp:192: error: âclass ScriptEnviromentâ has no member named â__addThingâ
make[1]: *** [spells.o] Error 1
Last edited: