Skip to content

Commit dfc5ebb

Browse files
blinkyscFaq
andauthored
fix(Core/Handlers): Handle vehicle and possess spells in CMSG_REQUEST_PET_INFO (#24575)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com> Co-authored-by: Faq <Faq@users.noreply.github.com>
1 parent 4e81f59 commit dfc5ebb

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/server/game/Handlers/MiscHandler.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,8 +1560,15 @@ void WorldSession::HandleRequestPetInfo(WorldPackets::Pet::RequestPetInfo& /*pac
15601560

15611561
if (_player->GetPet())
15621562
_player->PetSpellInitialize();
1563-
else if (_player->GetCharm())
1564-
_player->CharmSpellInitialize();
1563+
else if (Unit* charm = _player->GetCharm())
1564+
{
1565+
if (charm->HasUnitState(UNIT_STATE_POSSESSED))
1566+
_player->PossessSpellInitialize();
1567+
else if (charm->HasUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED) && charm->HasUnitFlag(UNIT_FLAG_POSSESSED))
1568+
_player->VehicleSpellInitialize();
1569+
else
1570+
_player->CharmSpellInitialize();
1571+
}
15651572
}
15661573

15671574
void WorldSession::HandleSetTaxiBenchmarkOpcode(WorldPacket& recv_data)

0 commit comments

Comments
 (0)