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(); } } }
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; } }
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; } }
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); } } }