mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Setup/Source
* generally flag items of quality artifact as unavailable
* 04f3aa7a82 caused some items transformed by spell to be 'available'
This commit is contained in:
1
setup/sql/updates/1763168697_01.sql
Normal file
1
setup/sql/updates/1763168697_01.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE `aowow_dbversion` SET `sql` = CONCAT(IFNULL(`sql`, ''), ' source');
|
||||
@@ -183,9 +183,15 @@ CLISetup::registerSetup("sql", new class extends SetupScript
|
||||
!empty($this->disables[Type::SPELL]) ? array_values($this->disables[Type::SPELL]) : DBSIMPLE_SKIP
|
||||
);
|
||||
|
||||
// flagging aowow_items for source (note: this is not exact! creatures dropping items may not be spawnd, quests granting items may be disabled)
|
||||
// flagging aowow_items for source (note: this is not exact! creatures dropping items may not be spawned, etc.)
|
||||
DB::Aowow()->query('UPDATE ?_items SET `cuFlags` = `cuFlags` & ?d', ~CUSTOM_UNAVAILABLE);
|
||||
DB::Aowow()->query('UPDATE ?_items i LEFT JOIN ?_source s ON s.`typeId` = i.`id` AND s.`type` = ?d SET i.`cuFlags` = i.`cuFlags` | ?d WHERE s.`typeId` IS NULL AND i.`id` NOT IN (?a)', Type::ITEM, CUSTOM_UNAVAILABLE, $itemSpellSource);
|
||||
DB::Aowow()->query(
|
||||
'UPDATE ?_items i
|
||||
LEFT JOIN ?_source s ON s.`typeId` = i.`id` AND s.`type` = ?d
|
||||
SET i.`cuFlags` = i.`cuFlags` | ?d
|
||||
WHERE (s.`typeId` IS NULL AND i.`id` NOT IN (?a)) OR i.`quality` = ?d',
|
||||
Type::ITEM, CUSTOM_UNAVAILABLE, $itemSpellSource, ITEM_QUALITY_ARTIFACT
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user