Пример #1
0
 void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply)
 {
     if (who->GetTypeId() == TYPEID_PLAYER)
     {
         if(apply)
         {
             me->SetCanFly(true);
             me->SetSpeed(MOVE_FLIGHT, 2.0f);
             GoToTheNextPoint();
         }
         
     }
 }
Пример #2
0
 void UpdateAI(uint32 const diff) 
 {
     if(Fly && !FlyDisabled)
     {
         GoToTheNextPoint();
         if (uiPoint >= 25)
         {
             if(Unit *player = me->GetVehicleKit()->GetPassenger(0))
             player->ExitVehicle(me);
             me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
             FlyDisabled = true;
             me->GetMotionMaster()->MoveIdle();
             me->StopMoving();
         }
         Fly = false;
     }
 }
Пример #3
0
 void UpdateAI(uint32 diff)
 {
     if(Fly && !FlyDisabled)
     {
         GoToTheNextPoint();
         if (uiPoint >= 12)
         {
             if(Unit *player = me->GetVehicleKit()->GetPassenger(0))
             player->ExitVehicle(me);
             FlyDisabled = true;
             me->GetMotionMaster()->MoveIdle();
             me->StopMoving();
             me->SetVisible(false);
             me->DisappearAndDie();
         }
         Fly = false;
     }
 }
Пример #4
0
 void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply)
 {
     if (who->GetTypeId() == TYPEID_PLAYER)
     {
         if(apply && me->GetAura(SPELL_NET))
         {
             Talk(SAY_REMOVE_NET);
             who->ExitVehicle(me);
         }
         if(apply && !me->GetAura(SPELL_NET))
         {
             me->SetCanFly(true);
             me->SetSpeed(MOVE_FLIGHT, 2.0f);
             GoToTheNextPoint();
             Talk(SAY_DRAGON_FREE);
         }
         
     }
 }