Core/Players: Fixed barbershop not changing model when changing gender

Port From (https://github.com/TrinityCore/TrinityCore/commit/b100917c6877a4c9a2f20a1a61f111a91e78db01)
This commit is contained in:
hondacrx
2020-12-25 15:38:07 -05:00
parent cacaee3944
commit fa368cf4de
+7 -1
View File
@@ -1347,7 +1347,13 @@ namespace Game
_player.ModifyMoney(-cost);
_player.UpdateCriteria(CriteriaTypes.GoldSpentAtBarber, (ulong)cost);
_player.SetNativeSex((Gender)packet.NewSex);
if (_player.GetNativeSex() != (Gender)packet.NewSex)
{
_player.SetNativeSex((Gender)packet.NewSex);
_player.InitDisplayIds();
_player.RestoreDisplayId(false);
}
_player.SetCustomizations(packet.Customizations);
_player.UpdateCriteria(CriteriaTypes.VisitBarberShop, 1);