-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StaticFlags: Implement CreatureTypeFlags from StaticFlags #546
base: master
Are you sure you want to change the base?
Conversation
Alternatively to changing |
I had a look at how TrinityCore names the CreaturerTypeFlags and this confirmed that I got the flags correctly assigned, but their naming scheme is a bit different. Should I rename ours to match TC for easier compatibility? |
@@ -1316,41 +1316,44 @@ enum CreatureFamily | |||
CREATURE_FAMILY_SPIRIT_BEAST = 46 | |||
}; | |||
|
|||
namespace CreatureTypeFlags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do enum class instead of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the flag macro like settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that, but it caused all kinds of annoyances with not being able to implicitly cast it to integer, so I changed it to a separate namespace instead. I still think that is the cleanest solution that avoids the BS-ery that are flag enums in C++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put it into a separate commit so that if you don't want it, we can just drop the commit from the PR
🍰 Pullrequest
This PR implements adding CreatureTypeFlags from StaticFlags