mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
Modify eye of zomm support to be more efficient.
This commit is contained in:
+7
-1
@@ -109,6 +109,8 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
glm::vec2(8, 8), glm::vec2(-8, 8), glm::vec2(8, -8), glm::vec2(-8, -8)
|
||||
};
|
||||
|
||||
NPC* swarm_pet_npc;
|
||||
|
||||
while (summon_count > 0) {
|
||||
int pet_duration = pet.duration;
|
||||
if (duration_override > 0)
|
||||
@@ -122,7 +124,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
memcpy(npc_dup, made_npc, sizeof(NPCType));
|
||||
}
|
||||
|
||||
NPC* swarm_pet_npc = new NPC(
|
||||
swarm_pet_npc = new NPC(
|
||||
(npc_dup != nullptr) ? npc_dup : npc_type, //make sure we give the NPC the correct data pointer
|
||||
0,
|
||||
GetPosition() + glm::vec4(swarmPetLocations[summon_count], 0.0f, 0.0f),
|
||||
@@ -162,6 +164,10 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
summon_count--;
|
||||
}
|
||||
|
||||
if (IsClient() && spell_id == SPELL_EYE_OF_ZOMM) {
|
||||
CastToClient()->SetControlledMobId(swarm_pet_npc->GetID());
|
||||
}
|
||||
|
||||
//the target of these swarm pets will take offense to being cast on...
|
||||
if (targ != nullptr)
|
||||
targ->AddToHateList(this, 1, 0);
|
||||
|
||||
Reference in New Issue
Block a user