aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortreeston <treeston.mmoc@gmail.com>2016-08-14 00:29:37 +0200
committerjoschiwald <joschiwald.trinity@gmail.com>2017-02-12 14:47:27 +0100
commit78748bff93f38d06b74caec0d8be5e2479d1d65f (patch)
treea088e381d6e3e7ec62bbc2c1c3b5102a03929908 /src
parent7f38c2759a3b6b332fa634cdf1287d6edfba44e9 (diff)
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 d08efca201888e988f95e5761f31e9a890948091) # Conflicts: # src/server/game/Entities/Player/Player.cpp
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 6f9b64d6cf5..467424b1d83 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -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);