arcemu/arcemu — pull request #28 by MesoX (2011-11-18 00:03:51+00:00)
Title: Druid's form's look changing when player changes at barber

Hey there,

this patch will makes all druids on ArcEmu finally happy. It makes them to look different in any of their form, when they will change their appearance.

I've made these changes to the system:
1. I've changed ArcEmu to load correct structure for BarberShopStyle.dbc. The structure of loaded file itself was correct, but struct BarberShopStyleEntry has also other values, which were uninitialized, because system was loading only first and last value.

2. Did some code style changes to WorldSession::HandleBarberShopResult to be more readable and also added part with changing skin ID (needed for druid's form and maybe some others).

3. I've made a new function for selecting proper displayid for player, when changing a shapeshift. While it may not seems as the best solution, it's easier to change values of displayids later here in 1 function then searching for them directly in Aura::SpellAuraModShapeshift, where also different code is executed.

Any suggestion would be welcome.

P.S. I know you won't love my big switch function for displayids, but for me it seems as the best idea.

Credits for packet structures and displayids goes to Trinity.