mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-15 12:42:43 -04:00
Core/AI: Fix crash in SmartScript
Closes 8340
This commit is contained in:
@@ -753,12 +753,16 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
case SMART_ACTION_CALL_GROUPEVENTHAPPENS:
|
||||
{
|
||||
if (!unit)
|
||||
break;
|
||||
|
||||
if (IsPlayer(unit) && GetBaseObject())
|
||||
{
|
||||
unit->ToPlayer()->GroupEventHappens(e.action.quest.quest, GetBaseObject());
|
||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_CALL_GROUPEVENTHAPPENS: Player %u, group credit for quest %u",
|
||||
unit->GetGUIDLow(), e.action.quest.quest);
|
||||
}
|
||||
|
||||
// Special handling for vehicles
|
||||
if (Vehicle* vehicle = unit->GetVehicleKit())
|
||||
for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it)
|
||||
|
||||
Reference in New Issue
Block a user