Entities/Player: Fixed an edge case bug that could cause a character to get stuck in forced recustomization indefinitely if two or more appearance properties were out of bounds.

(cherry picked from commit d08efca201)

# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
This commit is contained in:
treeston
2016-08-14 00:29:37 +02:00
committed by joschiwald
parent 7f38c2759a
commit 78748bff93

View File

@@ -297,6 +297,9 @@ void WorldSession::HandleCharEnum(PreparedQueryResult result)
{
TC_LOG_ERROR("entities.player.loading", "Player %s has wrong Appearance values (Hair/Skin/Color), forcing recustomize", charInfo.Guid.ToString().c_str());
// Make sure customization always works properly - send all zeroes instead
charInfo.Skin = 0, charInfo.Face = 0, charInfo.HairStyle = 0, charInfo.HairColor = 0, charInfo.FacialHair = 0;
if (!(charInfo.CustomizationFlag == CHAR_CUSTOMIZE_FLAG_CUSTOMIZE))
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);