*Fix some Script Bugs ... in TC2 virtual Aggo is EnterCombat now ... this fix Kiljaden, Muru, Moroes Script

--HG--
branch : trunk
This commit is contained in:
BroodWyrm
2009-05-30 11:35:54 +02:00
parent 15633ec97e
commit cbe51194e7
4 changed files with 6 additions and 32 deletions
@@ -234,7 +234,6 @@ struct TRINITY_DLL_DECL npc_unworthy_initiate_anchorAI : public ScriptedAI
uint64 guid_target; uint64 guid_target;
void Aggro(Unit *who) {}
void Reset(){} void Reset(){}
void SetTarget(uint64 target); void SetTarget(uint64 target);
@@ -110,7 +110,7 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
DoZoneInCombat(); DoZoneInCombat();
} }
void Aggro(Unit* who) void EnterCombat(Unit* who)
{ {
StartEvent(); StartEvent();
@@ -349,8 +349,6 @@ struct TRINITY_DLL_DECL boss_moroes_guestAI : public ScriptedAI
pInstance->SetData(DATA_MOROES_EVENT, NOT_STARTED); pInstance->SetData(DATA_MOROES_EVENT, NOT_STARTED);
} }
void Aggro(Unit* who) {}
void AcquireGUID() void AcquireGUID()
{ {
if(!pInstance) if(!pInstance)
@@ -321,8 +321,6 @@ struct TRINITY_DLL_DECL boss_kalecgos_kjAI : public ScriptedAI
void Reset(){} void Reset(){}
void Aggro(Unit* who) {}
void FindOrbs() void FindOrbs()
{ {
CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
@@ -524,7 +522,7 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
} }
} }
void Aggro(Unit* who){ void EnterCombat(Unit* who){
DoZoneInCombat(); DoZoneInCombat();
DoScriptText(SAY_KJ_EMERGE, m_creature); DoScriptText(SAY_KJ_EMERGE, m_creature);
} }
@@ -776,8 +774,6 @@ struct TRINITY_DLL_DECL mob_kiljaeden_controllerAI : public Scripted_NoMovementA
Summons.Summon(summoned); Summons.Summon(summoned);
} }
void Aggro(Unit* who) {}
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
if(RandomSayTimer < diff && pInstance->GetData(DATA_MURU_EVENT) != DONE && pInstance->GetData(DATA_KILJAEDEN_EVENT) == NOT_STARTED){ if(RandomSayTimer < diff && pInstance->GetData(DATA_MURU_EVENT) != DONE && pInstance->GetData(DATA_KILJAEDEN_EVENT) == NOT_STARTED){
@@ -836,7 +832,7 @@ struct TRINITY_DLL_DECL mob_hand_of_the_deceiverAI : public ScriptedAI
summoned->SetLevel(m_creature->getLevel()); summoned->SetLevel(m_creature->getLevel());
} }
void Aggro(Unit* who){ void EnterCombat(Unit* who){
if(pInstance){ if(pInstance){
pInstance->SetData(DATA_KILJAEDEN_EVENT, IN_PROGRESS); pInstance->SetData(DATA_KILJAEDEN_EVENT, IN_PROGRESS);
Creature* Control = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KILJAEDEN_CONTROLLER))); Creature* Control = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KILJAEDEN_CONTROLLER)));
@@ -915,8 +911,6 @@ struct TRINITY_DLL_DECL mob_felfire_portalAI : public Scripted_NoMovementAI
} }
void Aggro(Unit* who) {}
void JustSummoned(Creature* summoned) void JustSummoned(Creature* summoned)
{ {
summoned->setFaction(m_creature->getFaction()); summoned->setFaction(m_creature->getFaction());
@@ -958,8 +952,6 @@ struct TRINITY_DLL_DECL mob_volatile_felfire_fiendAI : public ScriptedAI
LockedTarget = false; LockedTarget = false;
} }
void Aggro(Unit* who) {}
void DamageTaken(Unit *done_by, uint32 &damage) void DamageTaken(Unit *done_by, uint32 &damage)
{ {
if(damage > m_creature->GetHealth()) if(damage > m_creature->GetHealth())
@@ -1007,8 +999,6 @@ struct TRINITY_DLL_DECL mob_armageddonAI : public Scripted_NoMovementAI
Timer = 0; Timer = 0;
} }
void Aggro(Unit* who){}
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
if(Timer < diff){ if(Timer < diff){
@@ -1068,10 +1058,7 @@ struct TRINITY_DLL_DECL mob_shield_orbAI : public ScriptedAI
else Clockwise = false; else Clockwise = false;
} }
void Reset(){ void Reset(){}
}
void Aggro(Unit* who){}
void UpdateAI(const uint32 diff){ void UpdateAI(const uint32 diff){
if(PointReached){ if(PointReached){
@@ -1130,8 +1117,6 @@ struct TRINITY_DLL_DECL mob_sinster_reflectionAI : public ScriptedAI
Class = 0; Class = 0;
} }
void Aggro(Unit* who){}
void UpdateAI(const uint32 diff){ void UpdateAI(const uint32 diff){
if(Class == 0){ if(Class == 0){
@@ -137,7 +137,7 @@ struct TRINITY_DLL_DECL boss_entropiusAI : public ScriptedAI
} }
} }
void Aggro(Unit *who) { void EnterCombat(Unit *who) {
DoCastAOE(SPELL_NEGATIVE_ENERGY_E, true); DoCastAOE(SPELL_NEGATIVE_ENERGY_E, true);
DoCast(m_creature, SPELL_ENTROPIUS_SPAWN, false); DoCast(m_creature, SPELL_ENTROPIUS_SPAWN, false);
} }
@@ -230,7 +230,7 @@ struct TRINITY_DLL_DECL boss_muruAI : public Scripted_NoMovementAI
pInstance->SetData(DATA_MURU_EVENT, NOT_STARTED); pInstance->SetData(DATA_MURU_EVENT, NOT_STARTED);
} }
void Aggro(Unit *who) void EnterCombat(Unit *who)
{ {
if(pInstance) if(pInstance)
pInstance->SetData(DATA_MURU_EVENT, IN_PROGRESS); pInstance->SetData(DATA_MURU_EVENT, IN_PROGRESS);
@@ -361,8 +361,6 @@ struct TRINITY_DLL_DECL npc_muru_portalAI : public Scripted_NoMovementAI
Summons.DespawnAll(); Summons.DespawnAll();
} }
void Aggro(Unit *who) {}
void JustSummoned(Creature* summoned){ void JustSummoned(Creature* summoned){
Player* Target; Player* Target;
Target = (Player*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID))); Target = (Player*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_PLAYER_GUID)));
@@ -422,8 +420,6 @@ struct TRINITY_DLL_DECL npc_dark_fiendAI : public ScriptedAI
m_creature->addUnitState(UNIT_STAT_STUNNED); m_creature->addUnitState(UNIT_STAT_STUNNED);
}; };
void Aggro(Unit *who) {}
void SpellHit(Unit* caster, const SpellEntry* Spell){ void SpellHit(Unit* caster, const SpellEntry* Spell){
for(uint8 i = 0; i < 3; ++i) for(uint8 i = 0; i < 3; ++i)
if(Spell->Effect[i] == 38){ if(Spell->Effect[i] == 38){
@@ -482,8 +478,6 @@ struct TRINITY_DLL_DECL npc_void_sentinelAI : public ScriptedAI
DoTeleportTo(x,y,71); DoTeleportTo(x,y,71);
}; };
void Aggro(Unit *who) {}
void JustDied(Unit* killer){ void JustDied(Unit* killer){
for (uint8 i = 0; i < 8; ++i){ for (uint8 i = 0; i < 8; ++i){
m_creature->SummonCreature(CREATURE_VOID_SPAWN, m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(), rand()%6, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000); m_creature->SummonCreature(CREATURE_VOID_SPAWN, m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(), rand()%6, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
@@ -536,8 +530,6 @@ struct TRINITY_DLL_DECL npc_blackholeAI : public ScriptedAI
DoCastAOE(SPELL_BLACKHOLE_SPAWN, true); DoCastAOE(SPELL_BLACKHOLE_SPAWN, true);
} }
void Aggro(Unit *who) {}
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
{ {
if(SpellTimer < diff){ if(SpellTimer < diff){