[3.3.5] How does Player::ValidateAppearance really works?

Hi guys, I’ve been trying to analyze how Player::ValidateAppearance works, but so far I am empty handed, I don’t understand DBC so I can’t fully trace back the calls, that is why I decided to ask you guys.

So the code basically gets the ‘flags’ with GetCharSectionEntry();

http://image.prntscr.com/image/18ca7898a9f64edcbab3ee0d7fd068c8.png

When using warmane client, some haircuts make ValidateAppearance to return false, and it does that because
http://image.prntscr.com/image/eadbda3386ac4926bc12dcd9fa05362b.png

The highlited portion of the code executes a bitwise AND operation (entry->Flags & SECTION_FLAG_PLAYER)
when using a ‘not supported’ hair cut, the flag returns 18, and SECTION_FLAG_PLAYER is 1, since it is a bitwise operation, this would be it’s representation:

18 = 0001 0010

1 = 0000 0001

R = 0000 0000

Therefore the AND condition returns false

So, my question is:

What exactly are the flags? 
what do they mean?
what is the difference between the flag 17 and 18? 

Thank you guys for your time reading this.

PD: Man, we need some markups!

— Canned message start —
This thread is not related to the official Trinity codebase and was moved to the Custom Code section.
Please read the stickies next time.
— Canned message end —

Really? o.O what would be related to the official Trinity codebase? that code I showed you is the one that is on github for branch 3.3.5… or the official Trinity codebase would be the master branch?

I am pretty sure it was relocated because even though the original code is related to trinitycore, any changes you are attempting to make are not. It was probably a pre-emptive so that if you did ask about changing the values or modifying them that it would already be relocated.