mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Fix Crash in Unit::GetVehicleCreatureBase. Thanks proof1337.
Fixes issue #821. --HG-- branch : trunk
This commit is contained in:
@@ -15213,8 +15213,8 @@ Unit *Unit::GetVehicleBase() const
|
||||
Creature *Unit::GetVehicleCreatureBase() const
|
||||
{
|
||||
Unit *veh = GetVehicleBase();
|
||||
if (veh->GetTypeId() == TYPEID_UNIT)
|
||||
return (Creature*)veh;
|
||||
if (veh && veh->GetTypeId() == TYPEID_UNIT)
|
||||
return dynamic_cast<Creature*>(veh);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user