Added support for all SE_EyeOfZomm and some other small changes

This commit is contained in:
Noudess 2019-10-28 19:48:31 -04:00
parent 194c61a467
commit 566e6ea307
5 changed files with 11 additions and 7 deletions

View File

@ -36,7 +36,7 @@ Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
extern QueryServ* QServ;
void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, uint32 duration_override, bool followme, bool sticktarg) {
void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, uint32 duration_override, bool followme, bool sticktarg, uint16 *eye_id) {
//It might not be a bad idea to put these into the database, eventually..
@ -164,8 +164,8 @@ 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());
if (IsClient() && eye_id != nullptr) {
*eye_id = swarm_pet_npc->GetID();
}
//the target of these swarm pets will take offense to being cast on...

View File

@ -10784,7 +10784,7 @@ void Client::Handle_OP_PopupResponse(const EQApplicationPacket *app)
}
char buf[16];
sprintf(buf, "%d\0", popup_response->popupid);
sprintf(buf, "%d", popup_response->popupid);
parse->EventPlayer(EVENT_POPUP_RESPONSE, this, buf, 0);

View File

@ -1208,7 +1208,7 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
// Changing the second string made no visible difference
sprintf(ns->spawn.DestructibleName2, "%s", ns->spawn.name);
// Putting a string in the final one that was previously empty had no visible effect.
sprintf(ns->spawn.DestructibleString, "");
ns->spawn.DestructibleString[0] = '\0';
// Sets damage appearance level of the object.
ns->spawn.DestructibleAppearance = luclinface; // Was 0x00000000

View File

@ -762,7 +762,7 @@ public:
virtual void UnStun();
inline void Silence(bool newval) { silenced = newval; }
inline void Amnesia(bool newval) { amnesiad = newval; }
void TemporaryPets(uint16 spell_id, Mob *target, const char *name_override = nullptr, uint32 duration_override = 0, bool followme=true, bool sticktarg=false);
void TemporaryPets(uint16 spell_id, Mob *target, const char *name_override = nullptr, uint32 duration_override = 0, bool followme=true, bool sticktarg=false, uint16 *controlled_pet_id = nullptr);
void TypesTemporaryPets(uint32 typesid, Mob *target, const char *name_override = nullptr, uint32 duration_override = 0, bool followme=true, bool sticktarg=false);
void WakeTheDead(uint16 spell_id, Mob *target, uint32 duration);
void Spin();

View File

@ -1561,7 +1561,11 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
char eye_name[64];
snprintf(eye_name, sizeof(eye_name), "Eye_of_%s", caster->GetCleanName());
int duration = CalcBuffDuration(caster, this, spell_id) * 6;
caster->TemporaryPets(spell_id, nullptr, eye_name, duration, false);
uint16 eye_id=0;
caster->TemporaryPets(spell_id, nullptr, eye_name, duration, false, false, &eye_id);
if (eye_id != 0) {
caster->CastToClient()->SetControlledMobId(eye_id);
}
}
break;
}