mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-25 10:28:23 +00:00
Cleanup DetermineSpellTargets->ST_Pet
This commit is contained in:
+8
-10
@@ -2073,23 +2073,21 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
}
|
}
|
||||||
case ST_Pet:
|
case ST_Pet:
|
||||||
{
|
{
|
||||||
if (
|
bool bot_casting_on_other_pet = IsBot() &&
|
||||||
!(
|
|
||||||
IsBot() &&
|
|
||||||
spell_target &&
|
spell_target &&
|
||||||
spell_target->GetOwner() != this &&
|
spell_target->GetOwner() != this &&
|
||||||
RuleB(Bots, CanCastPetOnlyOnOthersPets)
|
RuleB(Bots, CanCastPetOnlyOnOthersPets);
|
||||||
)
|
|
||||||
) {
|
|
||||||
|
|
||||||
|
if (!bot_casting_on_other_pet) {
|
||||||
spell_target = GetPet();
|
spell_target = GetPet();
|
||||||
}
|
}
|
||||||
if(!spell_target)
|
|
||||||
{
|
if (!spell_target) {
|
||||||
LogSpells("Spell [{}] canceled: invalid target (no pet)", spell_id);
|
LogSpells("Spell [{}] canceled: invalid target (no pet)", spell_id);
|
||||||
MessageString(Chat::Red,NO_PET);
|
MessageString(Chat::Red, NO_PET);
|
||||||
return false; // can't cast these unless we have a target
|
return false; // Can't cast these unless we have a target
|
||||||
}
|
}
|
||||||
|
|
||||||
CastAction = SingleTarget;
|
CastAction = SingleTarget;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user