Issue information

Issue ID
#2780
Status
Invalid
Severity
None
Started
Hercules Elf Bot
Feb 17, 2009 18:39
Last Post
Hercules Elf Bot
Apr 4, 2012 8:52
Confirmation
N/A

Hercules Elf Bot - Feb 17, 2009 18:39

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

In db/skill_nocast_db.txt, we have options where we can set bits as follows:
CODE
// Legend for 'Flag' field (bitmask):
//  1 = Cannot be used in normal maps
//  2 = Cannot be used in PvP maps (use this instead of 1 for PK-mode servers)
//  4 = Cannot be used in GvG maps
//  8 = Cannot be used when WoE is on
//  16 = Cannot be cloned (clones will not copy this skill)
//  Restricted zones - they're configured by 'restricted <number>' mapflag
//  32 = Cannot be used in zone 1 maps
//  64 = Cannot be used in zone 2 maps
//  128 = Cannot be used in zone 3 maps
//  256 = Cannot be used in zone 4 maps
//  512 = Cannot be used in zone 5 maps
//  1024 = Cannot be used in zone 6 maps
//  2048 = Cannot be used in zone 7 maps

The problem is, NONE of the bits (specifically the 1st three bits) will have any effect on maps with gvg_dungeon, making it impossible to control skill use on those maps.

Why? Because of this code in src/map/skill.c:

CODE
    // Check skill restrictions [Celest]
    if(!map_flag_vs(m) && skill_get_nocast (skillid) & 1)
        return 1;
    if(map[m].flag.pvp && skill_get_nocast (skillid) & 2)
        return 1;
    if(map_flag_gvg(m) && skill_get_nocast (skillid) & 4)
        return 1;


gvg_dungeon maps are included in map_flag_vs, so they are not a normal map
gvg_dungeon maps are not included in map_flag_gvg either


Perhaps "map[m].flag.pvp" should be changed to "map_flag_vs(m)"?

Hercules Elf Bot - Dec 9, 2011 5:11

Originally posted by [b]Ind[/b]
gvg_dungeon is neither of the above, you could use a zone for the gvg_dungeons you want.