scriptdev2 / scriptdev2-cata

ScriptDev2 for Cataclysm

Home Page:http://www.scriptdev2.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deathbound Ward

opened this issue · comments

http://www.wowhead.com/npc=37007/deathbound-ward#comments
Specific npc, after activate spirit alarm traps should start waypoint movement.
Npc has 4 guids.
EscortAI can not help there.
Wowhead link has more details.
http://paste2.org/hcYYXxwJ old hacks db patch
SD2 small script https://github.com/Ulduar/scriptdev2-cata/commit/efaaf1c9a21dd8ecdd87ace21b47275d458389ac
Maybe this can help.

Small update

commit c5ab71574c2649729440d936ee87b8d0d480b96c
Author: Xfurry <xfurry@scriptdev2.com>
Date:   Thu Apr 23 21:56:14 2015 +0600

    ICC placeholder

diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.cpp
index a6cd1cd..8efdf4e 100644
--- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.cpp
+++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.cpp
@@ -22,17 +22,17 @@ SDCategory: Icecrown
 EndScriptData */

 /* ContentData
-event_spirit_alarm
+event_spirit_geist_alarm
 EndScriptData */

 #include "precompiled.h"
 #include "icecrown_citadel.h"

 /*######
-## event_spirit_alarm
+## event_spirit_geist_alarm
 ######*/

-bool ProcessEventId_event_spirit_alarm(uint32 uiEventId, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/)
+bool ProcessEventId_event_spirit_geist_alarm(uint32 uiEventId, Object* pSource, Object* /*pTarget*/, bool /*bIsStart*/)
 {
     if (pSource->GetTypeId() == TYPEID_GAMEOBJECT)
     {
@@ -51,11 +51,14 @@ bool ProcessEventId_event_spirit_alarm(uint32 uiEventId, Object* pSource, Object
                     return false;

                 pWard->RemoveAurasDueToSpell(SPELL_STONE_FORM);
+                pWard->clearUnitState(UNIT_STAT_WAYPOINT_PAUSED);
             }
         }

         return true;
     }
+        // Should summon Vengeful Reaper, Vengeful Reaper should have multi waypoints. 
+        // else if (uiEventID == EVENT_ID_GEIST_ALARM_1 || uiEventID == EVENT_ID_GEIST_ALARM_2)

     return false;
 }
@@ -65,8 +68,8 @@ void AddSC_icecrown_citadel()
     Script* pNewScript;

     pNewScript = new Script;
-    pNewScript->Name = "event_spirit_alarm";
-    pNewScript->pProcessEventId = &ProcessEventId_event_spirit_alarm;
+    pNewScript->Name = "event_spirit_geist_alarm";
+    pNewScript->pProcessEventId = &ProcessEventId_event_spirit_geist_alarm;
     pNewScript->RegisterSelf();

 }
\ No newline at end of file
diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h
index aea9751..43023eb 100644
--- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h
+++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h
@@ -60,6 +60,7 @@ enum
     NPC_RIMEFANG                    = 37533,
     NPC_SPINESTALKER                = 37534,
     NPC_DEATHBOUND_WARD             = 37007,        // Start after activate trap.
+    NPC_VENGEFUL_FLESHREAPER        = 37038,        // Should summoned after activate trap in Plague Wing.

     // GameObjects entries
     GO_ICEWALL_1                    = 201911,
@@ -146,9 +147,16 @@ enum
     EVENT_ID_SPIRIT_ALARM_2         = 22907,
     EVENT_ID_SPIRIT_ALARM_3         = 22908,
     EVENT_ID_SPIRIT_ALARM_4         = 22909,
+    EVENT_ID_GEIST_ALARM_1          = 22869,           // Geist Alarm spells 70739, 70740
+    EVENT_ID_GEIST_ALARM_2          = 22870,           // Geist Alarm summon Vengeful Reaper after trap activate.

     // Spells
     SPELL_STONE_FORM                = 70733,           // Deathbound on spawn cast this aura on self (not repeated)
+    
+    // Misc
+    SAY_ARRIVAL_VENGEFUL_1          = -1631200,
+    SAY_ARRIVAL_VENGEFUL_2          = -1631201,
+    SAY_ARRIVAL_VENGEFUL_3          = -1631202,

     // Achievement criterias
     ACHIEV_CRIT_BONED_10N                  = 12775,     // Lord Marrowgar, achievs 4534, 4610
diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql
index a394318..e6491c9 100644
--- a/sql/scriptdev2_script_full.sql
+++ b/sql/scriptdev2_script_full.sql
@@ -4607,6 +4607,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen
 (-1631198,'%s begins casting Empowered Shock Vortex!',0,3,0,0,'valanar EMOTE_SHOCK_VORTEX'),
 (-1631199,'%s speed toward $N!',0,3,0,0,'taldaram EMOTE_FLAMES');

