diff options
| author | megamage <none@none> | 2009-04-17 15:29:55 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-04-17 15:29:55 -0500 |
| commit | f0cbed1ad8376200bb450768d7b77198e6754113 (patch) | |
| tree | 55cc52add932df8ce9740824a09916deb2e95ba6 /src/bindings/scripts | |
| parent | ca5894b34800782b98ee9c47d82081cf0a0c1555 (diff) | |
| parent | 6a53bada669c58393ec13c9bacd199c154fe023a (diff) | |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/bindings/scripts')
6 files changed, 49 insertions, 4 deletions
diff --git a/src/bindings/scripts/docs/EventAI.txt b/src/bindings/scripts/docs/EventAI.txt index ade6ec7fe1e..3dac5c271e8 100644 --- a/src/bindings/scripts/docs/EventAI.txt +++ b/src/bindings/scripts/docs/EventAI.txt @@ -122,6 +122,7 @@ Params are always read from Param1, then Param2, then Param3. 36 ACTION_T_UPDATE_TEMPLATE TemplateId, Team Changes the creature to a new creature template of (param1) with team = Alliance if (param2) = false or Horde if (param2) = true 37 ACTION_T_DIE No Params Kills the creature 38 ACTION_T_ZONE_COMBAT_PULSE No Params Places all players within the instance into combat with the creature. Only works in combat and only works inside of instances. +39 ACTION_T_SUMMON_GO GameObjectID, DespawnTime Summons object (param1). Despawns after param2. Spawns on top of current creature. DespawnTime is in ms. * = Use -1 to specify that if this param is picked to do nothing. Random is constant between actions within an event. So if you have a random Yell and a random Sound they will match up (ex: param2 with param2) diff --git a/src/bindings/scripts/scripts/creature/mob_event_ai.cpp b/src/bindings/scripts/scripts/creature/mob_event_ai.cpp index 5f656a45da8..dc88ed98679 100644 --- a/src/bindings/scripts/scripts/creature/mob_event_ai.cpp +++ b/src/bindings/scripts/scripts/creature/mob_event_ai.cpp @@ -1 +1,15 @@ #include "precompiled.h" + case ACTION_T_SUMMON_GO: + { + GameObject* pObject = NULL; + + float x,y,z; + m_creature->GetPosition(x,y,z); + pObject = m_creature->SummonGameObject(param1, x, y, z, 0, 0, 0, 0, 0, param2); + if (!pObject) + { + if (EAI_ErrorLevel > 0) + error_db_log( "SD2: EventAI failed to spawn object %u. Spawn event %d is on creature %d", param1, EventId, m_creature->GetEntry()); + } + } + break; diff --git a/src/bindings/scripts/scripts/creature/mob_event_ai.h b/src/bindings/scripts/scripts/creature/mob_event_ai.h index f6c9b663ce0..9dc89f8cad3 100644 --- a/src/bindings/scripts/scripts/creature/mob_event_ai.h +++ b/src/bindings/scripts/scripts/creature/mob_event_ai.h @@ -1,4 +1,5 @@ #ifndef SC_EVENTAI_H #define SC_EVENTAI_H + ACTION_T_SUMMON_GO = 39, //GameObjectID, DespawnTime in ms #endif diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp index 28edd163ac2..e6e0caca2e8 100644 --- a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp +++ b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp @@ -112,6 +112,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI uint32 ShieldTimer; uint32 SWPainTimer; uint32 DispelTimer; + uint32 ResetTimer; uint32 CombatPulseTimer; // Periodically puts all players in the instance in combat @@ -127,6 +128,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI ShieldTimer = 2000; SWPainTimer = 5000; DispelTimer = 7500; + ResetTimer = 5000; CombatPulseTimer = 5000; @@ -246,6 +248,18 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI if (!UpdateVictim()) return; + if(ResetTimer < diff) + { + float x, y, z, o; + m_creature->GetHomePosition(x, y, z, o); + if(m_creature->GetPositionZ() >= z+10) + { + EnterEvadeMode(); + return; + } + ResetTimer = 5000; + }else ResetTimer -= diff; + if (HealTimer < diff) { uint32 health = m_creature->GetHealth(); diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp index 56741452c66..95db93e71fb 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp @@ -217,6 +217,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI uint32 SiphonSoul_Timer; uint32 PlayerAbility_Timer; uint32 CheckAddState_Timer; + uint32 ResetTimer; uint32 PlayerClass; @@ -232,6 +233,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI SiphonSoul_Timer = 100000; PlayerAbility_Timer = 99999; CheckAddState_Timer = 5000; + ResetTimer = 5000; SpawnAdds(); @@ -332,6 +334,16 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI if(!UpdateVictim() ) return; + if(ResetTimer < diff) + { + if(m_creature->GetDistance(119.223,1035.45,29.4481) <= 10) + { + EnterEvadeMode(); + return; + } + ResetTimer = 5000; + }else ResetTimer -= diff; + if(CheckAddState_Timer < diff) { for(uint8 i = 0; i < 4; ++i) diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp index 6556672dfdf..5c1d9177d6b 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp @@ -419,10 +419,13 @@ struct TRINITY_DLL_DECL boss_janalaiAI : public ScriptedAI if(ResetTimer < diff) { - /*float x, y, z; - m_creature->GetPosition(x, y, z); - if(x < -70 || x > 0 || y > 1176 || y < 1121 || z < 18) - EnterEvadeMode();*/ + float x, y, z, o; + m_creature->GetHomePosition(x, y, z, o); + if(m_creature->GetPositionZ() <= z-7) + { + EnterEvadeMode(); + return; + } ResetTimer = 5000; }else ResetTimer -= diff; |
