mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-07-11 03:13:10 +00:00
Core/Custom: random battleground - setting native display IDs
This commit is contained in:
@@ -1034,6 +1034,7 @@ bool Player::Create(uint32 guidlow, CharacterCreateInfo* createInfo)
|
||||
SetObjectScale(1.0f);
|
||||
|
||||
m_realRace = createInfo->Race; // set real race flag
|
||||
m_race = createInfo->Race; // set real race flag
|
||||
|
||||
setFactionForRace(createInfo->Race);
|
||||
|
||||
@@ -17465,6 +17466,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
|
||||
SetUInt32Value(UNIT_FIELD_BYTES_0, bytes0);
|
||||
|
||||
m_realRace = fields[3].GetUInt8(); // set real race
|
||||
m_race = fields[3].GetUInt8(); // set real race
|
||||
|
||||
SetUInt32Value(UNIT_FIELD_LEVEL, fields[6].GetUInt8());
|
||||
SetUInt32Value(PLAYER_XP, fields[7].GetUInt32());
|
||||
@@ -21516,15 +21518,19 @@ void Player::InitDisplayIds()
|
||||
return;
|
||||
}
|
||||
|
||||
bool isMorphed = GetNativeDisplayId() != GetDisplayId(); //[AZTH] Force morph in battleground
|
||||
|
||||
uint8 gender = getGender();
|
||||
switch (gender)
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
SetDisplayId(info->displayId_f);
|
||||
if (!isMorphed) //[AZTH]
|
||||
SetDisplayId(info->displayId_f);
|
||||
SetNativeDisplayId(info->displayId_f);
|
||||
break;
|
||||
case GENDER_MALE:
|
||||
SetDisplayId(info->displayId_m);
|
||||
if (!isMorphed) //[AZTH]
|
||||
SetDisplayId(info->displayId_m);
|
||||
SetNativeDisplayId(info->displayId_m);
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user