mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Merge
--HG-- branch : trunk
This commit is contained in:
@@ -265,19 +265,17 @@ struct TRINITY_DLL_DECL boss_svala_sorrowgraveAI : public ScriptedAI
|
||||
if (uiCallFlamesTimer < diff)
|
||||
{
|
||||
Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
while (pTarget && pTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
if (pTarget && pTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
DoCast(pTarget, SPELL_CALL_FLAMES);
|
||||
uiCallFlamesTimer = 8000 + rand()%4000;
|
||||
uiCallFlamesTimer = 8000 + rand()%4000;
|
||||
}
|
||||
} else uiCallFlamesTimer -= diff;
|
||||
|
||||
if (uiRitualOfSwordTimer < diff)
|
||||
{
|
||||
pSacrificeTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
while (pSacrificeTarget && pSacrificeTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
pSacrificeTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if (pSacrificeTarget)
|
||||
if (pSacrificeTarget && pSacrificeTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
DoScriptText(RAND(SAY_SACRIFICE_PLAYER_1,SAY_SACRIFICE_PLAYER_2,SAY_SACRIFICE_PLAYER_3,SAY_SACRIFICE_PLAYER_4,SAY_SACRIFICE_PLAYER_5),m_creature);
|
||||
DoCast(pSacrificeTarget,SPELL_RITUAL_OF_THE_SWORD);
|
||||
@@ -289,8 +287,9 @@ struct TRINITY_DLL_DECL boss_svala_sorrowgraveAI : public ScriptedAI
|
||||
if (pRitualChanneler[i] = m_creature->SummonCreature(CREATURE_RITUAL_CHANNELER, RitualChannelerLocations[i].x, RitualChannelerLocations[i].y, RitualChannelerLocations[i].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000))
|
||||
if (mob_ritual_channelerAI *pChannelerAI = CAST_AI(mob_ritual_channelerAI,pRitualChanneler[i]))
|
||||
pChannelerAI->AttackStartNoMove(pSacrificeTarget);
|
||||
|
||||
uiRitualOfSwordTimer = 18000 + rand()%4000;
|
||||
}
|
||||
uiRitualOfSwordTimer = 18000 + rand()%4000;
|
||||
} else uiRitualOfSwordTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -11972,8 +11972,8 @@ void Unit::SetHealth(uint32 val)
|
||||
if(getDeathState() == JUST_DIED)
|
||||
val = 0;
|
||||
// causes instant permadeath if you exit game while in combat?! :-|
|
||||
//else if((getDeathState() & (DEAD | DEAD_FALLING)) != 0)
|
||||
// val = 1;
|
||||
else if((GetTypeId() == TYPEID_PLAYER) && (getDeathState() & (DEAD | DEAD_FALLING)) != 0)
|
||||
val = 1;
|
||||
else
|
||||
{
|
||||
uint32 maxHealth = GetMaxHealth();
|
||||
|
||||
Reference in New Issue
Block a user