Wednesday, January 23, 2019

The reason why *getmapxy uses UNITTYPE constants

Ever wonder why *getmapxy introduced a new constant using the same value as *getunittype ?

That reason is because I wanted to allow *getmapxy can retrieve the coordinate of the unit

You see, the *getunitdata script command can only return integer value,
thus the map name return as string is not recommended
- although *getmonsterinfo with MOB_NAME can return string while others return integer...
--- I wonder why aleos never think about it ?

And ... with my Pull Request merge, Hercules can do like this
however this cannot be done in rAthena

so rAthena has to stuck with *getunitdata
the worst thing is it doesn't return map name, it return map ID
and have to use another script command *mapid2name to turn map ID into map name



Update, it seems rAthena has updated *getmapxy script command, and changed UNITTYPE_ into BL_
however it still couldn't search with BL_MOB type, so it doesn't change much

External Links:

https://github.com/HerculesWS/Hercules/pull/871
https://github.com/rathena/rathena/issues/3100

No comments:

Post a Comment

Linux compiler error that never shown on Visual Studio

let's just admit Visual Studio sux ... ok ? right now, if you want to host a Private Ragnarok Online server, its just better to choose...