Skip to content

Commit

Permalink
Core/Players: Fixed barbershop not changing model when changing gender
Browse files Browse the repository at this point in the history
Closes #25742
  • Loading branch information
Shauren committed Dec 18, 2020
1 parent 6f015cb commit b100917
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/server/game/Handlers/CharacterHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,13 @@ void WorldSession::HandleAlterAppearance(WorldPackets::Character::AlterApperance
_player->ModifyMoney(-cost); // it isn't free
_player->UpdateCriteria(CRITERIA_TYPE_GOLD_SPENT_AT_BARBER, cost);

_player->SetNativeSex(packet.NewSex);
if (_player->GetNativeSex() != packet.NewSex)
{
_player->SetNativeSex(packet.NewSex);
_player->InitDisplayIds();
_player->RestoreDisplayId(false);
}

_player->SetCustomizations(Trinity::Containers::MakeIteratorPair(packet.Customizations.begin(), packet.Customizations.end()));

_player->UpdateCriteria(CRITERIA_TYPE_VISIT_BARBER_SHOP, 1);
Expand Down

0 comments on commit b100917

Please sign in to comment.