From 924182f692bde38d8fed85d5dbe7531a09790501 Mon Sep 17 00:00:00 2001 From: Meji Date: Sat, 25 Dec 2021 15:27:58 +0100 Subject: Core/BattlePets: Misc fixes (#27446) * Added script for "Summon Battle Pet" spell (118301). * Set the saved display of the battle pet when summoning it. * If a summon has SummonPropertiesFlags::SummonFromBattlePetJournal it will remove NpcFlag UNIT_NPC_FLAG_WILD_BATTLE_PET (Wild battle pets). * When a creature is summoned with SummonTitle::Companion, it will check to see if it has SummonPropertiesFlags::SummonFromBattlePetJournal before updating the battle pet's update fields. (If you have a summoned battle pet and summon a creature with that SummonTitle, it will incorrectly update the battle pet's update fields with the summoned battle pet's data). * Implemented SummonPropertiesFlags::UseCreatureLevel. If a summon has this flag, it will use the owner's level (If the summon doesn't have SummonProperties it will always use the selected level). --- src/server/game/Spells/Spell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 8b430ff7714..6e7dc569cc1 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -6009,7 +6009,7 @@ SpellCastResult Spell::CheckCast(bool strict, int32* param1 /*= nullptr*/, int32 Creature* creature = m_targets.GetUnitTarget()->ToCreature(); if (creature) { - if (!playerCaster->GetSummonedBattlePetGUID() || !creature->GetBattlePetCompanionGUID()) + if (playerCaster->GetSummonedBattlePetGUID().IsEmpty() || creature->GetBattlePetCompanionGUID().IsEmpty()) return SPELL_FAILED_NO_PET; if (playerCaster->GetSummonedBattlePetGUID() != creature->GetBattlePetCompanionGUID()) -- cgit v1.2.3