Zombie Infestation

Hoping to learn a bit of c++, I figured I’d try to bring back one of my favorite events (so already, I’m in over my head /emoticons/default_tongue.png ). Or parts of it, at least. Working so far are the linked auras that make you a zombie -

– Link zombie effects auras
DELETE FROM spell_linked_spell WHERE spell_trigger=43869 AND spell_effect =-43869;
INSERT INTO spell_linked_spell (spell_trigger, spell_effect, type, comment) VALUES
(8326, -43869, 1, ‘remove You’re a Zombie!’),
(43869, 43945, 2, ‘You’re a …! (Effects1)’),
(43869, 44305, 2, ‘You’re a …! (Effects2)’),
(43869, 48050, 2, ‘You’re a …! (Effects3)’),
(43869, 54059, 2, ‘You’re a …! (Effects4)’),
(43869, 54145, 2, ‘You’re a …! (Effects5)’),
(43869, 54147, 2, ‘You’re a …! (Effects6)’),
(43869, 54162, 2, ‘You’re a …! (Effects7)’);

The one part I’m having a bit of trouble with is the disease that leads to the transformation. On its own, the disease only has an absorb damage effect, and no duration. I tried adding a correction to spellMgr, using the dbc info for Living Bomb as reference -

case 43958: // You’re Infected!
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(1);
spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_PERIODIC_TRIGGER_SPELL;
spellInfo->Effects[EFFECT_1].Amplitude = 10000;
spellInfo->Effects[EFFECT_1].TriggerSpell = 43869;
spellInfo->Effects[EFFECT_1].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ENEMY);
spellInfo->Effects[EFFECT_1].TargetB = SpellImplicitTargetInfo();
break;

The duration at least works, but so far the trigger doesn’t. I’ve tried different target types, but the results are the same. I’m sure there’s something else I’m missing, but at the moment I don’t know what.

Apart from the trigger, the next biggest challenge would be changing the disease’s duration for each day of the event. Does anyone know of something similar that I could use as reference?

Bit of a hack solution, but I got the zombie spell trigger to work in the DB, along with the cure -

– Cast You're A Zombie! when the You're Infected! debuff wears off.
SET @ZOMBIE := 43869;
SET @INFECTED := 43958;
SET @INFECT := 48953;
SET @CURE := 48309;
SET @CURE_EFFECT := 47178;
INSERT INTO world.spell_linked_spell (spell_trigger, spell_effect, comment) VALUES (@INFECTED*-1, @ZOMBIE, ‘You’re Infected!’);

– Removing the infection
– Cast ‘Plague Effect Self’ as part of ‘Cure Infection’
INSERT INTO world.spell_scripts (id, command, datalong, datalong2) VALUES (@CURE, 15, @CURE_EFFECT, 0);
INSERT INTO world.spell_linked_spell (spell_trigger, spell_effect, type, comment) VALUES (@CURE_EFFECT, @ZOMBIE*-1, 2, ‘immune to You’re a Zombie!’);
INSERT INTO world.spell_linked_spell (spell_trigger, spell_effect, type, comment) VALUES (@CURE_EFFECT, @INFECTED*-1, 1, ‘remove You’re Infected’);
INSERT INTO world.spell_linked_spell (spell_trigger, spell_effect, type, comment) VALUES (@CURE_EFFECT, @INFECTED*-1, 2, ‘immune to You’re Infected’);

– cast ‘You’re Infected!’ on players when they click the conspicuous crate.
DELETE FROM spell_scripts WHERE id = @INFECT;
INSERT INTO spell_scripts (id, command, datalong, datalong2, dataint) VALUES (@INFECT, 15, @INFECTED, 2, 1);

I’ve also placed Conspicuous Crates in all the major cities, using screenshots and maps from the event as a guide - Dropbox Link

did you use the event system to spawn/despawn etc. for the event?

Not yet. I still need to find out how to automatically find and copy the guids between the tables, based on the object entry.

any updates? /emoticons/default_smile.png

Same here… any updates?

I haven’t given up on this, though a lot of it may be beyond me.

Working so far - infection from crates and transformation into a zombie; linked zombie auras, and their removal on death; Zombie Explosion, or at least the part where it kills you and damages nearby mobs.

Not working - players can’t infect other players or NPCs. The infection is triggered by a “bite” proc from one of the zombie auras, but so far everything I’ve tried makes it proc on the player and not their target. While friendly NPCs appear hostile when you’re a zombie, they don’t attack, even if you attack them. Retching the ground doesn’t appear to work - the bunny spawns, but doesn’t generate the cloud that heals zombies and slows/infects uninfected players. Zombie Explosion doesn’t spread the infection, yet.

Anyone wants to take a crack at this, do so at your own risk. Especially with the c++ code, since I definitely don’t know what I’m doing. Here are the files on Dropbox, in case I make further progress -

https://www.dropbox.com/s/hwcqrnl2qz0movs/zombieInfestation.sql?dl=0

https://www.dropbox.com/s/okgno48uhnfygsg/zombieInfestation.cpp?dl=0

I’ve also set up a wiki page for all the information I’ve found so far.