Issue information

Issue ID
#5097
Status
Fixed
Severity
Fair
Started
Hercules Elf Bot
Dec 2, 2011 23:30
Last Post
Hercules Elf Bot
Mar 15, 2012 13:16
Confirmation
Yes (4)
No (0)

Hercules Elf Bot - Dec 2, 2011 23:30

Originally posted by [b]Toshiro[/b]
[quote name='Toshiro' timestamp='1322860858' post='57532']
getmapflag does not return any value for MF_NOSAVE, MF_NOEXPPENALTY and maybe some other map flags. Therefore the server says you tried to use invalid data.
[/quote]Due to not getting a return value, it's not possible to check whether the mapflag is active or not.

Hercules Elf Bot - Dec 3, 2011 1:45

Originally posted by [b]FatalEror[/b]
search this line in [b]script.c[/b]
[CODE]
case MF_RESET: script_pushint(st,map[m].flag.reset); break;
[/CODE]


Add this below:
[CODE]
case MF_NOEXPPENALTY: script_pushint(st,map[m].flag.noexppenalty); break;
case MF_NOSAVE: script_pushint(st,map[m].flag.nosave); break;
[/CODE]

Haven't tested it, but it should be working...

Hercules Elf Bot - Dec 5, 2011 11:01

Originally posted by [b]Kenpachi[/b]
The whole mapflag thingy is messed up. I was bored and cleaned it.
I edited GetMapFlag(), SetMapFlag(), RemoveMapFlag() and the list in const.txt:

BTW, [i]struct map_flag[/i] (map.h) contains [i]src4instance[/i]. Shouldn't this be added to the rest of map flags?

Hercules Elf Bot - Dec 6, 2011 2:34

Originally posted by [b]Ind[/b]
src4instance only signs whether the map is used as a source for some instance, I don't see how knowing this information is useful, do you? -- e.g. knowing that 1@tower is used as a instance of z, x and y maps. Thank you for the diff, I'll get it applied and point all credits to you. Appreciate it very much.

Hercules Elf Bot - Dec 6, 2011 2:54

Originally posted by [b]Ind[/b]
Fixed in [rev=15011]

This post has been edited by Kenpachi on Mar 15, 2012 13:12