*Fix the bug that revive pet make pet action bar disappear.
--HG-- branch : trunk
This commit is contained in:
@@ -5818,15 +5818,15 @@ void Spell::EffectSummonDeadPet(uint32 /*i*/)
|
|||||||
return;
|
return;
|
||||||
if(damage < 0)
|
if(damage < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pet->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
|
pet->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
|
||||||
pet->RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
pet->RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
||||||
pet->setDeathState( ALIVE );
|
pet->setDeathState( ALIVE );
|
||||||
pet->clearUnitState(UNIT_STAT_ALL_STATE);
|
pet->clearUnitState(UNIT_STAT_ALL_STATE);
|
||||||
pet->SetHealth( uint32(pet->GetMaxHealth()*(float(damage)/100)));
|
pet->SetHealth( uint32(pet->GetMaxHealth()*(float(damage)/100)));
|
||||||
|
|
||||||
pet->AIM_Initialize();
|
//pet->AIM_Initialize();
|
||||||
|
//_player->PetSpellInitialize();
|
||||||
_player->PetSpellInitialize();
|
|
||||||
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
|
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user