kenobi13

Joined: 3rd Jun 2009
Posts: 881
Level requirement patch (FIXED)
Hello, I've decided to release my small code to fix item level requirement.
in character.cpp in bool Character::Equip replace:
if (type == EIF::Armor && this->world->eif->Get(item)->gender != this->gender)
with:
if ((type == EIF::Armor && this->world->eif->Get(item)->gender != this->gender) || this->world->eif->Get(item)->levelreq > this->level)
And compile eoserv.
EDIT: Sorry, now the code should work
15 years, 13 weeks ago
|
batmaso
Joined: 30th Jan 2010
Posts: 21
Re: Level requirement patch
In member function 'bool Character::Equip(short int, unsigned char)':|
|607|error: base operand of '->' is not a pointer|
||=== Build finished: 1 errors, 0 warnings ===|
15 years, 13 weeks ago
|
kenobi13

Joined: 3rd Jun 2009
Posts: 881
Re: Level requirement patch
so you're using ond eoserv revision... This code should work for you: if ((type == EIF::Armor && this->world->eif->Get(item)->gender != this->gender) || item.levelreq > this->level)
15 years, 13 weeks ago
|
batmaso
Joined: 30th Jan 2010
Posts: 21
Re: Level requirement patch
No. When I tried your code and it gave me that, I searched google and it told me to replace -> with . and I tried it, and it didn't work then and it doesn't work now. I get this when trying to compile.
||=== eoserv, SQLITE ===|
\src\player.hpp||In member function 'bool Character::Equip(short int, unsigned char)':|
\src\player.hpp|607|error: request for member 'levelreq' in 'item', which is of non-class type 'short int'|
||=== Build finished: 1 errors, 0 warnings ===|
15 years, 13 weeks ago
|
kenobi13

Joined: 3rd Jun 2009
Posts: 881
Re: Level requirement patch
What eoserv rev have you got?
15 years, 13 weeks ago
|
batmaso
Joined: 30th Jan 2010
Posts: 21
Re: Level requirement patch
15 years, 13 weeks ago
|
kenobi13

Joined: 3rd Jun 2009
Posts: 881
Re: Level requirement patch
Damn, I haven't checked that code. I've made small mistake. Try now.
15 years, 13 weeks ago
|
King
Joined: 4th Feb 2010
Posts: 31
Re: Level requirement patch (FIXED)
Nice code, make sure everything is correct before you release it.
Dont mean to be an ass or anything, but it would help.
-Andy.
15 years, 13 weeks ago
|
batmaso
Joined: 30th Jan 2010
Posts: 21
Re: Level requirement patch (FIXED)
Awesome, everythings working fine now. Thanks a bunch.
15 years, 13 weeks ago
|
Re: Level requirement patch (FIXED)
fail if i set item to level 250. problem is if ur not level 250 you can stiil grab item an equip to paper doll even know ur not level 250 any ideas
15 years, 11 weeks ago
| | | | | | | | | | |