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
@@ -441,7 +441,7 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
|
||||
// Shadow Bite
|
||||
else if (m_spellInfo->SpellFamilyFlags[1] & 0x400000)
|
||||
{
|
||||
if (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->ToCreature()->IsPet())
|
||||
if (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->IsPet())
|
||||
{
|
||||
if (Player* owner = m_caster->GetOwner()->ToPlayer())
|
||||
{
|
||||
@@ -5718,7 +5718,7 @@ void Spell::EffectRenamePet(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT ||
|
||||
!unitTarget->ToCreature()->IsPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
|
||||
!unitTarget->IsPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
|
||||
return;
|
||||
|
||||
unitTarget->SetByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED);
|
||||
|
||||
Reference in new issue
Block a user