*Patch Reliquary of Souls. By Farah
--HG-- branch : trunk
This commit is contained in:
@@ -184,6 +184,26 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MergeThreatList(Creature* target)
|
||||||
|
{
|
||||||
|
if (!target)
|
||||||
|
return;
|
||||||
|
|
||||||
|
std::list<HostilReference*>& m_threatlist = target->getThreatManager().getThreatList();
|
||||||
|
std::list<HostilReference*>::iterator itr = m_threatlist.begin();
|
||||||
|
for(; itr != m_threatlist.end(); itr++)
|
||||||
|
{
|
||||||
|
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
|
||||||
|
if (pUnit)
|
||||||
|
{
|
||||||
|
m_creature->AddThreat(pUnit, 1.0f); // This is so that we make sure the unit is in Reliquary's threat list before we reset the unit's threat.
|
||||||
|
m_creature->getThreatManager().modifyThreatPercent(pUnit, -100);
|
||||||
|
float threat = target->getThreatManager().getThreat(pUnit);
|
||||||
|
m_creature->AddThreat(pUnit, threat); // This makes it so that the unit has the same amount of threat in Reliquary's threatlist as in the target creature's (One of the Essences).
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
@@ -218,20 +238,23 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); // I R ANNNGRRRY!
|
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); // I R ANNNGRRRY!
|
||||||
|
DoStartNoMovement(m_creature);
|
||||||
Timer = 3000;
|
Timer = 3000;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
Timer = 2800;
|
Timer = 2800;
|
||||||
//m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_SUBMERGE); // Release the cube
|
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_SUBMERGE); // Release the cube
|
||||||
DoCast(m_creature,SPELL_SUBMERGE);
|
DoCast(m_creature,SPELL_SUBMERGE);
|
||||||
|
DoStartNoMovement(m_creature);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Timer = 5000;
|
Timer = 5000;
|
||||||
if(Creature* Summon = DoSpawnCreature(23417+Phase, 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0))
|
if(Creature* Summon = DoSpawnCreature(23417+Phase, 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0))
|
||||||
{
|
{
|
||||||
//m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED); // Ribs: open
|
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED); // Ribs: open
|
||||||
Summon->AI()->AttackStart(SelectUnit(SELECT_TARGET_TOPAGGRO, 0));
|
Summon->AI()->AttackStart(SelectUnit(SELECT_TARGET_TOPAGGRO, 0));
|
||||||
EssenceGUID = Summon->GetGUID();
|
EssenceGUID = Summon->GetGUID();
|
||||||
|
DoStartNoMovement(m_creature);
|
||||||
}else EnterEvadeMode();
|
}else EnterEvadeMode();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
@@ -246,19 +269,26 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if(Essence->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
|
if(Essence->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
|
||||||
{
|
{
|
||||||
Essence->AI()->EnterEvadeMode();
|
MergeThreatList(Essence);
|
||||||
Essence->GetMotionMaster()->MoveFollow(m_creature, 0, 0);
|
Essence->RemoveAllAuras();
|
||||||
|
Essence->DeleteThreatList();
|
||||||
|
Essence->GetMotionMaster()->MoveFollow(m_creature,0.0f,0.0f);
|
||||||
}else return;
|
}else return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
Timer = 1500;
|
Timer = 1500;
|
||||||
if(Essence->IsWithinDistInMap(m_creature, 10))
|
if(Essence->IsWithinDistInMap(m_creature, 10))
|
||||||
|
{
|
||||||
|
Essence->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); //rotate and disappear
|
||||||
|
Timer = 2000;
|
||||||
m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE);
|
m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE);
|
||||||
//Essence->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_SUBMERGE); //rotate and disappear
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Essence->AI()->EnterEvadeMode();
|
MergeThreatList(Essence);
|
||||||
|
Essence->RemoveAllAuras();
|
||||||
|
Essence->DeleteThreatList();
|
||||||
Essence->GetMotionMaster()->MoveFollow(m_creature, 0, 0);
|
Essence->GetMotionMaster()->MoveFollow(m_creature, 0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -273,7 +303,7 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
|||||||
DoScriptText(DESI_SAY_AFTER, Essence);
|
DoScriptText(DESI_SAY_AFTER, Essence);
|
||||||
}
|
}
|
||||||
Essence->SetVisibility(VISIBILITY_OFF);
|
Essence->SetVisibility(VISIBILITY_OFF);
|
||||||
Essence->setDeathState(DEAD);
|
Essence->setDeathState(JUST_DIED);
|
||||||
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0);
|
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0);
|
||||||
EssenceGUID = 0;
|
EssenceGUID = 0;
|
||||||
SoulCount = 0;
|
SoulCount = 0;
|
||||||
@@ -352,11 +382,15 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
|||||||
|
|
||||||
void EnterCombat(Unit *who)
|
void EnterCombat(Unit *who)
|
||||||
{
|
{
|
||||||
DoScriptText(SUFF_SAY_FREED, m_creature);
|
if(!m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
|
||||||
DoZoneInCombat();
|
{
|
||||||
m_creature->CastSpell(m_creature, AURA_OF_SUFFERING, true); // linked aura need core support
|
DoScriptText(SUFF_SAY_FREED, m_creature);
|
||||||
m_creature->CastSpell(m_creature, ESSENCE_OF_SUFFERING_PASSIVE, true);
|
DoZoneInCombat();
|
||||||
m_creature->CastSpell(m_creature, ESSENCE_OF_SUFFERING_PASSIVE2, true);
|
m_creature->CastSpell(m_creature, AURA_OF_SUFFERING, true); // linked aura need core support
|
||||||
|
m_creature->CastSpell(m_creature, ESSENCE_OF_SUFFERING_PASSIVE, true);
|
||||||
|
m_creature->CastSpell(m_creature, ESSENCE_OF_SUFFERING_PASSIVE2, true);
|
||||||
|
}
|
||||||
|
else return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit *victim)
|
void KilledUnit(Unit *victim)
|
||||||
|
|||||||
Reference in New Issue
Block a user