diff options
7 files changed, 204 insertions, 71 deletions
diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_anetheron.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_anetheron.cpp index 25e22f8f391..32b944861ff 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_anetheron.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_anetheron.cpp @@ -43,7 +43,6 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI pInstance = ((ScriptedInstance*)c->GetInstanceData()); go = false; pos = 0; - Reset(); SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SLEEP); if(TempSpell && TempSpell->EffectImplicitTargetA[0] != 1) { diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_azgalor.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_azgalor.cpp index 85948706145..ef4db888797 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_azgalor.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_azgalor.cpp @@ -34,7 +34,6 @@ struct TRINITY_DLL_DECL boss_azgalorAI : public hyjal_trashAI pInstance = ((ScriptedInstance*)c->GetInstanceData()); go = false; pos = 0; - Reset(); SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_HOWL_OF_AZGALOR); if(TempSpell) TempSpell->EffectRadiusIndex[0] = 12;//100yards instead of 50000?! diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_kazrogal.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_kazrogal.cpp index 6bd24fca7a4..9e8b4393fed 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_kazrogal.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_kazrogal.cpp @@ -31,7 +31,6 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI pInstance = ((ScriptedInstance*)c->GetInstanceData()); go = false; pos = 0; - Reset(); SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_MARK); if(TempSpell && TempSpell->EffectImplicitTargetA[0] != 1) { diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_rage_winterchill.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_rage_winterchill.cpp index b125668947c..c77e4aef20d 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_rage_winterchill.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_rage_winterchill.cpp @@ -37,7 +37,6 @@ struct TRINITY_DLL_DECL boss_rage_winterchillAI : public hyjal_trashAI pInstance = ((ScriptedInstance*)c->GetInstanceData()); go = false; pos = 0; - Reset(); } uint32 FrostArmorTimer; diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp index 4fe60c053ec..d144423ccca 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp @@ -84,18 +84,34 @@ float InfernalPos[8][3]=//spawn points for the infernals in the horde base {5482.39, -2689.19, 1481.09} }; -float InfernalSPWP[10][3]=//spawn points for the infernals in the horde base used in the cleaning wave +float InfernalSPWP[26][4]=//spawn points for the infernals in the horde base used in the cleaning wave { - {5528.5, -2771.23, 1494.08}, - {5471.41, -2711.17, 1483.97}, - {5464.08, -2653.9, 1482.67}, - {5550.84, -2633.8, 1484.08}, - {5579.86, -2704.86, 1489.33}, - {5589.67, -2655.5, 1490.15}, - {5432.36, -2744.81, 1486.25}, - {5463.14, -2857.41, 1512.45}, - {5534.31, -2774.58, 1494.89}, - {5524.36, -2735.52, 1484.16} + {5490.96, -2718.72, 1482.96, 0.49773}, + {5449.51, -2723.32, 1485.69, 2.69685}, + {5520.83, -2624.68, 1483.82, 1.20459}, + {5558.28, -2629.26, 1485.76, 0.37992}, + {5567.97, -2758.69, 1494.10, 5.04125}, + {5384.90, -2793.47, 1503.90, 5.55412}, + {5495.33, -2814.06, 1501.56, 1.12055}, + {5472.63, -2929.39, 1538.31, 1.95777}, + {5334.72, -2952.29, 1534.34, 0.50869}, + {5398.36, -2872.46, 1512.38, 0.76787}, + {5514.39, -2768.63, 1492.30, 1.55721}, + {5598.91, -2703.75, 1495.64, 2.56644}, + {5467.80, -2655.93, 1482.27, 0.85819}, + {5399.83, -2985.24, 1545.04, 5.92559}, + {5232.13, -2967.05, 1553.09, 5.41351}, + {5272.02, -3082.52, 1567.09, 3.40681}, + {5343.26, -3120.71, 1582.92, 3.16727}, + {5371.26, -3175.24, 1587.41, 6.10466}, + {5434.67, -3177.91, 1579.25, 2.77850}, + {5237.39, -3149.25, 1593.59, 0.83855}, + {5202.15, -3016.64, 1566.28, 3.31256}, + {5302.54, -2914.37, 1528.53, 3.37146}, + {5439.04, -2834.81, 1508.80, 2.14231}, + {5421.33, -2771.04, 1494.28, 6.06223}, + {5549.76, -2692.93, 1482.68, 2.19414}, + {5459.78, -2755.71, 1490.68, 1.05139} }; float VeinPos[14][8]=//spawn points of the ancient gem veins @@ -1164,7 +1180,6 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) } for(uint8 i = 0; i < 5; i++)//summon 5 gargoyles { - uint8 r = rand()%4; Creature* pUnit = m_creature->SummonCreature(GARGOYLE, AllianceOverrunGargPos[i][0], AllianceOverrunGargPos[i][1], AllianceOverrunGargPos[i][2], AllianceOverrunGargPos[i][3], TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); if(pUnit) { @@ -1180,6 +1195,42 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) for(uint8 i = 0; i < 65; i++)//summon fires m_creature->SummonGameObject(FLAMEOBJECT,HordeFirePos[i][0],HordeFirePos[i][1],HordeFirePos[i][2],HordeFirePos[i][3],HordeFirePos[i][4],HordeFirePos[i][5],HordeFirePos[i][6],HordeFirePos[i][7],0); + for(uint8 i = 0; i < 26; i++)//summon infernals + { + Creature* pUnit = m_creature->SummonCreature(GIANT_INFERNAL, InfernalSPWP[i][0], InfernalSPWP[i][1], InfernalSPWP[i][2], InfernalSPWP[i][3], TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); + if(pUnit) + { + pUnit->SetHomePosition(InfernalSPWP[i][0], InfernalSPWP[i][1], InfernalSPWP[i][2], InfernalSPWP[i][3]); + ((hyjal_trashAI*)pUnit->AI())->faction = Faction; + ((hyjal_trashAI*)pUnit->AI())->IsOverrun = true; + ((hyjal_trashAI*)pUnit->AI())->OverrunType = i; + pUnit->setActive(true); + } + } + for(uint8 i = 0; i < 25; i++)//summon 25 ghouls + { + uint8 r = rand()%4; + Creature* pUnit = m_creature->SummonCreature(GHOUL, HordeBase[r][0]+irand(-15,15), HordeBase[r][1]+irand(-15,15), HordeBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); + if(pUnit) + { + ((hyjal_trashAI*)pUnit->AI())->faction = Faction; + ((hyjal_trashAI*)pUnit->AI())->IsOverrun = true; + ((hyjal_trashAI*)pUnit->AI())->OverrunType = i; + pUnit->setActive(true); + } + } + for(uint8 i = 0; i < 5; i++)//summon 5 abominations + { + uint8 r = rand()%4; + Creature* pUnit = m_creature->SummonCreature(ABOMINATION, HordeBase[r][0]+irand(-15,15), HordeBase[r][1]+irand(-15,15), HordeBase[r][2], 0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); + if(pUnit) + { + ((hyjal_trashAI*)pUnit->AI())->faction = Faction; + ((hyjal_trashAI*)pUnit->AI())->IsOverrun = true; + ((hyjal_trashAI*)pUnit->AI())->OverrunType = i; + pUnit->setActive(true); + } + } break; } }
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp index 058d5a0f72d..f099f1be6da 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp @@ -17,7 +17,7 @@ float HordeWPs[8][3]=//basic waypoints from spawn to leader {5554.58, -2514.66, 1476.12}, {5554.16, -2567.23, 1479.90}, {5540.67, -2625.99, 1480.89}, - {5508.16, -2659.2, 1480.15}, + {5508.16, -2659.20, 1480.15},//random rush starts from here {5489.62, -2704.05, 1482.18}, {5457.04, -2726.26, 1485.10} }; @@ -36,7 +36,7 @@ float AllianceWPs[8][3]=//basic waypoints from spawn to leader float FrostWyrmWPs[3][3]=//waypoints for the frost wyrms in horde base { {5580.82, -2628.83, 1528.28}, - {5550.9, -2667.16, 1505.45}, + {5550.90, -2667.16, 1505.45}, {5459.64, -2725.91, 1484.83} }; @@ -114,41 +114,29 @@ float AllianceOverrunWP[55][3]=//waypoints in the alliance base used in the end }; -float HordeOverrunWP[33][3]=//waypoints in the horde base used in the end in the cleaning wave -{ - {5510.4815, -2676.7112, 1480.4314},// 0 spawn - {5528.5, -2771.23, 1494.08},// 1 infernal 1 - {5471.41, -2711.17, 1483.97},// 2 infernal 2 - {5464.08, -2653.9, 1482.67},// 3 infernal 3 - {5550.84, -2633.8, 1484.08},// 4 infernal 4 - {5579.86, -2704.86, 1489.33},// 5 infernal 5 - {5531.17, -2634.41, 1481.11},// 6 start - {5484.56, -2662.32, 1481.11},// 7 end - {5528.79, -2636.19, 1481.33},// 8 start - {5511.87, -2626.16, 1484.76},// 9 end - {5537.93, -2637.54, 1480.69},// 10 start - {5504.26, -2710.44, 1482.14},// 11 - {5449.92, -2724.51, 1485.69},// 12 - {5431.08, -2713.96, 1493.37},// 13 end - {5546.89, -2620.74, 1481.06},// 14 start - {5579.75, -2658.66, 1488.61},// 15 - {5598.45, -2692.56, 1493.59},// 16 end - {5550.96, -2624.63, 1482.94},// 17 start - {5578.7, -2656.13, 1488.69},// 18 - {5574.56, -2722.74, 1488.5},// 19 - {5590.46, -2746.81, 1495},// 20 - {5571.33, -2761.14, 1494.93},// 21 - {5546.45, -2770.83, 1495.33},// 22 - {5532.51, -2804.72, 1498.49},// 23 - {5492.97, -2760.9, 1489.16},// 24 - {5451.35, -2724.44, 1485.58},// 25 - {5430.23, -2714.38, 1493.51},// 26 end - {5535.67, -2627.69, 1480.87},// 27 start - {5485.75, -2667.97, 1480.64},// 28 - {5510.78, -2740.5, 1486.27},// 29 - {5559.93, -2710.97, 1483.59},// 30 - {5561.09, -2688.13, 1484.65},// 31 - {5556.73, -2676.17, 1482.58}// 32 end +float HordeOverrunWP[21][3]=//waypoints in the horde base used in the end in the cleaning wave +{ + {5490.72,-2702.94,1482.14},//0 start + {5469.77,-2741.34,1486.95}, + {5439.47,-2771.02,1494.59}, + {5408.85,-2811.92,1505.68}, + {5423.87,-2857.80,1515.55}, + {5428.19,-2898.15,1524.61}, + {5394.59,-2930.05,1528.23}, + {5351.11,-2935.80,1532.24}, + {5312.37,-2959.06,1536.21}, + {5264.93,-2989.80,1545.70}, + {5256.63,-3056.16,1559.24}, + {5267.32,-3119.55,1575.36}, + {5305.61,-3139.88,1586.38}, + {5330.56,-3135.37,1588.58}, + {5365.87,-3139.78,1583.96}, + {5389.39,-3163.57,1582.57},//15 end + {5500.86,-2669.89,1481.04},//16 start + {5472.08,-2715.14,1483.55}, + {5450.11,-2721.47,1485.61}, + {5433.25,-2712.93,1493.02},//19 end 1 + {5429.91,-2718.44,1493.42}//20 end 2 }; void hyjal_trashAI::Reset(){} @@ -385,6 +373,89 @@ void hyjal_trashAI::UpdateAI(const uint32 diff) } } } + if(faction == 1) + { + if(m_creature->GetEntry() == GHOUL) + { + for(uint8 i = 0; i < 6; i++) + AddWaypoint(i, HordeWPs[i][0]+irand(-3,3), HordeWPs[i][1]+irand(-3,3), HordeWPs[i][2]); + switch(OverrunType) + { + case 0: + AddWaypoint( 5, HordeOverrunWP[16][0]+irand(-10,10), HordeOverrunWP[16][1]+irand(-10,10), HordeOverrunWP[16][2]); + AddWaypoint( 6, HordeOverrunWP[17][0]+irand(-10,10), HordeOverrunWP[17][1]+irand(-10,10), HordeOverrunWP[17][2]); + AddWaypoint( 7, HordeOverrunWP[18][0], HordeOverrunWP[18][1], HordeOverrunWP[18][2]); + AddWaypoint( 8, HordeOverrunWP[19][0], HordeOverrunWP[19][1], HordeOverrunWP[19][2]); + m_creature->SetHomePosition(HordeOverrunWP[19][0], HordeOverrunWP[19][1], HordeOverrunWP[19][2],0); + SetDespawnAtEnd(false); + LastOverronPos = 8; + Start(true, true, true); + break; + case 1: + AddWaypoint( 5, HordeOverrunWP[16][0]+irand(-10,10), HordeOverrunWP[16][1]+irand(-10,10), HordeOverrunWP[16][2]); + AddWaypoint( 6, HordeOverrunWP[17][0]+irand(-10,10), HordeOverrunWP[17][1]+irand(-10,10), HordeOverrunWP[17][2]); + AddWaypoint( 7, HordeOverrunWP[18][0], HordeOverrunWP[18][1], HordeOverrunWP[18][2]); + AddWaypoint( 8, HordeOverrunWP[20][0], HordeOverrunWP[20][1], HordeOverrunWP[20][2]); + m_creature->SetHomePosition(HordeOverrunWP[20][0], HordeOverrunWP[20][1], HordeOverrunWP[20][2],0); + SetDespawnAtEnd(false); + LastOverronPos = 8; + Start(true, true, true); + break; + default: + AddWaypoint( 5, HordeOverrunWP[0][0]+irand(-10,10), HordeOverrunWP[0][1]+irand(-10,10), HordeOverrunWP[0][2]); + AddWaypoint( 6, HordeOverrunWP[1][0]+irand(-10,10), HordeOverrunWP[1][1]+irand(-10,10), HordeOverrunWP[1][2]); + AddWaypoint( 7, HordeOverrunWP[2][0]+irand(-10,10), HordeOverrunWP[2][1]+irand(-10,10), HordeOverrunWP[2][2]); + AddWaypoint( 8, HordeOverrunWP[3][0]+irand(-10,10), HordeOverrunWP[3][1]+irand(-10,10), HordeOverrunWP[3][2]); + AddWaypoint( 9, HordeOverrunWP[4][0]+irand(-10,10), HordeOverrunWP[4][1]+irand(-10,10), HordeOverrunWP[4][2]); + AddWaypoint(10, HordeOverrunWP[5][0]+irand(-10,10), HordeOverrunWP[5][1]+irand(-10,10), HordeOverrunWP[5][2]); + AddWaypoint(11, HordeOverrunWP[6][0]+irand(-10,10), HordeOverrunWP[6][1]+irand(-10,10), HordeOverrunWP[6][2]); + AddWaypoint(12, HordeOverrunWP[7][0]+irand(-10,10), HordeOverrunWP[7][1]+irand(-10,10), HordeOverrunWP[7][2]); + AddWaypoint(13, HordeOverrunWP[8][0]+irand(-10,10), HordeOverrunWP[8][1]+irand(-10,10), HordeOverrunWP[8][2]); + AddWaypoint(14, HordeOverrunWP[9][0]+irand(-10,10), HordeOverrunWP[9][1]+irand(-10,10), HordeOverrunWP[9][2]); + AddWaypoint(15, HordeOverrunWP[10][0]+irand(-10,10), HordeOverrunWP[10][1]+irand(-10,10), HordeOverrunWP[10][2]); + AddWaypoint(16, HordeOverrunWP[11][0]+irand(-10,10), HordeOverrunWP[11][1]+irand(-10,10), HordeOverrunWP[11][2]); + AddWaypoint(17, HordeOverrunWP[12][0]+irand(-10,10), HordeOverrunWP[12][1]+irand(-10,10), HordeOverrunWP[12][2]); + AddWaypoint(18, HordeOverrunWP[13][0]+irand(-10,10), HordeOverrunWP[13][1]+irand(-10,10), HordeOverrunWP[13][2]); + AddWaypoint(19, HordeOverrunWP[14][0]+irand(-10,10), HordeOverrunWP[14][1]+irand(-10,10), HordeOverrunWP[14][2]); + AddWaypoint(20, HordeOverrunWP[15][0]+irand(-10,10), HordeOverrunWP[15][1]+irand(-10,10), HordeOverrunWP[15][2]); + //m_creature->SetHomePosition(AllianceOverrunWP[2][0]+irand(-10,10), AllianceOverrunWP[2][1]+irand(-10,10), AllianceOverrunWP[2][2],0); + SetDespawnAtEnd(true); + LastOverronPos = 20; + Start(true, true, true); + break; + } + } + if(m_creature->GetEntry() == ABOMINATION) + { + for(uint8 i = 0; i < 6; i++) + AddWaypoint(i, HordeWPs[i][0]+irand(-10,10), HordeWPs[i][1]+irand(-10,10), HordeWPs[i][2]); + switch(OverrunType) + { + default: + AddWaypoint( 5, HordeOverrunWP[0][0]+irand(-10,10), HordeOverrunWP[0][1]+irand(-10,10), HordeOverrunWP[0][2]); + AddWaypoint( 6, HordeOverrunWP[1][0]+irand(-10,10), HordeOverrunWP[1][1]+irand(-10,10), HordeOverrunWP[1][2]); + AddWaypoint( 7, HordeOverrunWP[2][0]+irand(-10,10), HordeOverrunWP[2][1]+irand(-10,10), HordeOverrunWP[2][2]); + AddWaypoint( 8, HordeOverrunWP[3][0]+irand(-10,10), HordeOverrunWP[3][1]+irand(-10,10), HordeOverrunWP[3][2]); + AddWaypoint( 9, HordeOverrunWP[4][0]+irand(-10,10), HordeOverrunWP[4][1]+irand(-10,10), HordeOverrunWP[4][2]); + AddWaypoint(10, HordeOverrunWP[5][0]+irand(-10,10), HordeOverrunWP[5][1]+irand(-10,10), HordeOverrunWP[5][2]); + AddWaypoint(11, HordeOverrunWP[6][0]+irand(-10,10), HordeOverrunWP[6][1]+irand(-10,10), HordeOverrunWP[6][2]); + AddWaypoint(12, HordeOverrunWP[7][0]+irand(-10,10), HordeOverrunWP[7][1]+irand(-10,10), HordeOverrunWP[7][2]); + AddWaypoint(13, HordeOverrunWP[8][0]+irand(-10,10), HordeOverrunWP[8][1]+irand(-10,10), HordeOverrunWP[8][2]); + AddWaypoint(14, HordeOverrunWP[9][0]+irand(-10,10), HordeOverrunWP[9][1]+irand(-10,10), HordeOverrunWP[9][2]); + AddWaypoint(15, HordeOverrunWP[10][0]+irand(-10,10), HordeOverrunWP[10][1]+irand(-10,10), HordeOverrunWP[10][2]); + AddWaypoint(16, HordeOverrunWP[11][0]+irand(-10,10), HordeOverrunWP[11][1]+irand(-10,10), HordeOverrunWP[11][2]); + AddWaypoint(17, HordeOverrunWP[12][0]+irand(-10,10), HordeOverrunWP[12][1]+irand(-10,10), HordeOverrunWP[12][2]); + AddWaypoint(18, HordeOverrunWP[13][0]+irand(-10,10), HordeOverrunWP[13][1]+irand(-10,10), HordeOverrunWP[13][2]); + AddWaypoint(19, HordeOverrunWP[14][0]+irand(-10,10), HordeOverrunWP[14][1]+irand(-10,10), HordeOverrunWP[14][2]); + AddWaypoint(20, HordeOverrunWP[15][0]+irand(-10,10), HordeOverrunWP[15][1]+irand(-10,10), HordeOverrunWP[15][2]); + //m_creature->SetHomePosition(AllianceOverrunWP[2][0]+irand(-10,10), AllianceOverrunWP[2][1]+irand(-10,10), AllianceOverrunWP[2][2],0); + SetDespawnAtEnd(true); + LastOverronPos = 20; + Start(true, true, true); + break; + } + } + } } } @@ -424,7 +495,7 @@ struct mob_giant_infernalAI : public hyjal_trashAI pInstance = ((ScriptedInstance*)c->GetInstanceData()); meteor = false;//call once! CanMove = false; - Delay = rand()%10000; + Delay = rand()%30000; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_INVIS); @@ -462,19 +533,6 @@ struct mob_giant_infernalAI : public hyjal_trashAI if (target && target->isAlive()) m_creature->AddThreat(target,0.0); } - } - if (i == LastOverronPos && IsOverrun) - { - Creature* pUnit = m_creature->SummonCreature(17931, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 2*60*1000); - if(pUnit) - { - pUnit->SetVisibility(VISIBILITY_OFF); - pUnit->SetMaxHealth(10000000); - pUnit->SetHealth(10000000); - pUnit->setFaction(17772); - pUnit->Attack(m_creature, true); - m_creature->AddThreat(pUnit,0); - } } } @@ -604,7 +662,7 @@ struct mob_abominationAI : public hyjal_trashAI { if(faction == 0 && LastOverronPos == 17)//alliance round { - Creature* pUnit = m_creature->SummonCreature(m_creature->GetEntry(),4928.48+irand(-10,10), -1526.38+irand(-10,10), 1326.83+irand(-10,10),0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); + Creature* pUnit = m_creature->SummonCreature(m_creature->GetEntry(),4928.48+irand(-10,10), -1526.38+irand(-10,10), 1326.83,0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); if(pUnit) { ((hyjal_trashAI*)pUnit->AI())->faction = faction; @@ -614,6 +672,18 @@ struct mob_abominationAI : public hyjal_trashAI pUnit->setActive(true); } } + if(faction == 1 && LastOverronPos == 20)//horde round + { + Creature* pUnit = m_creature->SummonCreature(m_creature->GetEntry(),5458.01+irand(-10,10),-2340.27+irand(-10,10),1459.60,0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); + if(pUnit) + { + ((hyjal_trashAI*)pUnit->AI())->faction = faction; + ((hyjal_trashAI*)pUnit->AI())->IsOverrun = true; + ((hyjal_trashAI*)pUnit->AI())->OverrunType = 10;//default + ((hyjal_trashAI*)pUnit->AI())->SetupOverrun = false; + pUnit->setActive(true); + } + } } } @@ -681,9 +751,13 @@ struct mob_ghoulAI : public hyjal_trashAI bool go; uint32 FrenzyTimer; uint32 pos; + uint32 MoveTimer; + bool RandomMove; void Reset() { FrenzyTimer = 5000+rand()%5000; + MoveTimer = 2000; + RandomMove = false; } void WaypointReached(uint32 i) @@ -707,7 +781,7 @@ struct mob_ghoulAI : public hyjal_trashAI m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACKUNARMED); if(faction == 0 && LastOverronPos == 17)//alliance round { - Creature* pUnit = m_creature->SummonCreature(m_creature->GetEntry(),4928.48+irand(-10,10), -1526.38+irand(-10,10), 1326.83+irand(-10,10),0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); + Creature* pUnit = m_creature->SummonCreature(m_creature->GetEntry(),4928.48+irand(-10,10), -1526.38+irand(-10,10), 1326.83,0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); if(pUnit) { ((hyjal_trashAI*)pUnit->AI())->faction = faction; @@ -717,6 +791,18 @@ struct mob_ghoulAI : public hyjal_trashAI pUnit->setActive(true); } } + if(faction == 1 && LastOverronPos == 20)//horde round + { + Creature* pUnit = m_creature->SummonCreature(m_creature->GetEntry(),5458.01+irand(-10,10), -2340.27+irand(-10,10), 1459.60,0, TEMPSUMMON_MANUAL_DESPAWN, 2*60*1000); + if(pUnit) + { + ((hyjal_trashAI*)pUnit->AI())->faction = faction; + ((hyjal_trashAI*)pUnit->AI())->IsOverrun = true; + ((hyjal_trashAI*)pUnit->AI())->OverrunType = 10;//default + ((hyjal_trashAI*)pUnit->AI())->SetupOverrun = false; + pUnit->setActive(true); + } + } } } @@ -754,7 +840,7 @@ struct mob_ghoulAI : public hyjal_trashAI { DoCast(m_creature,SPELL_FRENZY); FrenzyTimer = 15000+rand()%15000; - }else FrenzyTimer -= diff; + }else FrenzyTimer -= diff; if (!UpdateVictim()) return; diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.h b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.h index 1b5c0c3ab37..1113ce4c8a2 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.h +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.h @@ -5,7 +5,7 @@ #include "def_hyjal.h" #include "../../../npc/npc_escortAI.h" -#define MINRAIDDAMAGE 1000000//minimal damage before trash can drop loot and reputation +#define MINRAIDDAMAGE 700000//minimal damage before trash can drop loot and reputation, resets if faction leader dies struct TRINITY_DLL_DECL hyjal_trashAI : public npc_escortAI { |