mirror of
https://github.com/mangosfour/server.git
synced 2025-12-31 13:37:07 +00:00
[12659] Fixed mounts
This commit is contained in:
parent
1997c1e903
commit
a253344a02
9 changed files with 105 additions and 3 deletions
|
|
@ -3419,8 +3419,6 @@ void Aura::HandleAuraMounted(bool apply, bool Real)
|
|||
if (minfo)
|
||||
display_id = minfo->modelid;
|
||||
|
||||
target->Mount(display_id, GetId());
|
||||
|
||||
if (ci->vehicleId)
|
||||
{
|
||||
target->SetVehicleId(ci->vehicleId, ci->Entry);
|
||||
|
|
@ -3428,11 +3426,19 @@ void Aura::HandleAuraMounted(bool apply, bool Real)
|
|||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
target->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PLAYER_VEHICLE);
|
||||
}
|
||||
|
||||
target->Mount(display_id, GetId());
|
||||
if (MountCapabilityEntry const* mountCapability = target->GetMountCapability(uint32(GetMiscBValue())))
|
||||
target->CastSpell(target, mountCapability->SpeedModSpell, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
target->Unmount(true);
|
||||
|
||||
// remove speed aura
|
||||
if (MountCapabilityEntry const* mountCapability = target->GetMountCapability(uint32(GetMiscBValue())))
|
||||
target->RemoveAurasDueToSpell(mountCapability->SpeedModSpell);
|
||||
|
||||
CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(m_modifier.m_miscvalue);
|
||||
if (ci && target->IsVehicle() && ci->vehicleId == target->GetVehicleInfo()->GetVehicleEntry()->m_ID)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue