Core/Players: do not update position data on character creation

Retail does not have a zone id for newly created character until their first login so we do the same as well. This will drastically improve performance on character creations as we no longer unnecessarily load grids and map data.
This commit is contained in:
Ovahlord
2020-06-18 05:17:22 +02:00
parent 85532de2e9
commit 4d39bb602e

View File

@@ -485,7 +485,6 @@ bool Player::Create(ObjectGuid::LowType guidlow, CharacterCreateInfo* createInfo
SetByteValue(UNIT_FIELD_BYTES_0, UNIT_BYTES_0_OFFSET_GENDER, createInfo->Gender);
SetByteValue(UNIT_FIELD_BYTES_0, UNIT_BYTES_0_OFFSET_POWER_TYPE, powertype);
InitDisplayIds();
UpdatePositionData();
if (sWorld->getIntConfig(CONFIG_GAME_TYPE) == REALM_TYPE_PVP || sWorld->getIntConfig(CONFIG_GAME_TYPE) == REALM_TYPE_RPPVP)
{
SetByteFlag(UNIT_FIELD_BYTES_2, UNIT_BYTES_2_OFFSET_PVP_FLAG, UNIT_BYTE2_FLAG_PVP);