*Fix build.
--HG-- branch : trunk
This commit is contained in:
@@ -125,7 +125,7 @@ struct TRINITY_DLL_DECL npc_draenei_survivorAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
m_creature->RemoveAurasDueToSpell(SPELL_IRRIDATION);
|
m_creature->RemoveAurasDueToSpell(SPELL_IRRIDATION);
|
||||||
|
|
||||||
if (Player *pPlayer = (Player*)Unit::GetUnit(*m_creature,pCaster))
|
if (Player *pPlayer = Unit::GetPlayer(pCaster))
|
||||||
{
|
{
|
||||||
if (pPlayer->GetTypeId() != TYPEID_PLAYER)
|
if (pPlayer->GetTypeId() != TYPEID_PLAYER)
|
||||||
return;
|
return;
|
||||||
|
|||||||
+5
-5
@@ -331,7 +331,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI
|
|||||||
|
|
||||||
pet = false;
|
pet = false;
|
||||||
|
|
||||||
Creature *Pet = (Creature*) Unit::GetUnit(*m_creature, SummonedPet);
|
Creature *Pet = Unit::GetCreature(*m_creature, SummonedPet);
|
||||||
if( Pet && Pet->isAlive() )
|
if( Pet && Pet->isAlive() )
|
||||||
{
|
{
|
||||||
Pet->DealDamage( Pet, Pet->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false );
|
Pet->DealDamage( Pet, Pet->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false );
|
||||||
@@ -348,7 +348,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI
|
|||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
Creature *Karathress = NULL;
|
Creature *Karathress = NULL;
|
||||||
Karathress = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
|
Karathress = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
|
||||||
|
|
||||||
if (Karathress)
|
if (Karathress)
|
||||||
((boss_fathomlord_karathressAI*)Karathress->AI())->EventSharkkisDeath();
|
((boss_fathomlord_karathressAI*)Karathress->AI())->EventSharkkisDeath();
|
||||||
@@ -407,7 +407,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI
|
|||||||
if(TheBeastWithin_Timer < diff)
|
if(TheBeastWithin_Timer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature, SPELL_THE_BEAST_WITHIN);
|
DoCast(m_creature, SPELL_THE_BEAST_WITHIN);
|
||||||
Creature *Pet = (Creature*) Unit::GetUnit(*m_creature, SummonedPet);
|
Creature *Pet = Unit::GetCreature(*m_creature, SummonedPet);
|
||||||
if( Pet && Pet->isAlive() )
|
if( Pet && Pet->isAlive() )
|
||||||
{
|
{
|
||||||
Pet->CastSpell( Pet, SPELL_PET_ENRAGE, true );
|
Pet->CastSpell( Pet, SPELL_PET_ENRAGE, true );
|
||||||
@@ -477,7 +477,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI
|
|||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
Creature *Karathress = NULL;
|
Creature *Karathress = NULL;
|
||||||
Karathress = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
|
Karathress = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
|
||||||
|
|
||||||
if (Karathress)
|
if (Karathress)
|
||||||
if(!m_creature->isAlive() && Karathress)
|
if(!m_creature->isAlive() && Karathress)
|
||||||
@@ -592,7 +592,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI
|
|||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
Creature *Karathress = NULL;
|
Creature *Karathress = NULL;
|
||||||
Karathress = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
|
Karathress = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KARATHRESS)));
|
||||||
|
|
||||||
if (Karathress)
|
if (Karathress)
|
||||||
if(!m_creature->isAlive() && Karathress)
|
if(!m_creature->isAlive() && Karathress)
|
||||||
|
|||||||
+2
-2
@@ -707,7 +707,7 @@ struct TRINITY_DLL_DECL mob_tainted_elementalAI : public ScriptedAI
|
|||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
Creature *Vashj = NULL;
|
Creature *Vashj = NULL;
|
||||||
Vashj = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LADYVASHJ)));
|
Vashj = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_LADYVASHJ)));
|
||||||
|
|
||||||
if(Vashj)
|
if(Vashj)
|
||||||
((boss_lady_vashjAI*)Vashj->AI())->EventTaintedElementalDeath();
|
((boss_lady_vashjAI*)Vashj->AI())->EventTaintedElementalDeath();
|
||||||
@@ -941,7 +941,7 @@ bool ItemUse_item_tainted_core(Player *player, Item* _Item, SpellCastTargets con
|
|||||||
}
|
}
|
||||||
|
|
||||||
Creature *Vashj = NULL;
|
Creature *Vashj = NULL;
|
||||||
Vashj = (Creature*)(Unit::GetUnit((*player), pInstance->GetData64(DATA_LADYVASHJ)));
|
Vashj = (Unit::GetCreature((*player), pInstance->GetData64(DATA_LADYVASHJ)));
|
||||||
if(Vashj && ((boss_lady_vashjAI*)Vashj->AI())->Phase == 2)
|
if(Vashj && ((boss_lady_vashjAI*)Vashj->AI())->Phase == 2)
|
||||||
{
|
{
|
||||||
if(targets.getGOTarget() && targets.getGOTarget()->GetTypeId()==TYPEID_GAMEOBJECT)
|
if(targets.getGOTarget() && targets.getGOTarget()->GetTypeId()==TYPEID_GAMEOBJECT)
|
||||||
|
|||||||
@@ -88,11 +88,11 @@ bool CheckAllBossDied(ScriptedInstance* pInstance, Creature* m_creature)
|
|||||||
OlmGUID = pInstance->GetData64(DATA_OLMTHESUMMONER);
|
OlmGUID = pInstance->GetData64(DATA_OLMTHESUMMONER);
|
||||||
KroshGUID = pInstance->GetData64(DATA_KROSHFIREHAND);
|
KroshGUID = pInstance->GetData64(DATA_KROSHFIREHAND);
|
||||||
|
|
||||||
Maulgar = ((Creature*)Unit::GetUnit((*m_creature), MaulgarGUID));
|
Maulgar = (Unit::GetCreature((*m_creature), MaulgarGUID));
|
||||||
Kiggler = ((Creature*)Unit::GetUnit((*m_creature), KigglerGUID));
|
Kiggler = (Unit::GetCreature((*m_creature), KigglerGUID));
|
||||||
Blindeye = ((Creature*)Unit::GetUnit((*m_creature), BlindeyeGUID));
|
Blindeye = (Unit::GetCreature((*m_creature), BlindeyeGUID));
|
||||||
Olm = ((Creature*)Unit::GetUnit((*m_creature), OlmGUID));
|
Olm = (Unit::GetCreature((*m_creature), OlmGUID));
|
||||||
Krosh = ((Creature*)Unit::GetUnit((*m_creature), KroshGUID));
|
Krosh = (Unit::GetCreature((*m_creature), KroshGUID));
|
||||||
|
|
||||||
if(!Maulgar || !Kiggler || !Blindeye || !Olm || !Krosh)
|
if(!Maulgar || !Kiggler || !Blindeye || !Olm || !Krosh)
|
||||||
return false;
|
return false;
|
||||||
@@ -142,7 +142,7 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if(Council[i])
|
if(Council[i])
|
||||||
{
|
{
|
||||||
pCreature = (Creature*)(Unit::GetUnit((*m_creature), Council[i]));
|
pCreature = (Unit::GetCreature((*m_creature), Council[i]));
|
||||||
if(pCreature && !pCreature->isAlive())
|
if(pCreature && !pCreature->isAlive())
|
||||||
{
|
{
|
||||||
pCreature->Respawn();
|
pCreature->Respawn();
|
||||||
@@ -337,7 +337,7 @@ struct TRINITY_DLL_DECL boss_olm_the_summonerAI : public ScriptedAI
|
|||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
Creature *Maulgar = NULL;
|
Creature *Maulgar = NULL;
|
||||||
Maulgar = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||||
|
|
||||||
if(Maulgar)
|
if(Maulgar)
|
||||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
||||||
@@ -441,7 +441,7 @@ struct TRINITY_DLL_DECL boss_kiggler_the_crazedAI : public ScriptedAI
|
|||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
Creature *Maulgar = NULL;
|
Creature *Maulgar = NULL;
|
||||||
Maulgar = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||||
|
|
||||||
if(Maulgar)
|
if(Maulgar)
|
||||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
||||||
@@ -549,7 +549,7 @@ struct TRINITY_DLL_DECL boss_blindeye_the_seerAI : public ScriptedAI
|
|||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
Creature *Maulgar = NULL;
|
Creature *Maulgar = NULL;
|
||||||
Maulgar = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||||
|
|
||||||
if(Maulgar)
|
if(Maulgar)
|
||||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
||||||
@@ -647,7 +647,7 @@ struct TRINITY_DLL_DECL boss_krosh_firehandAI : public ScriptedAI
|
|||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
Creature *Maulgar = NULL;
|
Creature *Maulgar = NULL;
|
||||||
Maulgar = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
Maulgar = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_MAULGAR)));
|
||||||
|
|
||||||
if(Maulgar)
|
if(Maulgar)
|
||||||
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
((boss_high_king_maulgarAI*)Maulgar->AI())->AddDeath();
|
||||||
|
|||||||
@@ -1140,7 +1140,7 @@ void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
DoCast(m_creature, SPELL_DRINK_POISON);
|
DoCast(m_creature, SPELL_DRINK_POISON);
|
||||||
|
|
||||||
IsFakingDeath = true;
|
IsFakingDeath = true;
|
||||||
//IS THIS USEFULL? Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID));
|
//IS THIS USEFULL? Creature* Julianne = (Unit::GetCreature((*m_creature), JulianneGUID));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1156,7 +1156,7 @@ void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
//if this is true then we have to kill romulo too
|
//if this is true then we have to kill romulo too
|
||||||
if (RomuloDead)
|
if (RomuloDead)
|
||||||
{
|
{
|
||||||
if (Creature* Romulo = ((Creature*)Unit::GetUnit((*m_creature), RomuloGUID)))
|
if (Creature* Romulo = (Unit::GetCreature((*m_creature), RomuloGUID)))
|
||||||
{
|
{
|
||||||
Romulo->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
Romulo->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
Romulo->GetMotionMaster()->Clear();
|
Romulo->GetMotionMaster()->Clear();
|
||||||
@@ -1170,7 +1170,7 @@ void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if not already returned, then romulo is alive and we can pretend die
|
//if not already returned, then romulo is alive and we can pretend die
|
||||||
if (Creature* Romulo = ((Creature*)Unit::GetUnit((*m_creature), RomuloGUID)))
|
if (Creature* Romulo = (Unit::GetCreature((*m_creature), RomuloGUID)))
|
||||||
{
|
{
|
||||||
PretendToDie(m_creature);
|
PretendToDie(m_creature);
|
||||||
IsFakingDeath = true;
|
IsFakingDeath = true;
|
||||||
@@ -1197,7 +1197,7 @@ void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
IsFakingDeath = true;
|
IsFakingDeath = true;
|
||||||
Phase = PHASE_BOTH;
|
Phase = PHASE_BOTH;
|
||||||
|
|
||||||
if (Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID)))
|
if (Creature* Julianne = (Unit::GetCreature((*m_creature), JulianneGUID)))
|
||||||
{
|
{
|
||||||
((boss_julianneAI*)Julianne->AI())->RomuloDead = true;
|
((boss_julianneAI*)Julianne->AI())->RomuloDead = true;
|
||||||
((boss_julianneAI*)Julianne->AI())->ResurrectSelfTimer = 10000;
|
((boss_julianneAI*)Julianne->AI())->ResurrectSelfTimer = 10000;
|
||||||
@@ -1211,7 +1211,7 @@ void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
{
|
{
|
||||||
if (JulianneDead)
|
if (JulianneDead)
|
||||||
{
|
{
|
||||||
if (Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID)))
|
if (Creature* Julianne = (Unit::GetCreature((*m_creature), JulianneGUID)))
|
||||||
{
|
{
|
||||||
Julianne->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
Julianne->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
Julianne->GetMotionMaster()->Clear();
|
Julianne->GetMotionMaster()->Clear();
|
||||||
@@ -1223,7 +1223,7 @@ void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID)))
|
if (Creature* Julianne = (Unit::GetCreature((*m_creature), JulianneGUID)))
|
||||||
{
|
{
|
||||||
PretendToDie(m_creature);
|
PretendToDie(m_creature);
|
||||||
IsFakingDeath = true;
|
IsFakingDeath = true;
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
|
|||||||
uint32 n = 0;
|
uint32 n = 0;
|
||||||
for(std::vector<Add*>::iterator i = Adds.begin(); i != Adds.end(); ++i, ++n)
|
for(std::vector<Add*>::iterator i = Adds.begin(); i != Adds.end(); ++i, ++n)
|
||||||
{
|
{
|
||||||
Creature* pAdd = ((Creature*)Unit::GetUnit(*m_creature, (*i)->guid));
|
Creature* pAdd = (Unit::GetCreature(*m_creature, (*i)->guid));
|
||||||
if(pAdd && pAdd->isAlive())
|
if(pAdd && pAdd->isAlive())
|
||||||
{
|
{
|
||||||
pAdd->AI()->EnterEvadeMode(); // Force them out of combat and reset if they are in combat.
|
pAdd->AI()->EnterEvadeMode(); // Force them out of combat and reset if they are in combat.
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ struct TRINITY_DLL_DECL advisorbase_ai : public ScriptedAI
|
|||||||
if(pInstance && (pInstance->GetData(DATA_KAELTHASEVENT) == 1 || pInstance->GetData(DATA_KAELTHASEVENT) == 3))
|
if(pInstance && (pInstance->GetData(DATA_KAELTHASEVENT) == 1 || pInstance->GetData(DATA_KAELTHASEVENT) == 3))
|
||||||
{
|
{
|
||||||
Creature *Kaelthas = NULL;
|
Creature *Kaelthas = NULL;
|
||||||
Kaelthas = (Creature*)(Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KAELTHAS)));
|
Kaelthas = (Unit::GetCreature((*m_creature), pInstance->GetData64(DATA_KAELTHAS)));
|
||||||
|
|
||||||
if(Kaelthas)
|
if(Kaelthas)
|
||||||
Kaelthas->AI()->EnterEvadeMode();
|
Kaelthas->AI()->EnterEvadeMode();
|
||||||
@@ -325,7 +325,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
if(pInstance) {
|
if(pInstance) {
|
||||||
for(uint32 i = 0; i < 7; i++) {
|
for(uint32 i = 0; i < 7; i++) {
|
||||||
Creature* weapon = (Creature*)(Unit::GetUnit((*m_creature), WeaponGuid[i]));;
|
Creature* weapon = (Unit::GetCreature((*m_creature), WeaponGuid[i]));;
|
||||||
delete weapon;
|
delete weapon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -393,7 +393,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
Creature *pCreature;
|
Creature *pCreature;
|
||||||
for(uint8 i = 0; i < 4; ++i)
|
for(uint8 i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
pCreature = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[i]));
|
pCreature = (Unit::GetCreature((*m_creature), AdvisorGuid[i]));
|
||||||
if(pCreature)
|
if(pCreature)
|
||||||
{
|
{
|
||||||
pCreature->Respawn();
|
pCreature->Respawn();
|
||||||
@@ -483,7 +483,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
Creature *pCreature;
|
Creature *pCreature;
|
||||||
for(uint8 i = 0; i < 4; ++i)
|
for(uint8 i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
pCreature = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[i]));
|
pCreature = (Unit::GetCreature((*m_creature), AdvisorGuid[i]));
|
||||||
if(pCreature)
|
if(pCreature)
|
||||||
{
|
{
|
||||||
pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
@@ -550,7 +550,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
case 1:
|
case 1:
|
||||||
if(Phase_Timer < diff)
|
if(Phase_Timer < diff)
|
||||||
{
|
{
|
||||||
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[0]));
|
Advisor = (Unit::GetCreature((*m_creature), AdvisorGuid[0]));
|
||||||
|
|
||||||
if(Advisor)
|
if(Advisor)
|
||||||
{
|
{
|
||||||
@@ -568,7 +568,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
|
|
||||||
//Subphase 2 - Start
|
//Subphase 2 - Start
|
||||||
case 2:
|
case 2:
|
||||||
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[0]));
|
Advisor = (Unit::GetCreature((*m_creature), AdvisorGuid[0]));
|
||||||
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
|
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_INTRO_SANGUINAR, m_creature);
|
DoScriptText(SAY_INTRO_SANGUINAR, m_creature);
|
||||||
@@ -584,7 +584,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
case 3:
|
case 3:
|
||||||
if(Phase_Timer < diff)
|
if(Phase_Timer < diff)
|
||||||
{
|
{
|
||||||
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[1]));
|
Advisor = (Unit::GetCreature((*m_creature), AdvisorGuid[1]));
|
||||||
|
|
||||||
if(Advisor)
|
if(Advisor)
|
||||||
{
|
{
|
||||||
@@ -602,7 +602,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
|
|
||||||
//Subphase 3 - Start
|
//Subphase 3 - Start
|
||||||
case 4:
|
case 4:
|
||||||
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[1]));
|
Advisor = (Unit::GetCreature((*m_creature), AdvisorGuid[1]));
|
||||||
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
|
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_INTRO_CAPERNIAN, m_creature);
|
DoScriptText(SAY_INTRO_CAPERNIAN, m_creature);
|
||||||
@@ -618,7 +618,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
case 5:
|
case 5:
|
||||||
if(Phase_Timer < diff)
|
if(Phase_Timer < diff)
|
||||||
{
|
{
|
||||||
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[2]));
|
Advisor = (Unit::GetCreature((*m_creature), AdvisorGuid[2]));
|
||||||
|
|
||||||
if(Advisor)
|
if(Advisor)
|
||||||
{
|
{
|
||||||
@@ -636,7 +636,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
|
|
||||||
//Subphase 4 - Start
|
//Subphase 4 - Start
|
||||||
case 6:
|
case 6:
|
||||||
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[2]));
|
Advisor = (Unit::GetCreature((*m_creature), AdvisorGuid[2]));
|
||||||
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
|
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_INTRO_TELONICUS, m_creature);
|
DoScriptText(SAY_INTRO_TELONICUS, m_creature);
|
||||||
@@ -652,7 +652,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
case 7:
|
case 7:
|
||||||
if(Phase_Timer < diff)
|
if(Phase_Timer < diff)
|
||||||
{
|
{
|
||||||
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[3]));
|
Advisor = (Unit::GetCreature((*m_creature), AdvisorGuid[3]));
|
||||||
|
|
||||||
if(Advisor)
|
if(Advisor)
|
||||||
{
|
{
|
||||||
@@ -672,7 +672,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
|
|
||||||
//End of phase 1
|
//End of phase 1
|
||||||
case 8:
|
case 8:
|
||||||
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[3]));
|
Advisor = (Unit::GetCreature((*m_creature), AdvisorGuid[3]));
|
||||||
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
|
if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD))
|
||||||
{
|
{
|
||||||
Phase = 2;
|
Phase = 2;
|
||||||
@@ -742,7 +742,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
Creature* Advisor;
|
Creature* Advisor;
|
||||||
for (uint32 i = 0; i < 4; ++i)
|
for (uint32 i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[i]));
|
Advisor = (Unit::GetCreature((*m_creature), AdvisorGuid[i]));
|
||||||
if (!Advisor)
|
if (!Advisor)
|
||||||
error_log("TSCR: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
|
error_log("TSCR: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
|
||||||
else ((advisorbase_ai*)Advisor->AI())->Revive(Target);
|
else ((advisorbase_ai*)Advisor->AI())->Revive(Target);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ struct TRINITY_DLL_DECL boss_dalronnAI : public ScriptedAI
|
|||||||
|
|
||||||
if (Skarvald)
|
if (Skarvald)
|
||||||
{
|
{
|
||||||
Creature* Skravald_m = ((Creature*)Unit::GetUnit((*m_creature), Skarvald));
|
Creature* Skravald_m = (Unit::GetCreature((*m_creature), Skarvald));
|
||||||
if (Skravald_m)
|
if (Skravald_m)
|
||||||
{
|
{
|
||||||
if (!Skravald_m->isAlive())
|
if (!Skravald_m->isAlive())
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ struct TRINITY_DLL_DECL boss_skarvaldAI : public ScriptedAI
|
|||||||
|
|
||||||
if (Dalronn)
|
if (Dalronn)
|
||||||
{
|
{
|
||||||
Creature* Dalronn_m = ((Creature*)Unit::GetUnit((*m_creature), Dalronn));
|
Creature* Dalronn_m = (Unit::GetCreature((*m_creature), Dalronn));
|
||||||
if (Dalronn_m)
|
if (Dalronn_m)
|
||||||
{
|
{
|
||||||
if (!Dalronn_m->isAlive())
|
if (!Dalronn_m->isAlive())
|
||||||
|
|||||||
@@ -9555,19 +9555,8 @@ void Unit::Unmount()
|
|||||||
// only resummon old pet if the player is already added to a map
|
// only resummon old pet if the player is already added to a map
|
||||||
// this prevents adding a pet to a not created map which would otherwise cause a crash
|
// this prevents adding a pet to a not created map which would otherwise cause a crash
|
||||||
// (it could probably happen when logging in after a previous crash)
|
// (it could probably happen when logging in after a previous crash)
|
||||||
<<<<<<< HEAD:src/game/Unit.cpp
|
|
||||||
if(GetTypeId() == TYPEID_PLAYER && IsInWorld() && ((Player*)this)->GetTemporaryUnsummonedPetNumber() && isAlive())
|
|
||||||
{
|
|
||||||
Pet* NewPet = new Pet((Player*)this);
|
|
||||||
if(!NewPet->LoadPetFromDB((Player*)this, 0, ((Player*)this)->GetTemporaryUnsummonedPetNumber(), true))
|
|
||||||
delete NewPet;
|
|
||||||
|
|
||||||
((Player*)this)->SetTemporaryUnsummonedPetNumber(0);
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
if(GetTypeId() == TYPEID_PLAYER)
|
if(GetTypeId() == TYPEID_PLAYER)
|
||||||
((Player*)this)->ResummonPetTemporaryUnSummonedIfAny();
|
((Player*)this)->ResummonPetTemporaryUnSummonedIfAny();
|
||||||
>>>>>>> 661760f287d94dbbe8f5224b19ba4181c7d62910:src/game/Unit.cpp
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::SetInCombatWith(Unit* enemy)
|
void Unit::SetInCombatWith(Unit* enemy)
|
||||||
|
|||||||
Reference in New Issue
Block a user