diff options
Diffstat (limited to 'src/scripts/eastern_kingdoms')
6 files changed, 32 insertions, 28 deletions
diff --git a/src/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/src/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index 7ab783e6e93..f6e94307f2f 100644 --- a/src/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/src/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -173,8 +173,8 @@ struct boss_vaelAI : public ScriptedAI while (i < 3) // max 3 tries to get a random target with power_mana { ++i; - if (pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true)) //not aggro leader - if (pTarget->getPowerType() == POWER_MANA) + pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); //not aggro leader + if (pTarget && pTarget->getPowerType() == POWER_MANA) i = 3; } if (pTarget) // cast on self (see below) diff --git a/src/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp b/src/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp index 79af5c3030c..3b0ce186592 100644 --- a/src/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp +++ b/src/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp @@ -1511,7 +1511,8 @@ struct npc_highlord_darion_mograineAI : public npc_escortAI // Death for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i) { - if (!(pTemp = Unit::GetCreature(*me, uiGhoulGUID[i]))) + pTemp = Unit::GetCreature(*me, uiGhoulGUID[i]); + if (!pTemp) { pTemp = me->SummonCreature(NPC_ACHERUS_GHOUL, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000); pTemp->setFaction(2084); @@ -1520,7 +1521,8 @@ struct npc_highlord_darion_mograineAI : public npc_escortAI } for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i) { - if (!(pTemp = Unit::GetCreature(*me, uiAbominationGUID[i]))) + pTemp = Unit::GetCreature(*me, uiAbominationGUID[i]); + if (!pTemp) { pTemp = me->SummonCreature(NPC_WARRIOR_OF_THE_FROZEN_WASTES, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000); pTemp->setFaction(2084); @@ -1529,7 +1531,8 @@ struct npc_highlord_darion_mograineAI : public npc_escortAI } for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i) { - if (!(pTemp = Unit::GetCreature(*me, uiWarriorGUID[i]))) + pTemp = Unit::GetCreature(*me, uiWarriorGUID[i]); + if (!pTemp) { pTemp = me->SummonCreature(NPC_RAMPAGING_ABOMINATION, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000); pTemp->setFaction(2084); @@ -1538,7 +1541,8 @@ struct npc_highlord_darion_mograineAI : public npc_escortAI } for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i) { - if (!(pTemp = Unit::GetCreature(*me, uiBehemothGUID[i]))) + pTemp = Unit::GetCreature(*me, uiBehemothGUID[i]); + if (!pTemp) { pTemp = me->SummonCreature(NPC_FLESH_BEHEMOTH, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000); pTemp->setFaction(2084); @@ -1549,7 +1553,8 @@ struct npc_highlord_darion_mograineAI : public npc_escortAI // Dawn for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i) { - if (!(pTemp = Unit::GetCreature(*me, uiDefenderGUID[i]))) + pTemp = Unit::GetCreature(*me, uiDefenderGUID[i]); + if (!pTemp) { pTemp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000); pTemp->setFaction(2089); @@ -1559,7 +1564,8 @@ struct npc_highlord_darion_mograineAI : public npc_escortAI } for (uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i) { - if (!(pTemp = Unit::GetCreature(*me, uiEarthshatterGUID[i]))) + pTemp = Unit::GetCreature(*me, uiEarthshatterGUID[i]); + if (!pTemp) { pTemp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000); pTemp->setFaction(2089); @@ -1567,28 +1573,32 @@ struct npc_highlord_darion_mograineAI : public npc_escortAI uiEarthshatterGUID[i] = pTemp->GetGUID(); } } - if (!(pTemp = Unit::GetCreature(*me, uiKorfaxGUID))) + pTemp = Unit::GetCreature(*me, uiKorfaxGUID); + if (!pTemp) { pTemp = me->SummonCreature(NPC_KORFAX_CHAMPION_OF_THE_LIGHT, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000); pTemp->setFaction(2089); me->AddThreat(pTemp, 0.0f); uiKorfaxGUID = pTemp->GetGUID(); } - if (!(pTemp = Unit::GetCreature(*me, uiMaxwellGUID))) + pTemp = Unit::GetCreature(*me, uiMaxwellGUID); + if (!pTemp) { pTemp = me->SummonCreature(NPC_LORD_MAXWELL_TYROSUS, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000); pTemp->setFaction(2089); me->AddThreat(pTemp, 0.0f); uiMaxwellGUID = pTemp->GetGUID(); } - if (!(pTemp = Unit::GetCreature(*me, uiEligorGUID))) + pTemp = Unit::GetCreature(*me, uiEligorGUID); + if (!pTemp) { pTemp = me->SummonCreature(NPC_COMMANDER_ELIGOR_DAWNBRINGER, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000); pTemp->setFaction(2089); me->AddThreat(pTemp, 0.0f); uiEligorGUID = pTemp->GetGUID(); } - if (!(pTemp = Unit::GetCreature(*me, uiRayneGUID))) + pTemp = Unit::GetCreature(*me, uiRayneGUID); + if (!pTemp) { pTemp = me->SummonCreature(NPC_RAYNE, LightofDawnLoc[0].x+rand()%30, LightofDawnLoc[0].y+rand()%30, LightofDawnLoc[0].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000); pTemp->setFaction(2089); diff --git a/src/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp b/src/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp index 32555a550c2..6b6efa0f934 100644 --- a/src/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp +++ b/src/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp @@ -60,7 +60,7 @@ struct boss_azshir_the_sleeplessAI : public ScriptedAI DoCast(me->getVictim(), SPELL_SOULSIPHON); return; - SoulSiphon_Timer = 20000; + //SoulSiphon_Timer = 20000; } else SoulSiphon_Timer -= diff; } diff --git a/src/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/src/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index b3f250769b2..34d6d1bf295 100644 --- a/src/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/src/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -116,12 +116,7 @@ static Locations Spawn[]= {1765.28,1347.46,17.55} //spawn point for smoke }; -struct Summon -{ - const std::string text; -}; - -static Summon Text[]= +static const char* Text[]= { {"Horseman rise..."}, {"Your time is nigh..."}, @@ -615,14 +610,14 @@ struct boss_headless_horsemanAI : public ScriptedAI if (count < 3) { if (plr) - plr->Say(Text[count].text,0); + plr->Say(Text[count],0); } else { DoCast(me, SPELL_RHYME_BIG); if (plr) { - plr->Say(Text[count].text,0); + plr->Say(Text[count],0); plr->HandleEmoteCommand(ANIM_EMOTE_SHOUT); } wp_reached = true; diff --git a/src/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp b/src/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp index 17ab1f3c5b1..7baa9292142 100644 --- a/src/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp +++ b/src/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp @@ -559,11 +559,10 @@ struct boss_alyson_antilleAI : public boss_hexlord_addAI else { if (urand(0,1)) - { - if (pTarget = DoSelectLowestHpFriendly(50, 0)) - DoCast(pTarget, SPELL_DISPEL_MAGIC, false); - } - else if (pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pTarget = DoSelectLowestHpFriendly(50, 0); + else + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (pTarget) DoCast(pTarget, SPELL_DISPEL_MAGIC, false); } flashheal_timer = 2500; diff --git a/src/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/src/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index 21a7630018b..77e9f9b929f 100644 --- a/src/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/src/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -167,8 +167,8 @@ struct boss_marliAI : public ScriptedAI while (i < 3) // max 3 tries to get a random target with power_mana { ++i; - if (pTarget = SelectTarget(SELECT_TARGET_RANDOM,1, 100, true)) // not aggro leader - if (pTarget->getPowerType() == POWER_MANA) + pTarget = SelectTarget(SELECT_TARGET_RANDOM,1, 100, true); // not aggro leader + if (pTarget && pTarget->getPowerType() == POWER_MANA) i = 3; } if (pTarget) |
