@@ -136,7 +136,7 @@ enum Misc
136136 // Movement points
137137 POINT_LANDING = 1 ,
138138
139- // Lava directions. Its used to identify to which side lava was moving by last time
139+ // Lava directions
140140 LAVA_LEFT_SIDE = 0 ,
141141 LAVA_RIGHT_SIDE = 1 ,
142142
@@ -307,7 +307,6 @@ struct boss_sartharion : public BossAI
307307{
308308 explicit boss_sartharion (Creature* creature) : BossAI(creature, DATA_SARTHARION ),
309309 dragonsCount(0 ),
310- lastLavaSide(LAVA_RIGHT_SIDE ),
311310 usedBerserk(false ),
312311 below11PctReached(false )
313312 {
@@ -628,8 +627,8 @@ struct boss_sartharion : public BossAI
628627 extraEvents.ScheduleEvent (EVENT_SARTHARION_START_LAVA , 3600ms);
629628 extraEvents.ScheduleEvent (EVENT_SARTHARION_FINISH_LAVA , 11s);
630629
631- // Send wave from left
632- if (lastLavaSide == LAVA_RIGHT_SIDE )
630+ // Randomly choose which side the wave comes from
631+ if (urand ( LAVA_LEFT_SIDE , LAVA_RIGHT_SIDE ) == LAVA_LEFT_SIDE )
633632 {
634633 for (uint8 i = 0 ; i < MAX_LEFT_LAVA_TSUNAMIS ; ++i)
635634 {
@@ -638,10 +637,7 @@ struct boss_sartharion : public BossAI
638637 if (((i - 1 ) % 3 == 0 ) && tsunami) // If center of wave
639638 tsunami->CastSpell (tsunami, SPELL_FLAME_TSUNAMI_VISUAL , true );
640639 }
641-
642- lastLavaSide = LAVA_LEFT_SIDE ;
643640 }
644- // from right
645641 else
646642 {
647643 for (uint8 i = 0 ; i < MAX_RIGHT_LAVA_TSUNAMIS ; ++i)
@@ -651,8 +647,6 @@ struct boss_sartharion : public BossAI
651647 if (((i - 1 ) % 3 == 0 ) && tsunami) // If center of wave
652648 tsunami->CastSpell (tsunami, SPELL_FLAME_TSUNAMI_VISUAL , true );
653649 }
654-
655- lastLavaSide = LAVA_RIGHT_SIDE ;
656650 }
657651 }
658652
@@ -683,7 +677,6 @@ struct boss_sartharion : public BossAI
683677 EventMap extraEvents;
684678 std::list<uint32> volcanoBlows;
685679 uint8 dragonsCount;
686- uint8 lastLavaSide; // 0 = left, 1 = right
687680 bool usedBerserk;
688681 bool below11PctReached;
689682};
0 commit comments