mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-06 01:03:52 +00:00
Make TemporaryPets take into account pet power
This commit is contained in:
parent
9229ca4f79
commit
2a97d980b7
14
zone/aa.cpp
14
zone/aa.cpp
@ -46,8 +46,20 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
if (targ != nullptr && targ->IsCorpse())
|
||||
return;
|
||||
|
||||
// yep, even these need pet power!
|
||||
int act_power = 0;
|
||||
|
||||
if (IsClient()) {
|
||||
act_power = CastToClient()->GetFocusEffect(focusPetPower, spell_id);
|
||||
act_power = CastToClient()->mod_pet_power(act_power, spell_id);
|
||||
}
|
||||
#ifdef BOTS
|
||||
else if (this->IsBot())
|
||||
act_power = CastToBot()->GetBotFocusEffect(Bot::BotfocusPetPower, spell_id);
|
||||
#endif
|
||||
|
||||
PetRecord record;
|
||||
if (!database.GetPetEntry(spells[spell_id].teleport_zone, &record))
|
||||
if (!database.GetPoweredPetEntry(spells[spell_id].teleport_zone, act_power, &record))
|
||||
{
|
||||
Log(Logs::General, Logs::Error, "Unknown swarm pet spell id: %d, check pets table", spell_id);
|
||||
Message(13, "Unable to find data for pet %s", spells[spell_id].teleport_zone);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user