Core/Spells: Corrected summon category SUMMON_CATEGORY_VEHICLE

Port TrinityCore Commit: https://github.com/TrinityCore/TrinityCore/commit/68cc366d88fd9cb4c759dc991568d994a29ba23e
This commit is contained in:
hondacrx
2019-08-14 23:38:58 -04:00
parent 46095e461f
commit 5bb3eb95b4
+12 -5
View File
@@ -1843,12 +1843,19 @@ namespace Game.Spells
// The spell that this effect will trigger. It has SPELL_AURA_CONTROL_VEHICLE
uint spellId = SharedConst.VehicleSpellRideHardcoded;
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo((uint)effectInfo.CalcValue());
if (spellInfo != null && spellInfo.HasAura(m_originalCaster.GetMap().GetDifficultyID(), AuraType.ControlVehicle))
spellId = spellInfo.Id;
int basePoints = effectInfo.CalcValue();
if (basePoints > SharedConst.MaxVehicleSeats)
{
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo((uint)basePoints);
if (spellInfo != null && spellInfo.HasAura(m_originalCaster.GetMap().GetDifficultyID(), AuraType.ControlVehicle))
spellId = spellInfo.Id;
}
// Hard coded enter vehicle spell
m_originalCaster.CastSpell(summon, spellId, true);
// if we have small value, it indicates seat position
if (basePoints > 0 && basePoints < SharedConst.MaxVehicleSeats)
m_originalCaster.CastCustomSpell(spellId, SpellValueMod.BasePoint0, basePoints, summon, true);
else
m_originalCaster.CastSpell(summon, spellId, true);
uint faction = properties.Faction;
if (faction == 0)