?d { AND ct.entry IN (?a) } ORDER BY ct.entry ASC LIMIT ?d'; $dummyQuery = ' UPDATE ?_creature a JOIN ( SELECT b.difficultyEntry1 AS dummy FROM ?_creature b UNION SELECT c.difficultyEntry2 AS dummy FROM ?_creature c UNION SELECT d.difficultyEntry3 AS dummy FROM ?_creature d ) j SET a.cuFlags = a.cuFlags | ?d WHERE a.id = j.dummy'; $displayInfoQuery = ' UPDATE ?_creature c JOIN dbc_creaturedisplayinfo cdi ON c.displayId1 = cdi.id LEFT JOIN dbc_creaturedisplayinfoextra cdie ON cdi.extraInfoId = cdie.id SET c.textureString = IFNULL(cdie.textureString, cdi.skin1), c.modelId = cdi.modelId, c.iconString = cdi.iconString'; $lastMax = 0; while ($npcs = DB::World()->select($baseQuery, NPC_CU_INSTANCE_BOSS, $lastMax, $ids ?: DBSIMPLE_SKIP, SqlGen::$stepSize)) { $newMax = max(array_column($npcs, 'entry')); CLISetup::log(' * sets '.($lastMax + 1).' - '.$newMax); $lastMax = $newMax; foreach ($npcs as $npc) DB::Aowow()->query('REPLACE INTO ?_creature VALUES (?a)', array_values($npc)); } // apply "textureString", "modelId" and "iconSring" DB::Aowow()->query($displayInfoQuery); // apply cuFlag: difficultyDummy DB::Aowow()->query($dummyQuery, NPC_CU_DIFFICULTY_DUMMY | CUSTOM_EXCLUDE_FOR_LISTVIEW); // apply cuFlag: excludeFromListview [for trigger-creatures] DB::Aowow()->query('UPDATE ?_creature SET cuFlags = cuFlags | ?d WHERE flagsExtra & ?d', CUSTOM_EXCLUDE_FOR_LISTVIEW, 0x80); return true; } ?>