Jump to content

Mapflag System Refactor


Aleos

Recommended Posts


  • Group:  Development Manager
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  732
  • Reputation:   525
  • Joined:  12/13/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  1167
  • Reputation:   159
  • Joined:  06/12/12
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Development Manager
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  732
  • Reputation:   525
  • Joined:  12/13/11
  • Last Seen:  

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...