From f89ef6da5b6d59e9d758059549d95759711d0cf9 Mon Sep 17 00:00:00 2001 From: Nay Date: Fri, 1 Jun 2012 19:59:44 +0100 Subject: DB/Misc: Fix DB startup errors - Closes #6666 Also add a missing break; to previous commit --- src/server/scripts/Northrend/sholazar_basin.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp index 2a03e44d5b2..afab9b90a4a 100644 --- a/src/server/scripts/Northrend/sholazar_basin.cpp +++ b/src/server/scripts/Northrend/sholazar_basin.cpp @@ -807,9 +807,7 @@ public: Unit* shooter = GetCaster(); Creature* wilhelm = GetHitUnit()->ToCreature(); Creature* apple = shooter->FindNearestCreature(NPC_APPLE, 30); - Creature* bird = shooter->FindNearestCreature(NPC_THICKBIRD, 30); Creature* drostan = shooter->FindNearestCreature(NPC_DROSTAN, 30); - Creature* crunchy = shooter->FindNearestCreature(NPC_CRUNCHY, 30); if (!wilhelm || !apple || !drostan) return; @@ -818,12 +816,15 @@ public: { case EVENT_MISS_BIRD: { + Creature* crunchy = shooter->FindNearestCreature(NPC_CRUNCHY, 30); + Creature* bird = shooter->FindNearestCreature(NPC_THICKBIRD, 30); + if (!bird || !crunchy) ; // fall to EVENT_MISS else { shooter->CastSpell(bird, SPELL_MISS_BIRD_APPLE); - shooter->CastSpell(bird, SPELL_BIRD_FALL); + bird->CastSpell(bird, SPELL_BIRD_FALL); wilhelm->AI()->Talk(SAY_WILHELM_MISS); drostan->AI()->Talk(SAY_DROSTAN_REPLY_MISS); @@ -831,6 +832,8 @@ public: crunchy->GetMotionMaster()->MovePoint(0, bird->GetPositionX(), bird->GetPositionY(), bird->GetMap()->GetWaterOrGroundLevel(bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ())); // TODO: Make crunchy perform emote eat when he reaches the bird + + break; } } case EVENT_MISS: -- cgit v1.2.3