mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[10834] Cleanup shapeshift form code.
This commit is contained in:
parent
c3254c88ca
commit
4c02094737
10 changed files with 56 additions and 53 deletions
|
|
@ -4717,8 +4717,8 @@ static bool HandleResetStatsOrLevelHelper(Player* player)
|
|||
uint8 powertype = cEntry->powerType;
|
||||
|
||||
// reset m_form if no aura
|
||||
if(!player->HasAuraType(SPELL_AURA_MOD_SHAPESHIFT))
|
||||
player->m_form = FORM_NONE;
|
||||
if (!player->HasAuraType(SPELL_AURA_MOD_SHAPESHIFT))
|
||||
player->SetShapeshiftForm(FORM_NONE);
|
||||
|
||||
player->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, DEFAULT_WORLD_OBJECT_SIZE );
|
||||
player->SetFloatValue(UNIT_FIELD_COMBATREACH, 1.5f );
|
||||
|
|
@ -4728,11 +4728,10 @@ static bool HandleResetStatsOrLevelHelper(Player* player)
|
|||
player->SetByteValue(UNIT_FIELD_BYTES_0, 3, powertype);
|
||||
|
||||
// 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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue