Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Core/Pets: do not use the spell Id of SPELL_EFFECT_CREATE_TAMED_PET s…
Browse files Browse the repository at this point in the history
…pells in UNIT_CREATED_BY_SPELL to match sniff data
  • Loading branch information
Ovahlord committed Sep 28, 2023
1 parent e492ba0 commit 8d3e10d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/server/game/Entities/Unit/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14316,7 +14316,7 @@ NewPet* Unit::SummonPet(uint32 creatureId, uint8 slot, uint32 spellId, bool asCl
if (pet->IsHunterPet())
{
// Hunter pets have some special settings
pet->SetByteFlag(UNIT_FIELD_BYTES_2, UNIT_BYTES_2_OFFSET_PET_FLAGS, UNIT_CAN_BE_ABANDONED | 0x4);
pet->SetByteFlag(UNIT_FIELD_BYTES_2, UNIT_BYTES_2_OFFSET_PET_FLAGS, UNIT_CAN_BE_ABANDONED);
if (!playerPetData->HasBeenRenamed)
pet->SetByteFlag(UNIT_FIELD_BYTES_2, UNIT_BYTES_2_OFFSET_PET_FLAGS, UNIT_CAN_BE_RENAMED);
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5243,7 +5243,7 @@ void Spell::EffectCreateTamedPet(SpellEffIndex effIndex)
Position pos = unitTarget->GetPosition();
unitTarget->MovePositionToFirstCollision(pos, DEFAULT_FOLLOW_DISTANCE_PET, float(M_PI_2));

player->SummonPet(0, *slot, m_spellInfo->Id, true, pos);
player->SummonPet(0, *slot, 0, true, pos);
}

void Spell::EffectDiscoverTaxi(SpellEffIndex effIndex)
Expand Down

0 comments on commit 8d3e10d

Please sign in to comment.