1504 {
1507 if (!vehicle || !passenger)
1508 return;
1509
1510
1512 if (!dst)
1513 return;
1514
1515 constexpr float SEARCH_RADIUS = 99.0f;
1516
1517 std::list<WorldObject*> targetList;
1521
1522 Unit* seatTarget =
nullptr;
1523 float minDist = SEARCH_RADIUS * SEARCH_RADIUS;
1524
1526 {
1529
1533
1535 if (dist < minDist)
1536 {
1537 minDist = dist;
1538 seatTarget = unit;
1539 }
1540 }
1541
1542
1543 float x, y, z;
1547
1550 }
@ EFFECT_0
Definition SharedDefines.h:31
@ SPELLVALUE_AURA_DURATION
Definition SpellDefines.h:127
@ TARGET_CHECK_DEFAULT
Definition SpellInfo.h:115
@ CURRENT_CHANNELED_SPELL
Definition Unit.h:558
@ SPELL_HOOKSHOT_AURA
Definition boss_flame_leviathan.cpp:92
@ SEAT_DEVICE
Definition boss_flame_leviathan.cpp:170
@ NPC_SEAT
Definition boss_flame_leviathan.cpp:99
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=0)
Definition MotionMaster.h:257
uint32 GetEntry() const
Definition Object.h:123
Unit * ToUnit()
Definition Object.h:216
WorldLocation const * GetExplTargetDest()
Definition SpellScript.cpp:421
SpellInfo const * GetSpellInfo()
Definition SpellScript.cpp:416
Spell * GetSpell()
Definition SpellScript.h:443
Unit * GetCaster()
Definition SpellScript.cpp:401
MotionMaster * GetMotionMaster()
Definition Unit.h:1761
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1429
Vehicle * GetVehicleKit() const
Definition Unit.h:1931
void ExitVehicle(Position const *exitPosition=nullptr)
Definition Unit.cpp:15315
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Definition Unit.h:1581
Unit * GetPassenger(int8 seatId) const
Definition Vehicle.cpp:253
bool IsWithinDist2d(float x, float y, float dist) const
Definition Object.cpp:1364
Definition GridNotifiers.h:262
static void VisitObjects(WorldObject const *obj, T &visitor, float radius)
Definition CellImpl.h:165
void GetPosition(float &x, float &y) const
Definition Position.h:126
float GetExactDistSq(float x, float y, float z) const
Definition Position.h:174