Sign in to follow this  
Aleos

Mapflag System Refactor

Recommended Posts

Mapflag System Refactor
As of Git Hash: a942853, rAthena Mapflag System has been refactored for the future!

Features:

  • Perhaps the biggest benefit to this update is how easy it is to add new mapflags.
    • Adding a new boolean mapflag is as easy as defining a new enum value in the mapflag enum and creating a script constant! That's it!
    • More complex mapflags can be added to the setter with their own unique checks if required.
    • Everything is now consolidated to reduce redundancy that was all over the place which made adding new mapflags painful.
  • There are now getter and setter functions source side when interacting with mapflags.
  • Renamed mapflag nosumstarmiracle to nosunmoonstarmiracle.
  • Some things that are somewhat minimal but help memory utilization:
    • Mapflag pvp_nightmaredrop values are now stored as a vector.
    • Mapflag skill_damage values are now stored as a vector.
    • The global map index are now stored as a vector.

Thanks to @Lemongrass for a lot of help and @Secrets for tips!

Don't forget to leave comments and testing results! Thanks!

  • Upvote 6
  • Love 1
  • MVP 1

Share this post


Link to post
Share on other sites
6 hours ago, Aleos said:

Mapflag System Refactor
As of Git Hash: a942853, rAthena Mapflag System has been refactored for the future!

Features:

  • Perhaps the biggest benefit to this update is how easy it is to add new mapflags.
    • Adding a new boolean mapflag is as easy as defining a new enum value in the mapflag enum and creating a script constant! That's it!
    • More complex mapflags can be added to the setter with their own unique checks if required.
    • Everything is now consolidated to reduce redundancy that was all over the place which made adding new mapflags painful.
  • There are now getter and setter functions source side when interacting with mapflags.
  • Renamed mapflag nosumstarmiracle to nosunmoonstarmiracle.
  • Some things that are somewhat minimal but help memory utilization:
    • Mapflag pvp_nightmaredrop values are now stored as a vector.
    • Mapflag skill_damage values are now stored as a vector.
    • The global map index are now stored as a vector.

Thanks to @Lemongrass for a lot of help and @Secrets for tips!

Don't forget to leave comments and testing results! Thanks!

is there any changes to using mapflag in scripting?

Share this post


Link to post
Share on other sites

No, the script defines are exactly the same so you shouldn't have to worry about updating any custom scripts of yours.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this