aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts
diff options
context:
space:
mode:
authorQAston <none@none>2009-07-22 17:10:30 +0200
committerQAston <none@none>2009-07-22 17:10:30 +0200
commit2ff21d4cefc6c871790676de9461f5bd105bde66 (patch)
tree792e50dfdd0f3dc39624e73cda72633db491ceb0 /src/bindings/scripts
parenta00473d79510f80ae1fd6b4ed882d0e696c22659 (diff)
*Implement Aura Type 247 (SPELL_AURA_CLONE_CASTER) and 279 (SPELL_AURA_INITIALIZE_IMAGES)
*Handle CMSG_GET_MIRRORIMAGE_DATA opcode. *Save Minions follow angle to allow themmoving in a formation *Improvements in SpellAI: correctly evade and select attack target for creatures without threat list *Use SpellAI instead of PetAI for not controllable guardians *Only guardians with SUMMON_TYPE_PET are controllable now *Add script and template data for Mirror Image. *Thanks to Drahy for help. --HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts')
-rw-r--r--src/bindings/scripts/VC90/90ScriptDev2.vcproj32
-rw-r--r--src/bindings/scripts/scripts/npc/npcs_special.cpp31
-rw-r--r--src/bindings/scripts/scripts/zone/darkshore/darkshore.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/desolace/desolace.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/teldrassil/teldrassil.cpp4
5 files changed, 53 insertions, 20 deletions
diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj
index d3f7fc71e79..4edd104a1c6 100644
--- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj
+++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
+ Version="9,00"
Name="TrinityScript"
ProjectGUID="{4295C8A9-79B7-4354-8064-F05FB9CA0C96}"
RootNamespace="ScriptDev2"
@@ -555,14 +555,14 @@
<Filter
Name="Blackfathom Depths"
>
- <File
- RelativePath="..\scripts\zone\blackfathom_depths\instance_blackfathom_deeps.cpp"
- >
- </File>
- <File
- RelativePath="..\scripts\zone\blackfathom_depths\def_blackfathom_deeps.h"
- >
- </File>
+ <File
+ RelativePath="..\scripts\zone\blackfathom_depths\def_blackfathom_deeps.h"
+ >
+ </File>
+ <File
+ RelativePath="..\scripts\zone\blackfathom_depths\instance_blackfathom_deeps.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Bloodmyst Isle"
@@ -725,10 +725,12 @@
>
</Filter>
<Filter
- Name="Desolace">
- <File
- RelativePath="..\scripts\zone\desolace\desolace.cpp">
- </File>
+ Name="Desolace"
+ >
+ <File
+ RelativePath="..\scripts\zone\desolace\desolace.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Dire Maul"
@@ -838,7 +840,7 @@
Name="Razorfen Kraul"
>
<File
- RelativePath="..\scripts\zone\razorfen_kraul\razorfen_kraul.cpp"
+ RelativePath="..\scripts\zone\razorfen_kraul\def_razorfen_kraul.h"
>
</File>
<File
@@ -846,7 +848,7 @@
>
</File>
<File
- RelativePath="..\scripts\zone\razorfen_kraul\def_razorfen_kraul.h"
+ RelativePath="..\scripts\zone\razorfen_kraul\razorfen_kraul.cpp"
>
</File>
</Filter>
diff --git a/src/bindings/scripts/scripts/npc/npcs_special.cpp b/src/bindings/scripts/scripts/npc/npcs_special.cpp
index 67105b192f4..6c44b5b9ae3 100644
--- a/src/bindings/scripts/scripts/npc/npcs_special.cpp
+++ b/src/bindings/scripts/scripts/npc/npcs_special.cpp
@@ -1636,6 +1636,32 @@ CreatureAI* GetAI_mob_mojo(Creature *_Creature)
return new mob_mojoAI (_Creature);
}
+struct TRINITY_DLL_DECL npc_mirror_image : public SpellAI
+{
+ npc_mirror_image(Creature *c) : SpellAI(c) {}
+ Unit * owner;
+ void Reset()
+ {
+ if (m_creature->isSummon())
+ owner = ((TempSummon*)me)->GetOwner();
+ if (!owner)
+ return;
+ me->SetDisplayId(owner->GetDisplayId());
+ owner->SetLevel(owner->getLevel());
+ // Inherit Master's Threat List (not yet implemented)
+ owner->CastSpell((Unit*)NULL, 58838, true);
+ // here mirror image casts on summoner spell (not present in client dbc) 49866
+ // here should be auras (not present in client dbc): 35657, 35658, 35659, 35660 selfcasted by mirror images (stats related?)
+ // Clone Me!
+ owner->CastSpell(me, 45204, false);
+ }
+};
+
+CreatureAI* GetAI_npc_mirror_image(Creature *_Creature)
+{
+ return new npc_mirror_image (_Creature);
+}
+
void AddSC_npcs_special()
{
Script *newscript;
@@ -1728,6 +1754,11 @@ void AddSC_npcs_special()
newscript->RegisterSelf();
newscript = new Script;
+ newscript->Name="npc_mirror_image";
+ newscript->GetAI = &GetAI_npc_mirror_image;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
newscript->Name="mob_mojo";
newscript->GetAI = &GetAI_mob_mojo;
newscript->RegisterSelf();
diff --git a/src/bindings/scripts/scripts/zone/darkshore/darkshore.cpp b/src/bindings/scripts/scripts/zone/darkshore/darkshore.cpp
index bb4009956f9..d266e3721ae 100644
--- a/src/bindings/scripts/scripts/zone/darkshore/darkshore.cpp
+++ b/src/bindings/scripts/scripts/zone/darkshore/darkshore.cpp
@@ -227,7 +227,7 @@ struct TRINITY_DLL_DECL npc_threshwackonatorAI : public ScriptedAI
if(me->isAlive())
{
if(Player* pPlayer = Unit::GetPlayer(PlayerGUID))
- me->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ me->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, m_creature->GetFollowAngle());
else
{
me->GetMotionMaster()->MovementExpired();
@@ -246,7 +246,7 @@ struct TRINITY_DLL_DECL npc_threshwackonatorAI : public ScriptedAI
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
if(Player* pPlayer = Unit::GetPlayer(PlayerGUID))
- me->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ me->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, m_creature->GetFollowAngle());
DoScriptText(EMOTE_START, me);
}
diff --git a/src/bindings/scripts/scripts/zone/desolace/desolace.cpp b/src/bindings/scripts/scripts/zone/desolace/desolace.cpp
index e1366d51727..1f0e2e71286 100644
--- a/src/bindings/scripts/scripts/zone/desolace/desolace.cpp
+++ b/src/bindings/scripts/scripts/zone/desolace/desolace.cpp
@@ -137,7 +137,7 @@ bool EffectDummyCreature_npc_aged_dying_ancient_kodo(Unit *pCaster, uint32 spell
if (pCreatureTarget->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
pCreatureTarget->GetMotionMaster()->MoveIdle();
- pCreatureTarget->GetMotionMaster()->MoveFollow(pCaster, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ pCreatureTarget->GetMotionMaster()->MoveFollow(pCaster, PET_FOLLOW_DIST, pCreatureTarget->GetFollowAngle());
}
//always return true when we are handling this spell and effect
diff --git a/src/bindings/scripts/scripts/zone/teldrassil/teldrassil.cpp b/src/bindings/scripts/scripts/zone/teldrassil/teldrassil.cpp
index eff160843de..9efc1e890b6 100644
--- a/src/bindings/scripts/scripts/zone/teldrassil/teldrassil.cpp
+++ b/src/bindings/scripts/scripts/zone/teldrassil/teldrassil.cpp
@@ -81,7 +81,7 @@ struct TRINITY_DLL_DECL npc_mistAI : public ScriptedAI
if (m_creature->isAlive())
{
if (Player* pPlayer = Unit::GetPlayer(uiPlayerGUID))
- m_creature->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ m_creature->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, m_creature->GetFollowAngle());
else
{
m_creature->GetMotionMaster()->MovementExpired();
@@ -100,7 +100,7 @@ struct TRINITY_DLL_DECL npc_mistAI : public ScriptedAI
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
if (Player* pPlayer = Unit::GetPlayer(uiPlayer))
- m_creature->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ m_creature->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, m_creature->GetFollowAngle());
}
void DoComplete()