From 939e00e1119f5d6262d5a7f6e35b71964f9fda8a Mon Sep 17 00:00:00 2001 From: AnchyDev <35346484+AnchyDev@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:51:15 +1100 Subject: [PATCH] Update README.md Use proper bitwise operations. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 32aa948..3ca5539 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,16 @@ This module broadcasts items you receive to the guild chat if it has the flag `I #### Add Flags ```sql SET @ITEM_FLAG_REPORT_TO_GUILD_CHAT := 1073741824; -UPDATE item_template SET item_template.Flags = (item_template.Flags + @ITEM_FLAG_REPORT_TO_GUILD_CHAT) WHERE item_template.class = 15 AND item_template.subclass = 5 AND (item_template.Flags & @ITEM_FLAG_REPORT_TO_GUILD_CHAT) = 0; +UPDATE item_template +SET item_template.Flags = (item_template.Flags | @ITEM_FLAG_REPORT_TO_GUILD_CHAT) +WHERE item_template.class = 15 AND item_template.subclass = 5; ``` #### Remove Flags ```sql SET @ITEM_FLAG_REPORT_TO_GUILD_CHAT := 1073741824; -UPDATE item_template SET item_template.Flags = (item_template.Flags - @ITEM_FLAG_REPORT_TO_GUILD_CHAT) WHERE item_template.class = 15 AND item_template.subclass = 5 AND (item_template.Flags & @ITEM_FLAG_REPORT_TO_GUILD_CHAT) = @ITEM_FLAG_REPORT_TO_GUILD_CHAT; +UPDATE item_template +SET item_template.Flags = (item_template.Flags &~ @ITEM_FLAG_REPORT_TO_GUILD_CHAT) +WHERE item_template.class = 15 AND item_template.subclass = 5; ``` ## Contact