Issue information

Issue ID
#3982
Status
Fixed
Severity
Low
Started
Hercules Elf Bot
Dec 29, 2009 14:28
Last Post
Ind
Apr 16, 2013 6:37
Confirmation
N/A

Hercules Elf Bot - Dec 29, 2009 14:28

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

The skill_nocast_db was invented by Celest in r370. Its original purpose seemed to be to move the zone-specific skill behavior to a db file - normal maps, pvp maps, gvg maps, pk maps and woe time restrictions. The item_noequip file already existed by then, also only pvp and gvg support.

The restriction system was expanded by Komurka in r5115 by adding a restricted.txt db file. It expands on the bit stacking concept of the existing files, adding even more confusing notation as bit shifting has to be done to get the values to match.

Also note that there are various existing issues with the current restriction code:
bug #437 - apparently there's a numbering mismatch between the item and skill restriction files - same zone values have different meanings?
bug #2780 - restrictions not covering gvg_dungeon (undecided)
bug #2931 - multiple item restriction flags not stacking together
bug #3367 - bug/user confusion?

So, here are my thoughts and suggestions:

It is blatantly obvious that even though the original authors wrote the thing to be keyed by item/skill instead of zone number and used bit stacking, as time progressed, everybody, themselves included, started visually grouping the entries together by zone. Which of course makes much more sense. Forcing users to use values like 256 512 1024 is worse than using 4 5 6. And the whole "sum values up to assign to multiple zones at once" feature can be just discarded in favor of implicit stacking: you specify a skill 3 times in different zones, and it'll be restricted in those 3 zones.

Preliminary idea - something like packetdb.txt's packet version line tracking:
CODE
zone: 0      // normal maps
87           // no icewalling, it bugs the server
CG_HERMODE   // skilldb_name2id() magic at work, baby!

zone: 22     // some custom stuff
14

zone: 10     // we can list stuff out of order too!

zone: 12345  // parser will yell errors at us and will skip all skill entries until next zone

zone: 31     // max. supported zone number?

Perhaps something like the above.

This post has been edited by theultramage: Dec 29 2009, 06:30 AM

Ind - Apr 16, 2013 6:37

fixed by hercules' map zone db