[Spells] Eye of Zomm will now despawn and stack properly (#1849)

* [Spells] Eye of Zomm stop chain spawning

No more chain spawning.

* [Spells] Eye of Zomm stop chain spawning

* [Spells] Eye of Zomm update
This commit is contained in:
KayenEQ 2021-11-27 12:11:23 -05:00 committed by GitHub
parent 6a28828e08
commit 8688e9c9fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 3 deletions

View File

@ -162,6 +162,7 @@
#define SPELL_RESURRECTION_SICKNESS3 37624
#define SPELL_PACT_OF_HATE_RECOURSE 40375
#define SPELL_INCENDIARY_OOZE_BUFF 32513
#define SPELL_EYE_OF_ZOMM 323
//spellgroup ids
#define SPELLGROUP_FRENZIED_BURNOUT 2754

View File

@ -848,6 +848,7 @@ public:
void SummonHorse(uint16 spell_id);
void SetHorseId(uint16 horseid_in);
inline void SetControlledMobId(uint16 mob_id_in) { controlled_mob_id = mob_id_in; }
uint16 GetControlledMobId() const{ return controlled_mob_id; }
uint16 GetHorseId() const { return horseId; }
bool CanMedOnHorse();

View File

@ -300,6 +300,7 @@ public:
void PickPocket(Client* thief);
void Disarm(Client* client, int chance);
void StartSwarmTimer(uint32 duration) { swarm_timer.Start(duration); }
void DisableSwarmTimer() { swarm_timer.Disable(); }
void AddLootDrop(
const EQ::ItemData *item2,

View File

@ -4440,9 +4440,17 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
case SE_EyeOfZomm:
{
if (IsClient())
{
CastToClient()->SetControlledMobId(0);
{
NPC* tmp_eye_of_zomm = entity_list.GetNPCByID(CastToClient()->GetControlledMobId());
//On live there is about a 6 second delay before it despawns once new one spawns.
if (tmp_eye_of_zomm) {
tmp_eye_of_zomm->GetSwarmInfo()->duration->Disable();
tmp_eye_of_zomm->GetSwarmInfo()->duration->Start(6000);
tmp_eye_of_zomm->DisableSwarmTimer();
tmp_eye_of_zomm->StartSwarmTimer(6000);
}
CastToClient()->SetControlledMobId(0);
}
}
case SE_Weapon_Stance:

View File

@ -221,8 +221,9 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
return(false);
}
if (spellbonuses.NegateIfCombat)
if (spellbonuses.NegateIfCombat) {
BuffFadeByEffect(SE_NegateIfCombat);
}
if (IsClient() && IsHarmonySpell(spell_id) && !HarmonySpellLevelCheck(spell_id, entity_list.GetMobID(target_id))) {
InterruptSpell(SPELL_NO_EFFECT, 0x121, spell_id);
@ -3019,6 +3020,12 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
}
if (spellid1 == spellid2 ) {
if (spellid1 == SPELL_EYE_OF_ZOMM && spellid2 == SPELL_EYE_OF_ZOMM) {//only the original Eye of Zomm spell will not take hold if affect is already on you, other versions client fades the buff as soon as cast.
MessageString(Chat::Red, SPELL_NO_HOLD);
return -1;
}
if (!IsStackableDot(spellid1) && !IsEffectInSpell(spellid1, SE_ManaBurn)) { // mana burn spells we need to use the stacking command blocks live actually checks those first, we should probably rework to that too
if (caster_level1 > caster_level2) { // cur buff higher level than new
if (IsEffectInSpell(spellid1, SE_ImprovedTaunt)) {