mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(DB/Misc): Bad delete in update file (#21307)
Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
@@ -102,10 +102,16 @@ def trailing_whitespace_check(file: io, file_path: str) -> None:
|
|||||||
def sql_check(file: io, file_path: str) -> None:
|
def sql_check(file: io, file_path: str) -> None:
|
||||||
global error_handler, results
|
global error_handler, results
|
||||||
file.seek(0) # Reset file pointer to the beginning
|
file.seek(0) # Reset file pointer to the beginning
|
||||||
|
not_delete = ["creature_template", "gameobject_template", "item_template", "quest_template"]
|
||||||
check_failed = False
|
check_failed = False
|
||||||
|
|
||||||
# Parse all the file
|
# Parse all the file
|
||||||
for line_number, line in enumerate(file, start = 1):
|
for line_number, line in enumerate(file, start = 1):
|
||||||
|
for table in not_delete:
|
||||||
|
if f"DELETE FROM `{table}`" in line:
|
||||||
|
print(
|
||||||
|
f"Entries from this {table} should not be deleted! {file_path} at line {line_number}")
|
||||||
|
check_failed = True
|
||||||
if [match for match in ['broadcast_text'] if match in line]:
|
if [match for match in ['broadcast_text'] if match in line]:
|
||||||
print(
|
print(
|
||||||
f"DON'T EDIT broadcast_text TABLE UNLESS YOU KNOW WHAT YOU ARE DOING!\nThis error can safely be ignored if the changes are approved to be sniffed: {file_path} at line {line_number}")
|
f"DON'T EDIT broadcast_text TABLE UNLESS YOU KNOW WHAT YOU ARE DOING!\nThis error can safely be ignored if the changes are approved to be sniffed: {file_path} at line {line_number}")
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
-- DB update 2025_01_31_00 -> 2025_01_31_01
|
-- DB update 2025_01_31_00 -> 2025_01_31_01
|
||||||
-- Add pure energy immune script for Vex
|
-- Add pure energy immune script for Vex
|
||||||
DELETE FROM `creature_template` WHERE `ScriptName` = 'npc_pure_energy' AND entry = 24745;
|
|
||||||
UPDATE `creature_template` SET `ScriptName` = 'npc_pure_energy' WHERE (`entry` = 24745);
|
UPDATE `creature_template` SET `ScriptName` = 'npc_pure_energy' WHERE (`entry` = 24745);
|
||||||
|
|
||||||
-- AOE_IMMUNE Flag for pure energy
|
-- AOE_IMMUNE Flag for pure energy
|
||||||
|
|||||||
Reference in New Issue
Block a user