fix(DB/Gossip): convert npc_slim gossip to database conditions (#25191)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Andrew 2026-03-23 16:10:38 -03:00 committed by GitHub
parent 03ad0e2a93
commit c682c1d29a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 38 deletions

View file

@ -0,0 +1,22 @@
-- Convert npc_slim (entry 19679) from C++ script to database gossip + conditions
-- Remove ScriptName from creature_template
UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` = 19679;
-- Add gossip_menu entry for non-friendly text (9895)
DELETE FROM `gossip_menu` WHERE `MenuID` = 8021 AND `TextID` = 9895;
INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES (8021, 9895);
-- Add conditions for gossip_menu text display
-- Show text 9896 (vendor greeting) only if player is Friendly+ with Consortium (faction 933)
-- Friendly(16) + Honored(32) + Revered(64) + Exalted(128) = 240
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 14 AND `SourceGroup` = 8021 AND `SourceEntry` IN (9895, 9896);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(14, 8021, 9896, 0, 0, 5, 0, 933, 240, 0, 0, 0, 0, '', 'Gossip Menu 8021 - Show text 9896 if player is Friendly+ with Consortium'),
(14, 8021, 9895, 0, 0, 5, 0, 933, 240, 0, 1, 0, 0, '', 'Gossip Menu 8021 - Show text 9895 if player is not Friendly+ with Consortium');
-- Add condition for gossip_menu_option vendor option
-- Show vendor option only if player is Friendly+ with Consortium
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 8021 AND `SourceEntry` = 0;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, 8021, 0, 0, 0, 5, 0, 933, 240, 0, 0, 0, 0, '', 'Gossip Option 8021/0 - Show vendor option if player is Friendly+ with Consortium');