嗯嗯 感谢您的测试,我又核验了一下我的代码,确实发现了有一处没有发上来,实在不好意思。
在azerothcore-wotlk-master\src\server\game\Handlers\NPCHandler.cpp 这里有一处购买技能的对象忘记添加上了,在这里进行一下补充,非常不好意思。
- void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
- {
-
- ObjectGuid guid;
- uint32 spellId = 0;
-
- recvData >> guid >> spellId;
-
- LOG_DEBUG("network", "WORLD: Received CMSG_TRAINER_BUY_SPELL Npc {}, learn spell id is: {}", guid.ToString(), spellId);
-
- //Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
-
- Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
复制代码
您看看修改下试试 如果有问题,咱们在继续探讨
|