mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7797] Use DBC data for mount model selection in more cases.
* Use alt.team mount data for take player team model id if DB not provide own team creature id in spell taxi call case. * Remove unddeded hacks for model ids from Spell::EffectSendTaxi * Provide spell target for SPELL_EFFECT_SEND_TAXI for spell with target mode 0 for this effect.
This commit is contained in:
parent
a587590ab5
commit
3989212ad1
7 changed files with 16 additions and 33 deletions
|
|
@ -753,7 +753,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
|
|||
{
|
||||
sLog.outDebug( "WORLD: Restart character %u taxi flight", pCurrChar->GetGUIDLow() );
|
||||
|
||||
uint32 MountId = objmgr.GetTaxiMount(sourceNode, pCurrChar->GetTeam());
|
||||
uint32 MountId = objmgr.GetTaxiMount(sourceNode, pCurrChar->GetTeam(),true);
|
||||
uint32 path = pCurrChar->m_taxi.GetCurrentTaxiPath();
|
||||
|
||||
// search appropriate start path node
|
||||
|
|
|
|||
|
|
@ -4639,7 +4639,7 @@ void ObjectMgr::GetTaxiPath( uint32 source, uint32 destination, uint32 &path, ui
|
|||
path = dest_i->second.ID;
|
||||
}
|
||||
|
||||
uint16 ObjectMgr::GetTaxiMount( uint32 id, uint32 team )
|
||||
uint16 ObjectMgr::GetTaxiMount( uint32 id, uint32 team, bool allowed_alt_team /* = false */)
|
||||
{
|
||||
uint16 mount_entry = 0;
|
||||
uint16 mount_id = 0;
|
||||
|
|
@ -4650,6 +4650,9 @@ uint16 ObjectMgr::GetTaxiMount( uint32 id, uint32 team )
|
|||
if (team == ALLIANCE)
|
||||
{
|
||||
mount_entry = node->MountCreatureID[1];
|
||||
if(!mount_entry && allowed_alt_team)
|
||||
mount_entry = node->MountCreatureID[0];
|
||||
|
||||
CreatureInfo const *ci = GetCreatureTemplate(mount_entry);
|
||||
if(ci)
|
||||
mount_id = ci->DisplayID_A;
|
||||
|
|
@ -4657,6 +4660,10 @@ uint16 ObjectMgr::GetTaxiMount( uint32 id, uint32 team )
|
|||
if (team == HORDE)
|
||||
{
|
||||
mount_entry = node->MountCreatureID[0];
|
||||
|
||||
if(!mount_entry && allowed_alt_team)
|
||||
mount_entry = node->MountCreatureID[1];
|
||||
|
||||
CreatureInfo const *ci = GetCreatureTemplate(mount_entry);
|
||||
if(ci)
|
||||
mount_id = ci->DisplayID_H;
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ class ObjectMgr
|
|||
|
||||
uint32 GetNearestTaxiNode( float x, float y, float z, uint32 mapid, uint32 team );
|
||||
void GetTaxiPath( uint32 source, uint32 destination, uint32 &path, uint32 &cost);
|
||||
uint16 GetTaxiMount( uint32 id, uint32 team );
|
||||
uint16 GetTaxiMount( uint32 id, uint32 team, bool allowed_alt_team = false);
|
||||
void GetTaxiPathNodes( uint32 path, Path &pathnodes, std::vector<uint32>& mapIds );
|
||||
void GetTransportPathNodes( uint32 path, TransportPath &pathnodes );
|
||||
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ bool PlayerTaxi::LoadTaxiDestinationsFromString( const std::string& values, uint
|
|||
}
|
||||
|
||||
// can't load taxi path without mount set (quest taxi path?)
|
||||
if(!objmgr.GetTaxiMount(GetTaxiSource(),team))
|
||||
if(!objmgr.GetTaxiMount(GetTaxiSource(),team,true))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
@ -16825,8 +16825,8 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, uint32 mount_i
|
|||
prevnode = lastnode;
|
||||
}
|
||||
|
||||
if(!mount_id) // if not provide then attempt use default.
|
||||
mount_id = objmgr.GetTaxiMount(sourcenode, GetTeam());
|
||||
if(!mount_id) // if not provide then attempt use default, allow seelct alt team mount creature model but for proper team in spell case.
|
||||
mount_id = objmgr.GetTaxiMount(sourcenode, GetTeam(), npc == NULL);
|
||||
|
||||
if (mount_id == 0 || sourcepath == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -613,6 +613,7 @@ void Spell::FillTargetMap()
|
|||
case SPELL_EFFECT_SUMMON_OBJECT_WILD:
|
||||
case SPELL_EFFECT_SELF_RESURRECT:
|
||||
case SPELL_EFFECT_REPUTATION:
|
||||
case SPELL_EFFECT_SEND_TAXI:
|
||||
if(m_targets.getUnitTarget())
|
||||
tmpUnitMap.push_back(m_targets.getUnitTarget());
|
||||
// Triggered spells have additional spell targets - cast them even if no explicit unit target is given (required for spell 50516 for example)
|
||||
|
|
|
|||
|
|
@ -6051,32 +6051,7 @@ void Spell::EffectSendTaxi(uint32 i)
|
|||
nodes[0] = entry->from;
|
||||
nodes[1] = entry->to;
|
||||
|
||||
uint32 mountid = 0;
|
||||
switch(m_spellInfo->Id)
|
||||
{
|
||||
case 31606: //Stormcrow Amulet
|
||||
mountid = 17447;
|
||||
break;
|
||||
case 45071: //Quest - Sunwell Daily - Dead Scar Bombing Run
|
||||
case 45113: //Quest - Sunwell Daily - Ship Bombing Run
|
||||
case 45353: //Quest - Sunwell Daily - Ship Bombing Run Return
|
||||
mountid = 22840;
|
||||
break;
|
||||
case 34905: //Stealth Flight
|
||||
mountid = 6851;
|
||||
break;
|
||||
case 45883: //Amber Ledge to Beryl Point
|
||||
mountid = 23524;
|
||||
break;
|
||||
case 46064: //Amber Ledge to Coldarra
|
||||
mountid = 6371;
|
||||
break;
|
||||
case 53335: //Stormwind Harbor Flight - Peaceful
|
||||
mountid = 6852;
|
||||
break;
|
||||
}
|
||||
|
||||
((Player*)unitTarget)->ActivateTaxiPathTo(nodes,mountid);
|
||||
((Player*)unitTarget)->ActivateTaxiPathTo(nodes);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7796"
|
||||
#define REVISION_NR "7797"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue