mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Summon] Fix bot remove from world casued by summon
This commit is contained in:
@@ -451,11 +451,15 @@ void PlayerbotAI::HandleTeleportAck()
|
|||||||
bot->GetMotionMaster()->Clear(true);
|
bot->GetMotionMaster()->Clear(true);
|
||||||
bot->StopMoving();
|
bot->StopMoving();
|
||||||
if (bot->IsBeingTeleportedNear()) {
|
if (bot->IsBeingTeleportedNear()) {
|
||||||
|
// Temporary fix for instance can not enter
|
||||||
|
if (!bot->IsInWorld()) {
|
||||||
|
bot->GetMap()->AddPlayerToMap(bot);
|
||||||
|
}
|
||||||
while (bot->IsInWorld() && bot->IsBeingTeleportedNear()) {
|
while (bot->IsInWorld() && bot->IsBeingTeleportedNear()) {
|
||||||
Player* plMover = bot->m_mover->ToPlayer();
|
Player* plMover = bot->m_mover->ToPlayer();
|
||||||
if (!plMover)
|
if (!plMover)
|
||||||
return;
|
return;
|
||||||
WorldPacket p = WorldPacket(MSG_MOVE_TELEPORT_ACK, 8 + 4 + 4);
|
WorldPacket p = WorldPacket(MSG_MOVE_TELEPORT_ACK, 20);
|
||||||
p << plMover->GetPackGUID();
|
p << plMover->GetPackGUID();
|
||||||
p << (uint32) 0; // supposed to be flags? not used currently
|
p << (uint32) 0; // supposed to be flags? not used currently
|
||||||
p << (uint32) 0; // time - not currently used
|
p << (uint32) 0; // time - not currently used
|
||||||
|
|||||||
Reference in New Issue
Block a user