Issue information

Issue ID
#4561
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Nov 22, 2010 5:01
Last Post
Hercules Elf Bot
Nov 22, 2010 5:01
Confirmation
N/A

Hercules Elf Bot - Nov 22, 2010 5:01

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4561

The file mob_race2_db.txt holds several "categories" of mobs, like goblins, kobolds, guardians. So far there's 6 of them.
Source- and script-wise, they don't have any enum/const values defined. Also, the sd->addrace2[] and sd->subrace2[] arrays use RC_MAX for their array size, which is just misleading. I suggest defining a RC2 enum right under the RC enum.
There's also the MAX_MOB_RACE_DB define (currently 6) - which should have been called MAX_MOB_RACE2_DB if anything - that could be replaced by this enum.
And finally, in SP_ADDRACE2 there are bounds checks done, but in SP_SUBRACE2 there are none.