Forum > Miscellaneous
[SOLVED] Barbershop Prices
(1/4) > >>
Milly:
Hi everyone,
I'm working on an RP server and I feel it would be ideal if my players can use the barbershop for free. I have made the proper clientside and serverside modifications to BarberShopStyle.dbc. That didn't work so I had to edit the core (player.cpp) and set the cost values to 0 gold. This did in fact work, but only for Hair Styles and Facial Hair. For some reason, Hair Color is still listed in-game as costing 5 gold.
However, if I buy a Hair Style and Hair Color at the same time, it costs 0 gold. But trying to buy a Hair Color alone will say it costs 5 gold and won't allow me to buy it because I don't have enough money. But if I do have enough money, it applies the new hair color without removing gold from my inventory. Meaning the hair color issue is client-side, not server-side. Unless I'm mistaken.
Basically I'm wondering if anyone might know what I have to modify client-side to remove the cost of hair colors, or if it's even possible. I understand that I can just give everyone 10 gold and they'll never have to worry about it, but I'd like to make things look nice and of high standard.
Also, just so you know, this isn't a cache issue. And I have tested BarberShopStyle.dbc and it doesn't appear to have any relation to hair colors at all, so the value must be hidden somewhere else. I just can't find it and after 5+ hours of looking, it starts to frustrate me.
Thanks
More info: Latest TrinityCore, 3.3.5a P.S. I'm finally back from hiatus, if anyone cares. :)
schlumpf:
It might be fixable by removing price related stuff from the lua scripts and XML files. That will also result in being prettier as they won't ever see prices.
Ascathos:
After some own attempts, it always fails on the money output. It seems to have some hardcoded-in elements.
Milly:
Good idea about removing money all-together schlumpf. And thanks for the effort Ascathos.
I got into the FrameXML files for MoneyFrame and MoneyInput, and no matter how I tinkered with them they still had no effect on the cost value. I've even commented out the entire code for those files, and all it did was make money invisible. Which is cool and all, and I might consider doing something like that in the future (without destroying the entire code of course), but it doesn't solve the problem necessarily.
I also did some windows file searches to find every occurrence of keywords like barber, hair, cost, price, etc. This brought back zero results when done on the FrameXML and GlueXML files. Soo it's just not there =
Think there's anywhere else worth checking before considering this an impossible task?
Ascathos:
Concerning the serverside changes.
--- Code: --- GtBarberShopCostBaseEntry const* bsc = sGtBarberShopCostBaseStore.LookupEntry(level - 1);
if (!bsc) // shouldn't happen return 0xFFFFFFFF;
float cost = 0;
if (hairstyle != newhairstyle) cost += bsc->cost; // full price
if ((haircolor != newhaircolor) && (hairstyle == newhairstyle)) cost += bsc->cost * 0.5f; // +1/2 of price
if (facialhair != newfacialhair) cost += bsc->cost * 0.75f; // +3/4 of price
if (newSkin && skincolor != newSkin->hair_id) cost += bsc->cost * 0.75f; // +5/6 of price --- End code ---
It takes the costs from the barbier file and uses it. If it is set to 0, it wshouldn't take money.
Navigation
[0] Message Index
[#] Next page
|