Update NPCHandler.cpp

This commit is contained in:
manstfu 2025-02-15 13:14:52 +01:00 committed by GitHub
parent 874a124588
commit 732474219c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -218,7 +218,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
recvData >> guid >> spellId;
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit && !GetCurrentTrainer())
if (!unit && !trainerEntry)
{
LOG_DEBUG("network", "WORLD: HandleTrainerBuySpellOpcode - Unit ({}) not found or you can not interact with him.", guid.ToString());
return;