Core/Player: Implemented new CMSG_ACTIVATE_TAXI fields to select a random favorite mount instead of standard gryphon/wyvern and enabled it

Closes #17778
This commit is contained in:
Shauren
2016-11-12 00:27:07 +01:00
parent 54376e026b
commit bfeb32d4a9
6 changed files with 18 additions and 7 deletions

View File

@@ -182,9 +182,14 @@ void WorldSession::HandleActivateTaxiOpcode(WorldPackets::Taxi::ActivateTaxi& ac
}
}
uint32 preferredMountDisplay = 0;
if (MountEntry const* mount = sMountStore.LookupEntry(activateTaxi.FlyingMountID))
if (GetPlayer()->HasSpell(mount->SpellId))
preferredMountDisplay = mount->DisplayId;
std::vector<uint32> nodes;
sTaxiPathGraph.GetCompleteNodeRoute(from, to, GetPlayer(), nodes);
GetPlayer()->ActivateTaxiPathTo(nodes, unit);
GetPlayer()->ActivateTaxiPathTo(nodes, unit, 0, preferredMountDisplay);
}
void WorldSession::SendActivateTaxiReply(ActivateTaxiReply reply)