1390 {
1393 if (!vehicle || !passenger)
1394 return;
1395
1396
1398 if (!dst)
1399 return;
1400
1401 constexpr float SEARCH_RADIUS = 99.0f;
1402
1403 std::list<WorldObject*> targetList;
1407
1408 Unit* seatTarget =
nullptr;
1409 float minDist = SEARCH_RADIUS * SEARCH_RADIUS;
1410
1412 {
1415
1419
1421 if (dist < minDist)
1422 {
1423 minDist = dist;
1424 seatTarget = unit;
1425 }
1426 }
1427
1428
1429 float x, y, z;
1433
1436 }
@ EFFECT_0
Definition SharedDefines.h:31
@ SPELLVALUE_AURA_DURATION
Definition SpellDefines.h:119
@ TARGET_CHECK_DEFAULT
Definition SpellInfo.h:115
@ CURRENT_CHANNELED_SPELL
Definition Unit.h:558
@ SPELL_HOOKSHOT_AURA
Definition boss_flame_leviathan.cpp:90
@ SEAT_DEVICE
Definition boss_flame_leviathan.cpp:168
@ NPC_SEAT
Definition boss_flame_leviathan.cpp:97
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=0)
Definition MotionMaster.h:256
uint32 GetEntry() const
Definition Object.h:117
Unit * ToUnit()
Definition Object.h:210
WorldLocation const * GetExplTargetDest()
Definition SpellScript.cpp:416
SpellInfo const * GetSpellInfo()
Definition SpellScript.cpp:411
Spell * GetSpell()
Definition SpellScript.h:442
Unit * GetCaster()
Definition SpellScript.cpp:401
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
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:1418
Vehicle * GetVehicleKit() const
Definition Unit.h:1925
void ExitVehicle(Position const *exitPosition=nullptr)
Definition Unit.cpp:15705
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Definition Unit.h:1577
Unit * GetPassenger(int8 seatId) const
Definition Vehicle.cpp:239
bool IsWithinDist2d(float x, float y, float dist) const
Definition Object.cpp:1359
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