Sum the flags?

Here you can discuss packets, implementation and design, and software related to the packet sniffing and such. This is not the place to post packages for POL, but rather discuss the packet side of them.

Moderator: POL Developer

Post Reply
New User
Posts: 4
Joined: Sun Jun 19, 2011 10:06 am

Sum the flags?

Post by Erro » Mon Dec 23, 2013 11:41 pm

Packet noob question.

In the packet list there is this:

Code: Select all

From Legacy Client
BYTE[1] 0xB9
BYTE[4] Feature Bitflag

Subcommand Build

feature flags:

0x01: enable T2A features: chat, regions
0x02: enable renaissance features
0x04: enable third dawn features
0x08: enable LBR features: skills, map
0x10: enable AOS features: skills, map, spells, fightbook
0x20: 6th character slot
0x40: enable SE features
0x80: enable ML features: elven race, spells, skills
0x100: enable 8th age splash screen
0x200: enable 9th age splash screen
0x400: enable 10th age
0x800: enable increased housing and bank storage
0x1000: 7th character slot
0x2000: enable KR faces
0x4000: enable trial account
0x8000: enable 11th age
0x10000: enable SA features: gargoyle race, spells, skills
0x20000: enable HSA features
0x40000: enable Gothic housing tiles
0x80000: enable Rustic housing tiles

This packet is send immediatly after login.
If you need several features you have to summ the flags.
That last line stumps me, How do you sum the flags? Can some one please give me an example that I can follow?


Forum Regular
Posts: 338
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy

Re: Sum the flags?

Post by xeon » Tue Dec 24, 2013 2:09 am

I think you can simply sum the values of the flags, e.g. 0x80000 + 0x40000

Distro Developer
Posts: 2736
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas

Re: Sum the flags?

Post by Yukiko » Tue Dec 24, 2013 6:24 am

Let's assume these are values for the various flags:

The sum of these flags would be:

Basically you're just adding (summing) all the values for the various flags.
The word "sum" has become somewhat arcane these days. Maybe that's where the confusion arose for you. I'm one of those "old dogs" who's old enough to know that "sum" means "to add". I still get confused when it comes to fractions though. I don't know my numerator from my denominator without digging through my brain.

Us old timers can almost remember when "doing arithmetic" was called "ciphering". Almost...

New User
Posts: 4
Joined: Sun Jun 19, 2011 10:06 am

Re: Sum the flags?

Post by Erro » Tue Dec 24, 2013 10:13 am


Thanks, I was trying to make it way more complicated.

Post Reply