diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Entities/Player/Player.cpp | 2 | ||||
-rwxr-xr-x | src/server/game/Server/Protocol/Handlers/MovementHandler.cpp | 13 | ||||
-rwxr-xr-x | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 16 |
3 files changed, 15 insertions, 16 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index f2e7e60a3e3..1dc34c501fa 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -21731,6 +21731,8 @@ void Player::SendInitialPacketsBeforeAddToMap() // SMSG_PET_GUIDS // SMSG_UPDATE_WORLD_STATE // SMSG_POWER_UPDATE + + SetMover(this); } void Player::SendInitialPacketsAfterAddToMap() diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp index 75bd2e2f66d..0c54a37c362 100755 --- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp @@ -472,18 +472,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) if (GetPlayer()->IsInWorld()) { - if (Unit* mover = ObjectAccessor::GetUnit(*GetPlayer(), guid)) - { - GetPlayer()->SetMover(mover); - if (mover != GetPlayer() && mover->canFly()) - { - WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12); - data.append(mover->GetPackGUID()); - data << uint32(0); - SendPacket(&data); - } - } - else + if (_player->m_mover->GetGUID() != guid) { sLog->outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " (%s - Entry: %u) and should be " UI64FMTD, guid, GetLogNameForGuid(guid), GUID_ENPART(guid), _player->m_mover->GetGUID()); GetPlayer()->SetMover(GetPlayer()); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 2a67d2e364c..58a37e75b2c 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3096,9 +3096,15 @@ void AuraEffect::HandleModPossess(AuraApplication const* aurApp, uint8 mode, boo } if (apply) - target->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp); + { + if (target->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp)) + caster->ToPlayer()->SetMover(target); + } else + { target->RemoveCharmedBy(caster); + caster->ToPlayer()->SetMover(caster); + } } // only one spell has this aura @@ -3126,11 +3132,13 @@ void AuraEffect::HandleModPossessPet(AuraApplication const* aurApp, uint8 mode, if (caster->ToPlayer()->GetPet() != pet) return; - pet->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp); + if (pet->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp)) + caster->ToPlayer()->SetMover(pet); } else { pet->RemoveCharmedBy(caster); + caster->ToPlayer()->SetMover(caster); if (!pet->IsWithinDistInMap(caster, pet->GetMap()->GetVisibilityRange())) pet->Remove(PET_SAVE_NOT_IN_SLOT, true); @@ -4807,7 +4815,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool if (Aura* newAura = target->AddAura(71564, target)) newAura->SetStackAmount(newAura->GetSpellInfo()->StackAmount); break; - case 59628: // Tricks of the Trade + case 59628: // Tricks of the Trade if (caster && caster->GetMisdirectionTarget()) target->SetReducedThreatPercent(100, caster->GetMisdirectionTarget()->GetGUID()); break; @@ -4970,7 +4978,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool target->SetReducedThreatPercent(0,0); else target->SetReducedThreatPercent(0,caster->GetMisdirectionTarget()->GetGUID()); - break; + break; } default: break; |