From 8510f01035add4084ead4261cd14c8fcba542c42 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 22 Dec 2021 20:23:48 -0500 Subject: [PATCH] Misc fixes --- Source/Framework/Constants/SharedConst.cs | 15 +++++++++++++-- Source/Framework/Constants/SmartAIConst.cs | 4 ++-- Source/Game/Entities/Creature/Creature.cs | 1 + Source/Game/Entities/Pet.cs | 3 +++ Source/Game/Spells/SpellManager.cs | 6 ++++++ Source/Game/Weather/WeatherManager.cs | 1 + 6 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Source/Framework/Constants/SharedConst.cs b/Source/Framework/Constants/SharedConst.cs index af25b24e3..a2fa46433 100644 --- a/Source/Framework/Constants/SharedConst.cs +++ b/Source/Framework/Constants/SharedConst.cs @@ -50,12 +50,14 @@ namespace Framework.Constants /// BattlePets Const /// public const int MaxBattlePetSpeciesId = 3159; - public const int MaxPetBattleSlots = 3; public const int DefaultMaxBattlePetsPerSpecies = 3; public const int BattlePetCageItemId = 82800; - public const int DefaultSummonBattlePetSpell = 118301; public const int SpellVisualUncagePet = 222; + public const int SpellBattlePetTraining = 125610; + public const int SpellReviveBattlePets = 125439; + public const int SpellSummonBattlePet = 118301; + /// /// Lfg Const /// @@ -2912,6 +2914,15 @@ namespace Framework.Constants DisplayOverridden = 0x100 } + public enum BattlePetSlots + { + Slot0 = 0, + Slot1 = 1, + Slot2 = 2, + + Count + } + public enum SceneType { Normal = 0, diff --git a/Source/Framework/Constants/SmartAIConst.cs b/Source/Framework/Constants/SmartAIConst.cs index 8688ebd11..2e801bc6b 100644 --- a/Source/Framework/Constants/SmartAIConst.cs +++ b/Source/Framework/Constants/SmartAIConst.cs @@ -181,8 +181,8 @@ namespace Framework.Constants FriendlyMissingBuff = 16, // Spellid, Radius, Repeatmin, Repeatmax SummonedUnit = 17, // Creatureid(0 All), Cooldownmin, Cooldownmax TargetManaPct = 18, // Manamin%, Manamax%, Repeatmin, Repeatmax - AcceptedQuest = 19, // Questid(0any) - RewardQuest = 20, // Questid(0any) + AcceptedQuest = 19, // QuestID (0 = any), CooldownMin, CooldownMax + RewardQuest = 20, // QuestID (0 = any), CooldownMin, CooldownMax ReachedHome = 21, // None ReceiveEmote = 22, // Emoteid, Cooldownmin, Cooldownmax, Condition, Val1, Val2, Val3 HasAura = 23, // Param1 = Spellid, Param2 = Stack Amount, Param3/4 Repeatmin, Repeatmax diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index 1aa8516b9..2d9f9cb3d 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -3026,6 +3026,7 @@ namespace Game.Entities { m_shouldReacquireTarget = false; m_suppressedTarget = ObjectGuid.Empty; + SetTarget(ObjectGuid.Empty); m_suppressedOrientation = 0.0f; } diff --git a/Source/Game/Entities/Pet.cs b/Source/Game/Entities/Pet.cs index 57edff234..68284d3c8 100644 --- a/Source/Game/Entities/Pet.cs +++ b/Source/Game/Entities/Pet.cs @@ -68,6 +68,9 @@ namespace Game.Entities // Register the pet for guid lookup base.AddToWorld(); InitializeAI(); + ZoneScript zoneScript = GetZoneScript() != null ? GetZoneScript() : GetInstanceScript(); + if (zoneScript != null) + zoneScript.OnCreatureCreate(this); } // Prevent stuck pets when zoning. Pets default to "follow" when added to world diff --git a/Source/Game/Spells/SpellManager.cs b/Source/Game/Spells/SpellManager.cs index 9cef4c49d..a561d96fd 100644 --- a/Source/Game/Spells/SpellManager.cs +++ b/Source/Game/Spells/SpellManager.cs @@ -4251,6 +4251,12 @@ namespace Game.Entities spellInfo.ProcChance = 10; }); + // Baron Rivendare (Stratholme) - Unholy Aura + ApplySpellFix(new [] { 17466, 17467 }, spellInfo => + { + spellInfo.AttributesEx3 |= SpellAttr3.NoInitialAggro; + }); + // // FIRELANDS SPELLS // diff --git a/Source/Game/Weather/WeatherManager.cs b/Source/Game/Weather/WeatherManager.cs index c5659b7f9..b992495cf 100644 --- a/Source/Game/Weather/WeatherManager.cs +++ b/Source/Game/Weather/WeatherManager.cs @@ -404,6 +404,7 @@ namespace Game { Fine = 0, Fog = 1, // Used in some instance encounters. + Drizzle = 2, LightRain = 3, MediumRain = 4, HeavyRain = 5,