aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/FULL/world_spell_full.sql1
-rw-r--r--sql/updates/4481_world_script.sql2
-rw-r--r--src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp107
-rw-r--r--src/game/SpellEffects.cpp4
5 files changed, 111 insertions, 4 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index b700a19f87b..408a2117bea 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -114,6 +114,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_ros_dark_rider' WHERE `entry`=2
UPDATE `creature_template` SET `ScriptName`='npc_dkc1_gothik' WHERE `entry`=28658;
UPDATE `creature_template` SET `ScriptName`='npc_a_special_surprise' WHERE `entry` IN (29032, 29061, 29065, 29067, 29068, 29070, 29074, 29072, 29073, 29071);
UPDATE `creature_template` SET `ScriptName`='npc_demolisher_engineerer' WHERE `entry` IN (30400, 30499);
+UPDATE `creature_template` SET `ScriptName`='npc_valkyr_battle_maiden' WHERE `entry`=28534;
/* */
/* ZONE */
diff --git a/sql/FULL/world_spell_full.sql b/sql/FULL/world_spell_full.sql
index 82bcecbc7fa..31cbabf7777 100644
--- a/sql/FULL/world_spell_full.sql
+++ b/sql/FULL/world_spell_full.sql
@@ -1203,6 +1203,7 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
( 51698, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 1), -- Honor Among Thieves (Rank 1)
( 51700, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 1), -- Honor Among Thieves (Rank 2)
( 51701, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 1), -- Honor Among Thieves (Rank 3)
+( 51915, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0, 100, 600), -- Undying Resolve
( 51940, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 20, 0), -- Earthliving Weapon (Passive) (Rank 1)
( 51989, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 20, 0), -- Earthliving Weapon (Passive) (Rank 2)
( 52004, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 20, 0), -- Earthliving Weapon (Passive) (Rank 3)
diff --git a/sql/updates/4481_world_script.sql b/sql/updates/4481_world_script.sql
new file mode 100644
index 00000000000..4f951607357
--- /dev/null
+++ b/sql/updates/4481_world_script.sql
@@ -0,0 +1,2 @@
+UPDATE `creature_template` SET `ScriptName`='npc_valkyr_battle_maiden' WHERE (`entry`='28534');
+INSERT iGNORE INTO `spell_proc_event` VALUES ( 51915, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0, 100, 600); \ No newline at end of file
diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
index 9870451b836..d0343c9b5a5 100644
--- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
+++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
@@ -618,7 +618,6 @@ struct TRINITY_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI
m_creature->SetDisplayId(m_creature->GetNativeDisplayId());
event_starter = 0;
event_startet = false;
-
m_creature->SetHomePosition(home_x,home_y,home_z,home_ori);
m_creature->GetMotionMaster()->MoveTargetedHome();
}
@@ -1183,6 +1182,107 @@ CreatureAI* GetAI_npc_dkc1_gothik(Creature *_Creature)
// npc 28912 quest 17217 boss 29001 mob 29007 go 191092
+/*####
+## npc_valkyr_battle_maiden
+####*/
+#define SPELL_REVIVE 51918
+#define VALK_WHISPER "It is not yet your time, champion. Rise! Rise and fight once more!"
+
+struct TRINITY_DLL_DECL npc_valkyr_battle_maidenAI : public ScriptedAI
+{
+ npc_valkyr_battle_maidenAI(Creature *c) : ScriptedAI(c) {}
+
+ Player *Owner;
+ uint32 FlyBackTimer;
+ uint64 TargetGUID;
+ float x, y, z;
+ uint32 phase;
+
+ void Reset()
+ {
+ m_creature->SetVisibility(VISIBILITY_OFF);
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ m_creature->SetFlying(true);
+ FlyBackTimer = 500;
+ phase = 0;
+
+ Owner = NULL;
+ m_creature->GetPosition(x, y, z);
+ z += 4; x -= 3.5; y -= 5;
+ m_creature->GetMotionMaster()->Clear(false);
+ m_creature->Relocate(x, y, z);
+ }
+
+ void Aggro(Unit *who){}
+
+ void AttackStart(Unit *who){}
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!Owner)
+ {
+ TargetGUID = m_creature->GetOwnerGUID();
+ Owner = Unit::GetPlayer(TargetGUID);
+ return;
+ }
+
+ if (Owner->isAlive())
+ phase = 3;
+
+ if (FlyBackTimer < diff)
+ {
+ switch(phase)
+ {
+ case 0:
+ m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ m_creature->HandleEmoteCommand(EMOTE_STATE_FLYGRABCLOSED);
+ FlyBackTimer = 500;
+ phase = 1;
+ break;
+ case 1:
+ Owner->GetClosePoint(x,y,z, m_creature->GetObjectSize());
+ z += 2.5; x -= 2; y -= 1.5;
+ m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
+ m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Owner->GetGUID());
+ m_creature->SetVisibility(VISIBILITY_ON);
+ FlyBackTimer = 4500;
+ phase = 2;
+ break;
+ case 2:
+ if(!Owner->isRessurectRequested())
+ {
+ m_creature->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOMSPELL01);
+ DoCast(Owner, SPELL_REVIVE,true);
+ DoWhisper(VALK_WHISPER,Owner);
+ }
+ FlyBackTimer = 5000;
+ phase = 3;
+ break;
+ case 3:
+ m_creature->SetVisibility(VISIBILITY_OFF);
+ FlyBackTimer = 2000;
+ phase = 4;
+ break;
+ case 4:
+ m_creature->setDeathState(JUST_DIED);
+ m_creature->RemoveCorpse();
+ break;
+ default:
+ //Nothing To DO
+ break;
+ }
+ }else FlyBackTimer-=diff;
+ }
+
+ void MoveInLineOfSight(Unit *who){}
+
+};
+
+CreatureAI* GetAI_npc_valkyr_battle_maiden(Creature *_Creature)
+{
+ return new npc_valkyr_battle_maidenAI (_Creature);
+}
+
void AddSC_the_scarlet_enclave()
{
Script *newscript;
@@ -1233,4 +1333,9 @@ void AddSC_the_scarlet_enclave()
newscript->Name = "npc_a_special_surprise";
newscript->GetAI = &GetAI_npc_a_special_surprise;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_valkyr_battle_maiden";
+ newscript->GetAI = &GetAI_npc_valkyr_battle_maiden;
+ newscript->RegisterSelf();
}
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index b34fab6afc9..20c60fdb0a3 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3461,11 +3461,9 @@ void Spell::EffectSummonType(uint32 i)
TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
TempSummon * summon = m_originalCaster->SummonCreature(entry,px,py,pz,m_caster->GetOrientation(),summonType,duration);
+ summon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_originalCaster->GetGUID());
if (properties->Category == SUMMON_CATEGORY_ALLY)
- {
- summon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_originalCaster->GetGUID());
summon->setFaction(m_originalCaster->getFaction());
- }
}
break;
}