0 AND ( top.id IN (?a) OR top.id = mid.id OR top.id = low.id )'; $excludeQuery = ' UPDATE ?_factions x JOIN dbc_faction f ON f.id = x.id LEFT JOIN dbc_factiontemplate ft ON f.id = ft.factionId SET cuFlags = cuFlags | ?d WHERE f.repIdx < 0 OR ( f.repIdx > 0 AND (f.repFlags1 & 0x8 OR ft.id IS NULL) AND (f.repFlags1 & 0x80) = 0 )'; $pairs = array( [[980], ['expansion' => 1]], [[1097], ['expansion' => 2]], [[469, 891, 1037], ['side' => 1]], [[ 67, 892, 1052], ['side' => 2]], ); DB::Aowow()->query($factionQuery); DB::Aowow()->query($templateQuery); DB::Aowow()->query($excludeQuery, CUSTOM_EXCLUDE_FOR_LISTVIEW); foreach ($pairs as $p) DB::Aowow()->query($recursiveUpdateQuery, $p[0], $p[1], $p[0]); $this->reapplyCCFlags('factions', Type::FACTION); return true; } }); ?>