Map Status IDs

03/06/2014 23:10 InsomniacPro#1
So if anyone could explain this system to me, I'd greatly appreciate it. I understand that each map has a flag which tells what is and is not allowed on the map. How do you give a map more than 1 of these attributes?
Example if I would like a map to not allow fly and be free pk. How does that work?
Code:
    
    public enum MapTypeFlags
    {
        Normal = 0,
        PkField = 1 << 0,
        ChangeMapDisable = 1 << 1,
        RecordDisable = 1 << 2,
        PkDisable = 1 << 3,
        BoothEnable = 1 << 4,
        TeamDisable = 1 << 5,
        TeleportDisable = 1 << 6,
        GuildMap = 1 << 7,
        PrisonMap = 1 << 8,
        FlyDisable = 1 << 9,
        Family = 1 << 10,
        MineEnable = 1 << 11,
        FreePk = 1 << 12,
        NeverWound = 1 << 13,
        DeadIsland = 1 << 14
    }
03/07/2014 14:48 abdoumatrix#2
check albertos (hellmouth)
i remember i see it there
03/07/2014 14:58 pro4never#3
Bit field - Wikipedia, the free encyclopedia

There you go.

Those enums are simply listing which bit is on/off. You use them to alter the bit field using basic operators.
03/07/2014 16:43 InsomniacPro#4
Quote:
Originally Posted by pro4never View Post
Bit field - Wikipedia, the free encyclopedia

There you go.

Those enums are simply listing which bit is on/off. You use them to alter the bit field using basic operators.
Understood, but for example. Creating a map and adding it to the database, an int is what defines the map rules. How would multiple characteristics be put into a single int?
03/07/2014 17:31 pro4never#5
Again, look at the link I posted.

Each digit in a binary string represents if an effect is on or off. Then convert that binary string to an integer (windows calculator ftw!) and you're good to go.

PS: Not sure if binary 'string' is really the right phrasing but it conveys the idea of how it works.
03/07/2014 18:34 InsomniacPro#6
Quote:
Originally Posted by pro4never View Post
Again, look at the link I posted.

Each digit in a binary string represents if an effect is on or off. Then convert that binary string to an integer (windows calculator ftw!) and you're good to go.

PS: Not sure if binary 'string' is really the right phrasing but it conveys the idea of how it works.
Wow actually a very simple concept, thanks!