To throw in an alternative:
For checks like the ones above we can use _only_ a sql-script with some SELECT output.
Then there would no fancy output (that flag 2 == NPC_FLAG_QUESTGIVER), but the integrity check could be done as well.
And it should be enough, as this is only really required to be used by DB-developers, not normal routine
As example for this case here:
Код:
diff --git a/contrib/dbIntegrityChecks/001_checkGossipOptionFlags.sql b/contrib/dbIntegrityChecks/001_checkGossipOptionFlags.sql
new file mode 100644
index 0000000..031281d
--- /dev/null
+++ b/contrib/dbIntegrityChecks/001_checkGossipOptionFlags.sql
@@ -0,0 +1,16 @@
+-- This is a helper script to select gossip menu's that don't provide all gossip-options that might be required by npc-flags.
+
+SET @GOSSIP_SELECT_FLAGS=0x00000010/*TRAINER*/ | 0x00000080/*VENDOR*/ | 0x00002000/*FLIGHTMASTER*/ | 0x00010000/*INNKEEPER*/ | 0x00020000/*BANKER*/ | 0x00040000/*PETITIONER*/ | 0x00080000/*TABARDDESIGNER*/ | 0x00100000/*BATTLEMASTER*/ | 0x00200000/*AUCTIONEER*/ | 0x00400000/*STABLEMASTER*/ | 0x00800000/*GUILD_BANKER*/;
+
+SELECT ct.entry, ct.gossip_menu_id,
+ (ct.npcflag & @GOSSIP_SELECT_FLAGS) &~ BIT_OR(gmo.npc_option_npcflag) AS `flags`
+FROM creature_template AS ct, gossip_menu_option AS gmo
+WHERE
+ ct.gossip_menu_id > 0
+ AND ct.ScriptName=''
+ AND gmo.menu_id=ct.gossip_menu_id
+GROUP BY
+ ct.entry, ct.gossip_menu_id
+HAVING
+ `flags`>0;
+