Core/Misc: Remove unneeded ToCreature() casts
Remove some ToCreature() casts not needed anymore after 1ee90e1022 changes that moved IsPet() from Creature to Unit
This commit is contained in:
1 parent
5f0f152345
commit
d243630acf
8 files changed
+31
-31
No files matched your search
@@ -3773,7 +3773,7 @@ void Spell::SendSpellStart()
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_REQ_AMMO))
|
||||
castFlags |= CAST_FLAG_AMMO;
|
||||
if ((m_caster->GetTypeId() == TYPEID_PLAYER ||
|
||||
(m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsPet()))
|
||||
(m_caster->GetTypeId() == TYPEID_UNIT && m_caster->IsPet()))
|
||||
&& m_spellInfo->PowerType != POWER_HEALTH)
|
||||
castFlags |= CAST_FLAG_POWER_LEFT_SELF;
|
||||
|
||||
@@ -3827,7 +3827,7 @@ void Spell::SendSpellGo()
|
||||
castFlags |= CAST_FLAG_AMMO; // arrows/bullets visual
|
||||
|
||||
if ((m_caster->GetTypeId() == TYPEID_PLAYER ||
|
||||
(m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsPet()))
|
||||
(m_caster->GetTypeId() == TYPEID_UNIT && m_caster->IsPet()))
|
||||
&& m_spellInfo->PowerType != POWER_HEALTH)
|
||||
castFlags |= CAST_FLAG_POWER_LEFT_SELF; // should only be sent to self, but the current messaging doesn't make that possible
|
||||
|
||||
|
||||
Reference in new issue
Block a user