aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-15 11:57:00 -0600
committermegamage <none@none>2009-02-15 11:57:00 -0600
commit419b74952002c0605ca829227f55a6354d8bd1c8 (patch)
treeb827bb31415df0b57f543c568fb7e92faa7ffc43 /src/bindings/scripts
parentb3bc31a69f5d5d8bf43bb4865bc7dcd174c5d48c (diff)
parentb66d68ceaeecc01b6a72b8480abe61f6c3e92f7e (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts')
-rw-r--r--src/bindings/scripts/include/sc_creature.cpp2
-rw-r--r--src/bindings/scripts/scripts/npc/npc_escortAI.cpp1
-rw-r--r--src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp10
-rw-r--r--src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp12
4 files changed, 20 insertions, 5 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp
index 9ed263398dc..932038a8194 100644
--- a/src/bindings/scripts/include/sc_creature.cpp
+++ b/src/bindings/scripts/include/sc_creature.cpp
@@ -835,7 +835,7 @@ void LoadOverridenSQLData()
// Sunwell Plateau : Kalecgos : Spectral Rift
goInfo = const_cast<GameObjectInfo*>(GetGameObjectInfo(187055));
if(goInfo && goInfo->type == GAMEOBJECT_TYPE_GOOBER)
- goInfo->goober.lockId = 1714; // need LOCKTYPE_QUICK_OPEN
+ goInfo->type = GAMEOBJECT_TYPE_SPELLCASTER;
}
void LoadOverridenDBCData()
diff --git a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp
index c8584424414..fefe9278322 100644
--- a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp
+++ b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp
@@ -299,5 +299,4 @@ void npc_escortAI::Start(bool bAttack, bool bDefend, bool bRun, uint64 pGUID)
//Disable questgiver flag
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_ATTACKABLE_2);
}
diff --git a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp
index ce86aa21b1f..1993ffb8d39 100644
--- a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp
+++ b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp
@@ -452,18 +452,21 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI
SayTimer = 0;
Step = 0;
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
m_creature->setFaction(1194);
Unit* Creepjack = FindCreature(NPC_CREEPJACK, 20, m_creature);
if(Creepjack)
{
((Creature*)Creepjack)->AI()->EnterEvadeMode();
Creepjack->setFaction(1194);
+ Creepjack->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
Unit* Malone = FindCreature(NPC_MALONE, 20, m_creature);
if(Malone)
{
((Creature*)Malone)->AI()->EnterEvadeMode();
Malone->setFaction(1194);
+ Malone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
}
@@ -514,6 +517,7 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI
Creepjack->Attack(player, true);
Creepjack->setFaction(14);
Creepjack->GetMotionMaster()->MoveChase(player);
+ Creepjack->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
Unit* Malone = FindCreature(NPC_MALONE, 20, m_creature);
if(Malone)
@@ -521,6 +525,7 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI
Malone->Attack(player, true);
Malone->setFaction(14);
Malone->GetMotionMaster()->MoveChase(player);
+ Malone->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
DoStartMovement(player);
AttackStart(player);
@@ -535,13 +540,18 @@ struct TRINITY_DLL_DECL npc_dirty_larryAI : public ScriptedAI
{
((Creature*)Creepjack)->AI()->EnterEvadeMode();
Creepjack->setFaction(1194);
+ Creepjack->GetMotionMaster()->MoveTargetedHome();
+ Creepjack->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
Unit* Malone = FindCreature(NPC_MALONE, 20, m_creature);
if(Malone)
{
((Creature*)Malone)->AI()->EnterEvadeMode();
Malone->setFaction(1194);
+ Malone->GetMotionMaster()->MoveTargetedHome();
+ Malone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
m_creature->setFaction(1194);
Done = true;
DoScriptText(SAY_GIVEUP, m_creature, NULL);
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
index e2e1dd0a2b4..6930602fc7a 100644
--- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
+++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
@@ -69,7 +69,7 @@ EndScriptData */
#define SPELL_BANISH 44836
#define SPELL_TRANSFORM_KALEC 44670
-#define SPELL_ENRAGE 44806
+#define SPELL_ENRAGE 44807
#define SPELL_CORRUPTION_STRIKE 45029
#define SPELL_AGONY_CURSE 45032
@@ -351,8 +351,11 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !isEnraged)
{
Unit* Kalecgos = Unit::GetUnit(*m_creature, KalecgosGUID);
- if (Kalecgos)
+ if(Kalecgos)
+ {
Kalecgos->CastSpell(Kalecgos, SPELL_ENRAGE, true);
+ ((boss_kalecgosAI*)((Creature*)Kalecgos)->AI())->isEnraged = true;
+ }
DoCast(m_creature, SPELL_ENRAGE, true);
isEnraged = true;
}
@@ -548,8 +551,11 @@ void boss_kalecgosAI::UpdateAI(const uint32 diff)
if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !isEnraged)
{
Unit* Sath = Unit::GetUnit(*m_creature, SathGUID);
- if (Sath)
+ if(Sath)
+ {
Sath->CastSpell(Sath, SPELL_ENRAGE, true);
+ ((boss_sathrovarrAI*)((Creature*)Sath)->AI())->isEnraged = true;
+ }
DoCast(m_creature, SPELL_ENRAGE, true);
isEnraged = true;
}