Violet Hold: If the boss is not attackable, he can't attack.
--HG-- branch : trunk
This commit is contained in:
@@ -74,6 +74,20 @@ struct TRINITY_DLL_DECL boss_erekemAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AttackStart(Unit* pWho)
|
||||||
|
{
|
||||||
|
if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_creature->Attack(pWho, true))
|
||||||
|
{
|
||||||
|
m_creature->AddThreat(pWho, 0.0f);
|
||||||
|
m_creature->SetInCombatWith(pWho);
|
||||||
|
pWho->SetInCombatWith(m_creature);
|
||||||
|
DoStartMovement(pWho);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
@@ -213,6 +227,20 @@ struct TRINITY_DLL_DECL mob_erekem_guardAI : public ScriptedAI
|
|||||||
uiGushingWoundTimer = urand(1000,3000);
|
uiGushingWoundTimer = urand(1000,3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AttackStart(Unit* pWho)
|
||||||
|
{
|
||||||
|
if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_creature->Attack(pWho, true))
|
||||||
|
{
|
||||||
|
m_creature->AddThreat(pWho, 0.0f);
|
||||||
|
m_creature->SetInCombatWith(pWho);
|
||||||
|
pWho->SetInCombatWith(m_creature);
|
||||||
|
DoStartMovement(pWho);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) {}
|
void MoveInLineOfSight(Unit* who) {}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
|
|||||||
@@ -128,6 +128,20 @@ struct TRINITY_DLL_DECL boss_ichoronAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AttackStart(Unit* pWho)
|
||||||
|
{
|
||||||
|
if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_creature->Attack(pWho, true))
|
||||||
|
{
|
||||||
|
m_creature->AddThreat(pWho, 0.0f);
|
||||||
|
m_creature->SetInCombatWith(pWho);
|
||||||
|
pWho->SetInCombatWith(m_creature);
|
||||||
|
DoStartMovement(pWho);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void WaterElementHit()
|
void WaterElementHit()
|
||||||
{
|
{
|
||||||
m_creature->SetHealth(m_creature->GetHealth() + m_creature->GetMaxHealth() * 0.01);
|
m_creature->SetHealth(m_creature->GetHealth() + m_creature->GetMaxHealth() * 0.01);
|
||||||
|
|||||||
@@ -63,6 +63,20 @@ struct TRINITY_DLL_DECL boss_lavanthorAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AttackStart(Unit* pWho)
|
||||||
|
{
|
||||||
|
if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_creature->Attack(pWho, true))
|
||||||
|
{
|
||||||
|
m_creature->AddThreat(pWho, 0.0f);
|
||||||
|
m_creature->SetInCombatWith(pWho);
|
||||||
|
pWho->SetInCombatWith(m_creature);
|
||||||
|
DoStartMovement(pWho);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) {}
|
void MoveInLineOfSight(Unit* who) {}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
|
|||||||
@@ -56,6 +56,20 @@ struct TRINITY_DLL_DECL boss_moraggAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AttackStart(Unit* pWho)
|
||||||
|
{
|
||||||
|
if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_creature->Attack(pWho, true))
|
||||||
|
{
|
||||||
|
m_creature->AddThreat(pWho, 0.0f);
|
||||||
|
m_creature->SetInCombatWith(pWho);
|
||||||
|
pWho->SetInCombatWith(m_creature);
|
||||||
|
DoStartMovement(pWho);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) {}
|
void MoveInLineOfSight(Unit* who) {}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
|
|||||||
@@ -121,6 +121,20 @@ struct TRINITY_DLL_DECL boss_xevozzAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AttackStart(Unit* pWho)
|
||||||
|
{
|
||||||
|
if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_creature->Attack(pWho, true))
|
||||||
|
{
|
||||||
|
m_creature->AddThreat(pWho, 0.0f);
|
||||||
|
m_creature->SetInCombatWith(pWho);
|
||||||
|
pWho->SetInCombatWith(m_creature);
|
||||||
|
DoStartMovement(pWho);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* pWho)
|
void EnterCombat(Unit* pWho)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
|
|||||||
@@ -66,6 +66,20 @@ struct TRINITY_DLL_DECL boss_zuramatAI : public ScriptedAI
|
|||||||
SpellSummonVoidTimer = 12000;
|
SpellSummonVoidTimer = 12000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AttackStart(Unit* pWho)
|
||||||
|
{
|
||||||
|
if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_creature->Attack(pWho, true))
|
||||||
|
{
|
||||||
|
m_creature->AddThreat(pWho, 0.0f);
|
||||||
|
m_creature->SetInCombatWith(pWho);
|
||||||
|
pWho->SetInCombatWith(m_creature);
|
||||||
|
DoStartMovement(pWho);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
|
|||||||
Reference in New Issue
Block a user