diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 0ac5916e92..0001b3306c 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1799,14 +1799,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u } case SMART_ACTION_GO_SET_LOOT_STATE: { - ObjectList targets = GetTargets(); + ObjectList* targets = GetTargets(e, unit); if (!targets) return; for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) if (IsGameObject(*itr)) - (*itr)->ToGameObject()->SetLootState(e.action.setGoLootState.state); + (*itr)->ToGameObject()->SetLootState((LootState)e.action.setGoLootState.state); delete targets; break;