+(-1631200,'Quickly! We'll ambush them from behind!',16924,6,0,0,'vengeful_fleshreaper SAY_ARRIVAL_VENGEFUL_1'),
+(-1631201,'The living... here?!',16925,6,0,0,'vengeful_fleshreaper SAY_ARRIVAL_VENGEFUL_2'),
+(-1631202,'You... cannot escape us!',16923,6,0,0,'vengeful_fleshreaper SAY_ARRIVAL_VENGEFUL_3'),
+
 -- -1 632 000 ICC: FORGE OF SOULS
 INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
 (-1632000,'More souls to power the engine!',0,1,0,0,'boss_bronjahm SAY_AGGRO_1'),
diff --git a/sql/updates/r3120_scriptdev2.sql b/sql/updates/r3120_scriptdev2.sql
new file mode 100644
index 0000000..c335db0
--- /dev/null
+++ b/sql/updates/r3120_scriptdev2.sql
@@ -0,0 +1,5 @@
+DELETE FROM script_texts WHERE entry IN (-1631200, -1631201, 1631202);
+INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
+(-1631200,'Quickly! We'll ambush them from behind!',16924,6,0,0,'vengeful_fleshreaper SAY_ARRIVAL_VENGEFUL_1'),
+(-1631201,'The living... here?!',16925,6,0,0,'vengeful_fleshreaper SAY_ARRIVAL_VENGEFUL_2'),
+(-1631202,'You... cannot escape us!',16923,6,0,0,'vengeful_fleshreaper SAY_ARRIVAL_VENGEFUL_3');

P.S:
@Rushor, Please note you are not implemented in Trinity traps Plague Wing.

I think you can fix this by dbscripts / eventAI

I think you can fix this by dbscripts / eventAI

How? Look at no necessary functions do not.
They have different points of motion depending on the send event effect, which activates it.
I explain in a simple way:

2)If the trap is activated, which is closer to Stinky and Festergut they appear and begin to patrol towards Festergut first, then go to Rotface, then back to the Festergut and so long as they are alive.

3)else If the trap is activated, which is closer to Precious and Rotface they appear and begin to patrol towards Rotface first, then go to Festergut , then back to the Rotface and so long as they are alive.

Now tell me please, how do I do that with db_script and EventAI?

Here is your answer:

-- Spirit alarms
DELETE FROM dbscripts_on_event WHERE id IN (22900,22907,22908,22909);
INSERT INTO dbscripts_on_event (id,delay,command,buddy_entry,search_radius,data_flags,comments) VALUES
(22900,2,26,37007,120289,19,'Deathbound Ward - attack'), -- front left
(22907,2,26,37007,120290,19,'Deathbound Ward - attack'), -- front right
(22908,2,26,37007,120287,19,'Deathbound Ward - attack'), -- back left
(22909,2,26,37007,120288,19,'Deathbound Ward - attack'); -- back right

I still need to work out a few details, but basically this is how it works.

Warning: It should not attack me when removing the aura, it should start patrolling. Using the guid - bad idea(different base = difficult complication)
Send Event Effects should search Deathbound Ward - if Ward has aura 70733(need implemented in core) - remove aura due to spell and start point movement (movement problem - on evade should continue movement from last ooc point)
There are more and more - if you bring them to a position of the first two of the damned shall go into evade.
Attack Start - error, please do not repeat the mistakes of the Trinity.
http://paste2.org/hcYYXxwJ
Here, too, look. My old hack db patch.
Although still in the first post the link provided.

Ok, I need to investigate this in detail anyway. Probably my script isn't fully correct.

Ok, I need to investigate this in detail anyway. 

I'll provided full detail.

Probably my script isn't fully correct.

It is not necessary to repeat my db hacks!
P.S: 70733 need implemented in core(dummy aura)
Boxa implemented correct in R2.
mangosR2/mangos3@c13a4c8

@Ulduar I will review this soon, when I resume my work on ICC.

Due to some problems with EscortAI, this can be realized through buddy_guid.
Solution:
1)Deathbound Ward - EVENT_T_SPAWN - ACTION_T_PAUSE_WAYPOINT and cast Stoneform aura on self(for avoid repeat).
2)db_script_on_event - clear unit state pause movement and remove Stoneform auras.
3)Deathbound start point movement. On evade return last ooc point.

@xfurry
Geist Alarm spells SpellWork Data:

ID - 70739 Призрачная ловушка
=================================================
Description: Скорость передвижения снижена на $s1%.

