DB/Misc: Fix DB startup errors - Closes #6666

Also add a missing break; to previous commit
This commit is contained in:
Nay
2012-06-01 19:59:44 +01:00
parent 925657cc98
commit f89ef6da5b
2 changed files with 8 additions and 3 deletions
@@ -0,0 +1,2 @@
-- Set same flag for diff_entry_1
UPDATE `creature_template` SET `npcflag`=129 WHERE `entry`=30796;
@@ -807,9 +807,7 @@ public:
Unit* shooter = GetCaster(); Unit* shooter = GetCaster();
Creature* wilhelm = GetHitUnit()->ToCreature(); Creature* wilhelm = GetHitUnit()->ToCreature();
Creature* apple = shooter->FindNearestCreature(NPC_APPLE, 30); Creature* apple = shooter->FindNearestCreature(NPC_APPLE, 30);
Creature* bird = shooter->FindNearestCreature(NPC_THICKBIRD, 30);
Creature* drostan = shooter->FindNearestCreature(NPC_DROSTAN, 30); Creature* drostan = shooter->FindNearestCreature(NPC_DROSTAN, 30);
Creature* crunchy = shooter->FindNearestCreature(NPC_CRUNCHY, 30);
if (!wilhelm || !apple || !drostan) if (!wilhelm || !apple || !drostan)
return; return;
@@ -818,12 +816,15 @@ public:
{ {
case EVENT_MISS_BIRD: case EVENT_MISS_BIRD:
{ {
Creature* crunchy = shooter->FindNearestCreature(NPC_CRUNCHY, 30);
Creature* bird = shooter->FindNearestCreature(NPC_THICKBIRD, 30);
if (!bird || !crunchy) if (!bird || !crunchy)
; // fall to EVENT_MISS ; // fall to EVENT_MISS
else else
{ {
shooter->CastSpell(bird, SPELL_MISS_BIRD_APPLE); 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); wilhelm->AI()->Talk(SAY_WILHELM_MISS);
drostan->AI()->Talk(SAY_DROSTAN_REPLY_MISS); drostan->AI()->Talk(SAY_DROSTAN_REPLY_MISS);
@@ -831,6 +832,8 @@ public:
crunchy->GetMotionMaster()->MovePoint(0, bird->GetPositionX(), bird->GetPositionY(), crunchy->GetMotionMaster()->MovePoint(0, bird->GetPositionX(), bird->GetPositionY(),
bird->GetMap()->GetWaterOrGroundLevel(bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ())); bird->GetMap()->GetWaterOrGroundLevel(bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ()));
// TODO: Make crunchy perform emote eat when he reaches the bird // TODO: Make crunchy perform emote eat when he reaches the bird
break;
} }
} }
case EVENT_MISS: case EVENT_MISS: