Core/Creatures: Implement Ground/FlyingMountDisplayID from creature_summoned_data
Port From (https://github.com/TrinityCore/TrinityCore/commit/8cbc3923a18add49dd483e0e6e9d851f1d4d59f7)
This commit is contained in:
@@ -4695,6 +4695,44 @@ namespace Scripts.Spells.Generic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Script] // 147066 - (Serverside/Non-DB2) Generic - Mount Check Aura
|
||||||
|
class spell_gen_mount_check_aura : AuraScript
|
||||||
|
{
|
||||||
|
void OnPeriodic(AuraEffect aurEff)
|
||||||
|
{
|
||||||
|
Unit target = GetTarget();
|
||||||
|
uint mountDisplayId = 0;
|
||||||
|
|
||||||
|
TempSummon tempSummon = target.ToTempSummon();
|
||||||
|
if (tempSummon == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Player summoner = tempSummon.GetSummoner()?.ToPlayer();
|
||||||
|
if (summoner == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (summoner.IsMounted() && (!summoner.IsInCombat() || summoner.IsFlying()))
|
||||||
|
{
|
||||||
|
CreatureSummonedData summonedData = Global.ObjectMgr.GetCreatureSummonedData(tempSummon.GetEntry());
|
||||||
|
if (summonedData != null)
|
||||||
|
{
|
||||||
|
if (summoner.IsFlying() && summonedData.FlyingMountDisplayID.HasValue)
|
||||||
|
mountDisplayId = summonedData.FlyingMountDisplayID.Value;
|
||||||
|
else if (summonedData.GroundMountDisplayID.HasValue)
|
||||||
|
mountDisplayId = summonedData.GroundMountDisplayID.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mountDisplayId != target.GetMountDisplayId())
|
||||||
|
target.SetMountDisplayId(mountDisplayId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnEffectPeriodic.Add(new EffectPeriodicHandler(OnPeriodic, 0, AuraType.PeriodicDummy));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 40307 - Stasis Field
|
// 40307 - Stasis Field
|
||||||
class StasisFieldSearcher : ICheck<Unit>
|
class StasisFieldSearcher : ICheck<Unit>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
-- Serverside Spell
|
||||||
|
DELETE FROM `serverside_spell` WHERE `ID` = 147066;
|
||||||
|
INSERT INTO `serverside_spell` (`Id`, `DifficultyID`, `CategoryId`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `AttributesEx8`, `AttributesEx9`, `AttributesEx10`, `AttributesEx11`, `AttributesEx12`, `AttributesEx13`, `AttributesEx14`, `Stances`, `StancesNot`, `Targets`, `TargetCreatureType`, `RequiresSpellFocus`, `FacingCasterFlags`, `CasterAuraState`, `TargetAuraState`, `ExcludeCasterAuraState`, `ExcludeTargetAuraState`, `CasterAuraSpell`, `TargetAuraSpell`, `ExcludeCasterAuraSpell`, `ExcludeTargetAuraSpell`, `CastingTimeIndex`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryCategory`, `StartRecoveryTime`, `InterruptFlags`, `AuraInterruptFlags1`, `AuraInterruptFlags2`, `ChannelInterruptFlags1`, `ChannelInterruptFlags2`, `ProcFlags`, `ProcFlags2`, `ProcChance`, `ProcCharges`, `ProcCooldown`, `ProcBasePPM`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `RangeIndex`, `Speed`, `LaunchDelay`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `ContentTuningId`, `SpellName`, `ConeAngle`, `ConeWidth`, `MaxTargetLevel`, `MaxAffectedTargets`, `SpellFamilyName`, `SpellFamilyFlags1`, `SpellFamilyFlags2`, `SpellFamilyFlags3`, `SpellFamilyFlags4`, `DmgClass`, `PreventionType`, `AreaGroupId`, `SchoolMask`, `ChargeCategoryId`) VALUES
|
||||||
|
(147066, 0, 0, 0, 0, 0x9000080, 0x20, 0x4000, 0x10000000, 0x80, 0x1000008, 0x1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, -1, 0, 0, 0, '(Serverside/Non-DB2) Generic - Mount Check Aura', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
|
||||||
|
DELETE FROM `serverside_spell_effect` WHERE `SpellID` = 147066;
|
||||||
|
INSERT INTO `serverside_spell_effect` (`SpellID`, `EffectIndex`, `DifficultyID`, `Effect`, `EffectAura`, `EffectAmplitude`, `EffectAttributes`, `EffectAuraPeriod`, `EffectBonusCoefficient`, `EffectChainAmplitude`, `EffectChainTargets`, `EffectItemType`, `EffectMechanic`, `EffectPointsPerResource`, `EffectPosFacing`, `EffectRealPointsPerLevel`, `EffectTriggerSpell`, `BonusCoefficientFromAP`, `PvpMultiplier`, `Coefficient`, `Variance`, `ResourceCoefficient`, `GroupSizeBasePointsCoefficient`, `EffectBasePoints`, `EffectMiscValue1`, `EffectMiscValue2`, `EffectRadiusIndex1`, `EffectRadiusIndex2`, `EffectSpellClassMask1`, `EffectSpellClassMask2`, `EffectSpellClassMask3`, `EffectSpellClassMask4`, `ImplicitTarget1`, `ImplicitTarget2`) VALUES
|
||||||
|
(147066, 0, 0, 6, 226, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
|
||||||
|
-- Spell Script
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id`= 147066;
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(147066, 'spell_gen_mount_check_aura');
|
||||||
|
|
||||||
|
-- Creature Summoned
|
||||||
|
DELETE FROM `creature_summoned_data` WHERE `CreatureID` IN (182084, 182088);
|
||||||
|
INSERT INTO `creature_summoned_data` (`CreatureID`, `CreatureIDVisibleToSummoner`, `GroundMountDisplayID`, `FlyingMountDisplayID`) VALUES
|
||||||
|
(182084, 182085, 103104, 103104),
|
||||||
|
(182088, 182089, 103104, 103104);
|
||||||
|
|
||||||
|
-- Creature Addon
|
||||||
|
DELETE FROM `creature_template_addon` WHERE `entry` IN (90382, 91911, 182084, 182088);
|
||||||
|
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `visibilityDistanceType`, `auras`) VALUES
|
||||||
|
(90382, 0, 0, 0, 1, 0, 0, 0, 0, 0, '147066'),
|
||||||
|
(91911, 0, 0, 0, 1, 0, 0, 0, 0, 0, '147066'),
|
||||||
|
(182084, 0, 0, 0, 1, 0, 0, 0, 0, 0, '147066'),
|
||||||
|
(182088, 0, 0, 0, 1, 0, 0, 0, 0, 0, '147066');
|
||||||
Reference in New Issue
Block a user