[8137] Init player display id + native display id on login. Author: hunuza
* Temporary reset of display id on save no longer needed.
* Players always have the right model for their gender.
--HG--
branch : trunk
This commit is contained in:
1 parent
bf6102e7ed
commit
d27e5f3de1
5 files changed
+42
-58
No files matched your search
+2
-20
@@ -5362,9 +5362,6 @@ bool ChatHandler::HandleResetHonorCommand (const char * args)
|
||||
|
||||
static bool HandleResetStatsOrLevelHelper(Player* player)
|
||||
{
|
||||
PlayerInfo const *info = objmgr.GetPlayerInfo(player->getRace(), player->getClass());
|
||||
if(!info) return false;
|
||||
|
||||
ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(player->getClass());
|
||||
if(!cEntry)
|
||||
{
|
||||
@@ -5387,21 +5384,7 @@ static bool HandleResetStatsOrLevelHelper(Player* player)
|
||||
|
||||
// reset only if player not in some form;
|
||||
if(player->m_form==FORM_NONE)
|
||||
{
|
||||
switch(player->getGender())
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
player->SetDisplayId(info->displayId_f);
|
||||
player->SetNativeDisplayId(info->displayId_f);
|
||||
break;
|
||||
case GENDER_MALE:
|
||||
player->SetDisplayId(info->displayId_m);
|
||||
player->SetNativeDisplayId(info->displayId_m);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
player->InitDisplayIds();
|
||||
|
||||
player->SetByteValue(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP );
|
||||
player->SetByteValue(UNIT_FIELD_BYTES_2, 3, player->m_form);
|
||||
@@ -7449,8 +7432,7 @@ bool ChatHandler::HandleModifyGenderCommand(const char *args)
|
||||
player->SetByteValue(PLAYER_BYTES_3, 0, gender);
|
||||
|
||||
// Change display ID
|
||||
player->SetDisplayId(gender ? info->displayId_f : info->displayId_m);
|
||||
player->SetNativeDisplayId(gender ? info->displayId_f : info->displayId_m);
|
||||
player->InitDisplayIds();
|
||||
|
||||
char const* gender_full = gender ? "female" : "male";
|
||||
|
||||
|
||||
Reference in new issue
Block a user