aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorMeji <alvaromegias_46@hotmail.com>2021-12-25 15:27:58 +0100
committerGitHub <noreply@github.com>2021-12-25 15:27:58 +0100
commit924182f692bde38d8fed85d5dbe7531a09790501 (patch)
treeec5b5c5842315ad391d1da9cd236952159a03fd4 /src/server/game/Spells/Spell.cpp
parent8ac0388870519a085115454783dafed873c1535f (diff)
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).
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp2
1 files changed, 1 insertions, 1 deletions
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())