mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[6948] Fixed unattackable NPC summoned pets.
Not set player's pet only UNIT_FLAG_PVP_ATTACKABLE flag for creature's pets. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
3488c1fee3
commit
82c94b4101
4 changed files with 9 additions and 4 deletions
|
|
@ -10838,6 +10838,9 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
|
|||
pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction());
|
||||
pet->SetUInt32Value(UNIT_CREATED_BY_SPELL, spell_id);
|
||||
|
||||
if(GetTypeId()==TYPEID_PLAYER)
|
||||
pet->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
|
||||
uint32 level = (creatureTarget->getLevel() < (getLevel() - 5)) ? (getLevel() - 5) : creatureTarget->getLevel();
|
||||
pet->SetFreeTalentPoints(pet->GetMaxTalentPointsForLevel(level));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue