Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4972
CODE
struct s_skill {
unsigned short id;
unsigned short lv;
unsigned short flag; // see enum e_skill_flag
};
The 'lv' member variable supports levels up to 65535 ('flag' too, in its own way). This struct is used in s_homunculus (16x), but more importantly, in mmo_charstatus (2536x). If the level tolerance was shrunk to 255, unsigned char could be used here, which would let the compiler reduce the entire structure size from 6 to 4 bytes. A quick test says that on a default setup, this would shave off 5kB, or about 13% of sizeof(mmo_charstatus), per player. This would allow larger storage/registry arrays, or a smaller memory footprint.