Register for your free account! | Forgot your password?

You last visited: Today at 04:22

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Map Status IDs

Discussion on Map Status IDs within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
InsomniacPro's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 397
Received Thanks: 205
Map Status IDs

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
    }
InsomniacPro is offline  
Old 03/07/2014, 14:48   #2
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
check albertos (hellmouth)
i remember i see it there
abdoumatrix is offline  
Old 03/07/2014, 14:58   #3
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
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.
pro4never is offline  
Thanks
2 Users
Old 03/07/2014, 16:43   #4
 
InsomniacPro's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 397
Received Thanks: 205
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?
InsomniacPro is offline  
Old 03/07/2014, 17:31   #5
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
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.
pro4never is offline  
Thanks
1 User
Old 03/07/2014, 18:34   #6
 
InsomniacPro's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 397
Received Thanks: 205
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!
InsomniacPro is offline  
Reply




All times are GMT +1. The time now is 04:23.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.