mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-20 09:11:30 +00:00
Modify eye of zomm support to be more efficient.
This commit is contained in:
parent
8f5bd52e24
commit
194c61a467
@ -32,6 +32,7 @@
|
|||||||
#define SPELL_HARM_TOUCH2 2821
|
#define SPELL_HARM_TOUCH2 2821
|
||||||
#define SPELL_IMP_HARM_TOUCH 2774
|
#define SPELL_IMP_HARM_TOUCH 2774
|
||||||
#define SPELL_NPC_HARM_TOUCH 929
|
#define SPELL_NPC_HARM_TOUCH 929
|
||||||
|
#define SPELL_EYE_OF_ZOMM 323
|
||||||
|
|
||||||
|
|
||||||
#define EFFECT_COUNT 12
|
#define EFFECT_COUNT 12
|
||||||
|
|||||||
@ -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)
|
glm::vec2(8, 8), glm::vec2(-8, 8), glm::vec2(8, -8), glm::vec2(-8, -8)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NPC* swarm_pet_npc;
|
||||||
|
|
||||||
while (summon_count > 0) {
|
while (summon_count > 0) {
|
||||||
int pet_duration = pet.duration;
|
int pet_duration = pet.duration;
|
||||||
if (duration_override > 0)
|
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));
|
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
|
(npc_dup != nullptr) ? npc_dup : npc_type, //make sure we give the NPC the correct data pointer
|
||||||
0,
|
0,
|
||||||
GetPosition() + glm::vec4(swarmPetLocations[summon_count], 0.0f, 0.0f),
|
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--;
|
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...
|
//the target of these swarm pets will take offense to being cast on...
|
||||||
if (targ != nullptr)
|
if (targ != nullptr)
|
||||||
targ->AddToHateList(this, 1, 0);
|
targ->AddToHateList(this, 1, 0);
|
||||||
|
|||||||
@ -265,6 +265,7 @@ Client::Client(EQStreamInterface* ieqs)
|
|||||||
PendingTranslocate = false;
|
PendingTranslocate = false;
|
||||||
PendingSacrifice = false;
|
PendingSacrifice = false;
|
||||||
controlling_boat_id = 0;
|
controlling_boat_id = 0;
|
||||||
|
controlled_mob_id = 0;
|
||||||
|
|
||||||
if (!RuleB(Character, PerCharacterQglobalMaxLevel) && !RuleB(Character, PerCharacterBucketMaxLevel)) {
|
if (!RuleB(Character, PerCharacterQglobalMaxLevel) && !RuleB(Character, PerCharacterBucketMaxLevel)) {
|
||||||
SetClientMaxLevel(0);
|
SetClientMaxLevel(0);
|
||||||
|
|||||||
@ -796,6 +796,7 @@ public:
|
|||||||
|
|
||||||
void SummonHorse(uint16 spell_id);
|
void SummonHorse(uint16 spell_id);
|
||||||
void SetHorseId(uint16 horseid_in);
|
void SetHorseId(uint16 horseid_in);
|
||||||
|
inline void SetControlledMobId(uint16 mob_id_in) { controlled_mob_id = mob_id_in; }
|
||||||
uint16 GetHorseId() const { return horseId; }
|
uint16 GetHorseId() const { return horseId; }
|
||||||
bool CanMedOnHorse();
|
bool CanMedOnHorse();
|
||||||
|
|
||||||
@ -1431,6 +1432,7 @@ private:
|
|||||||
bool berserk;
|
bool berserk;
|
||||||
bool dead;
|
bool dead;
|
||||||
uint16 controlling_boat_id;
|
uint16 controlling_boat_id;
|
||||||
|
uint16 controlled_mob_id;
|
||||||
uint16 TrackingID;
|
uint16 TrackingID;
|
||||||
uint16 CustomerID;
|
uint16 CustomerID;
|
||||||
uint16 TraderID;
|
uint16 TraderID;
|
||||||
|
|||||||
@ -4390,12 +4390,9 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) {
|
|||||||
// so that other clients see it. I could add a check here for eye of zomm
|
// so that other clients see it. I could add a check here for eye of zomm
|
||||||
// race, to limit this code, but this should handle any client controlled
|
// race, to limit this code, but this should handle any client controlled
|
||||||
// mob that gets updates from OP_ClientUpdate
|
// mob that gets updates from OP_ClientUpdate
|
||||||
|
if (ppu->spawn_id == controlled_mob_id) {
|
||||||
Mob *cmob = entity_list.GetMob(ppu->spawn_id);
|
Mob *cmob = entity_list.GetMob(ppu->spawn_id);
|
||||||
if (cmob != nullptr) {
|
if (cmob != nullptr) {
|
||||||
// Make sure it's their eye..
|
|
||||||
char eye_name[64];
|
|
||||||
snprintf(eye_name, sizeof(eye_name),"Eye of %s",GetCleanName());
|
|
||||||
if (!strcmp(eye_name, cmob->GetCleanName())) {
|
|
||||||
cmob->SetPosition(ppu->x_pos, ppu->y_pos, ppu->z_pos);
|
cmob->SetPosition(ppu->x_pos, ppu->y_pos, ppu->z_pos);
|
||||||
cmob->SetHeading(EQ12toFloat(ppu->heading));
|
cmob->SetHeading(EQ12toFloat(ppu->heading));
|
||||||
mMovementManager->SendCommandToClients(cmob, 0.0, 0.0, 0.0,
|
mMovementManager->SendCommandToClients(cmob, 0.0, 0.0, 0.0,
|
||||||
|
|||||||
@ -4039,6 +4039,15 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
|||||||
SetLevel(GetOrigLevel());
|
SetLevel(GetOrigLevel());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case SE_EyeOfZomm:
|
||||||
|
{
|
||||||
|
if (IsClient())
|
||||||
|
{
|
||||||
|
CastToClient()->SetControlledMobId(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user