Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1071
During the development of various features, there was the need to store small bits of persistent information.
And instead of making a new database field somewhere, the developer(s) decided to exploit the script engine's globalreg table.
Currently I've found:
- jobchange_level - set when changing to 2nd job, only used by custom kafra express script
- PC_DIE_COUNTER - death count, used for serverside novice stat calculations
- TK_MISSION_ID and TK_MISSION_COUNT - used for tracking taekwon mission
- various star gladiator vars - store marked locations / monsters
- CLONE_SKILL and CLONE_SKILL_LV - the skill id/level of a plagiarized skill
- PC_LAST_DUEL_TIME - timestamp of last duel
- killerrid and killedrid - to let scripts know about kills/deaths
- ZENY_HACKER - some wtf variable
... is this really a good idea?
Some of them needn't be stored between logins at all (killerrid/killedrid).
Some of them are universal and should get a table column instead.
Some of them are only related to a single class, which would probably waste space. Yet, using script variables seems like a very bad design idea to me...