ToolTip: Скорость передвижения снижена на $s1%.
Category = 0, SpellIconID = 2458, activeIconID = 0, SpellVisual = (6459,0)
Family SPELLFAMILY_GENERIC, flag [0] 0x00000000 [1] 0x00000000 [2] 0x00000000

SpellSchoolMask = 32 (SPELL_SCHOOL_MASK_SHADOW)
DamageClass = 0 (SPELL_DAMAGE_CLASS_NONE)
PreventionType = 0 (SPELL_PREVENTION_TYPE_NONE)
=================================================
Spell Level = 0, base 0, max 0

Category = 0
DispelType = 0 (DISPEL_NONE)
Mechanic = 0 (MECHANIC_NONE)
SpellRange: (Id 1) "Self Only":
    MinRangeNegative = 0, MinRangePositive = 0
    MaxRangeNegative = 0, MaxRangePositive = 0

Cast time (Id 1) = 0,00
Duration: ID (32)  6000, 0, 6000
Interrupt Flags: 0x00000000, AuraIF 0x00000000, ChannelIF 0x00000000
Chance = 0, charges - 0
=================================================
Effect 0: Id 6 (SPELL_EFFECT_APPLY_AURA) RegularDifficulty
BasePoints = -80
Targets (18, 16) (TARGET_DEST_CASTER, TARGET_UNIT_DEST_AREA_ENEMY)
Aura Id 33 (SPELL_AURA_MOD_DECREASE_SPEED), value = -80, misc = 0 (0), miscB = 0, periodic = 0
Max Radius (Id 9) 20,00
Effect Mechanic = 11 (MECHANIC_SNARE)

Effect 1: Id 61 (SPELL_EFFECT_SEND_EVENT) RegularDifficulty
BasePoints = 0
Targets (0, 0) (NO_TARGET, NO_TARGET)
EffectMiscValueA = 22869

ID - 70740 Призрачная ловушка
=================================================
Description: Скорость передвижения снижена на $s1%. Скорость атаки и произнесения заклинаний снижена на $s2%.

ToolTip: Скорость передвижения снижена на $s1%.
Скорость атаки и произнесения заклинаний снижена на $s2%.
Category = 0, SpellIconID = 2458, activeIconID = 0, SpellVisual = (6459,0)
Family SPELLFAMILY_GENERIC, flag [0] 0x00000000 [1] 0x00000000 [2] 0x00000000

SpellSchoolMask = 32 (SPELL_SCHOOL_MASK_SHADOW)
DamageClass = 0 (SPELL_DAMAGE_CLASS_NONE)
PreventionType = 0 (SPELL_PREVENTION_TYPE_NONE)
=================================================
Spell Level = 0, base 0, max 0

Category = 0
DispelType = 0 (DISPEL_NONE)
Mechanic = 0 (MECHANIC_NONE)
SpellRange: (Id 1) "Self Only":
    MinRangeNegative = 0, MinRangePositive = 0
    MaxRangeNegative = 0, MaxRangePositive = 0

Cast time (Id 1) = 0,00
Duration: ID (32)  6000, 0, 6000
Interrupt Flags: 0x00000000, AuraIF 0x00000000, ChannelIF 0x00000000
Chance = 0, charges - 0
=================================================
Effect 0: Id 6 (SPELL_EFFECT_APPLY_AURA) RegularDifficulty
BasePoints = -80
Targets (18, 16) (TARGET_DEST_CASTER, TARGET_UNIT_DEST_AREA_ENEMY)
Aura Id 33 (SPELL_AURA_MOD_DECREASE_SPEED), value = -80, misc = 0 (0), miscB = 0, periodic = 0
Max Radius (Id 9) 20,00
Effect Mechanic = 11 (MECHANIC_SNARE)

Effect 1: Id 6 (SPELL_EFFECT_APPLY_AURA) RegularDifficulty
BasePoints = -40
Targets (18, 16) (TARGET_DEST_CASTER, TARGET_UNIT_DEST_AREA_ENEMY)
Aura Id 193 (SPELL_AURA_MELEE_SLOW), value = -40, misc = 0 (0), miscB = 0, periodic = 0
Max Radius (Id 9) 20,00
Effect Mechanic = 11 (MECHANIC_SNARE)

Effect 2: Id 61 (SPELL_EFFECT_SEND_EVENT) RegularDifficulty
BasePoints = 0
Targets (0, 0) (NO_TARGET, NO_TARGET)
EffectMiscValueA = 22870

I added the GOs here: unified-db/Database@0a95faf

Will add the event later, similar to unified-db/Database@9072d44