[7798] More Player::ActivateTaxiPathTo use improvements

* Provide more explicit way about spell that cast taxi flight if any
* Remove incorrect states instead error reporting in case non-taximaster flight start (cast/script)
* Remove mount_id arg from ActivateTaxiPathTo and implement support for 0 mount_id case (spell 32474)
* Implement spell 32474 (except finilize part)
* Provided Player::ActivateTaxiPathTo(uint32 taxi_path_id) function version for simplify one node to node paths use by id.
This commit is contained in:
VladimirMangos 2009-05-08 01:07:49 +04:00
parent 3989212ad1
commit 666b6f798e
7 changed files with 85 additions and 45 deletions

View file

@ -6041,18 +6041,7 @@ void Spell::EffectSendTaxi(uint32 i)
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
TaxiPathEntry const* entry = sTaxiPathStore.LookupEntry(m_spellInfo->EffectMiscValue[i]);
if(!entry)
return;
std::vector<uint32> nodes;
nodes.resize(2);
nodes[0] = entry->from;
nodes[1] = entry->to;
((Player*)unitTarget)->ActivateTaxiPathTo(nodes);
((Player*)unitTarget)->ActivateTaxiPathTo(m_spellInfo->EffectMiscValue[i],m_spellInfo->Id);
}
void Spell::EffectPlayerPull(uint32 i)