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
Erro
New User
Posts: 4
Joined: Sun Jun 19, 2011 10:06 am

Sum the flags?

Post by Erro »

Packet noob question.

In the packet list there is this:

Code: Select all

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

Subcommand Build
N/A

Notes
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?

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

Re: Sum the flags?

Post by xeon »

I think you can simply sum the values of the flags, e.g. 0x80000 + 0x40000
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Sum the flags?

Post by Yukiko »

Let's assume these are values for the various flags:
0x1000
0x2000
0x4000
0x8000
0x0400
0x0800
0x0010
0x0020
0x0001
0x0002
0x0004

The sum of these flags would be:
0xFC37

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...
Erro
New User
Posts: 4
Joined: Sun Jun 19, 2011 10:06 am

Re: Sum the flags?

Post by Erro »

doh

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