Core/Mechanics: cleanup shapeshift form code (by VladimirMangos)
--HG-- branch : trunk
This commit is contained in:
@@ -2504,7 +2504,7 @@ static bool HandleResetStatsOrLevelHelper(Player* player)
|
||||
|
||||
// reset m_form if no aura
|
||||
if (!player->HasAuraType(SPELL_AURA_MOD_SHAPESHIFT))
|
||||
player->m_form = FORM_NONE;
|
||||
player->SetShapeshiftForm(FORM_NONE);
|
||||
|
||||
player->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, DEFAULT_WORLD_OBJECT_SIZE);
|
||||
player->SetFloatValue(UNIT_FIELD_COMBATREACH, DEFAULT_COMBAT_REACH);
|
||||
@@ -2514,11 +2514,10 @@ static bool HandleResetStatsOrLevelHelper(Player* player)
|
||||
player->SetUInt32Value(UNIT_FIELD_BYTES_0, ((player->getRace()) | (player->getClass() << 8) | (player->getGender() << 16) | (powertype << 24)));
|
||||
|
||||
// reset only if player not in some form;
|
||||
if (player->m_form == FORM_NONE)
|
||||
if (player->GetShapeshiftForm() == FORM_NONE)
|
||||
player->InitDisplayIds();
|
||||
|
||||
player->SetByteValue(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP);
|
||||
player->SetByteValue(UNIT_FIELD_BYTES_2, 3, player->m_form);
|
||||
|
||||
player->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user