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

Commit

Permalink
Core/AI: PetAI will now draw its auto cast spell Ids from the action …
Browse files Browse the repository at this point in the history
…bar since we can place spells in any of the 10 slots since Cataclysm and onward
  • Loading branch information
Ovahlord committed Oct 19, 2023
1 parent 196a9d0 commit 18a60b8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/server/game/AI/CoreAI/PetAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,13 @@ void PetAI::UpdateAI(uint32 diff)
{
TargetSpellList targetSpellStore;

for (uint8 i = 0; i < me->GetPetAutoSpellSize(); ++i)
for (uint8 i = ACTION_BAR_INDEX_START + 1; i < ACTION_BAR_INDEX_END; ++i)
{
uint32 spellID = me->GetPetAutoSpellOnPos(i);
UnitActionBarEntry const* action = me->GetCharmInfo()->GetActionBarEntry(i);
if (!action || action->GetType() != ACT_ENABLED)
continue;

uint32 spellID = action->GetAction();
if (!spellID)
continue;

Expand Down

0 comments on commit 18a60b8

Please sign in to comment.