Trinitycore: some c++ gossips needs to be moved into database

Created on 20 Oct 2018  路  9Comments  路  Source: TrinityCore/TrinityCore

rgrep "PH" ../src/server/scripts/* | grep define
../src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp:#define GOSSIP_ITEM_TEACH_3 "[PH] Continue..."
../src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp:#define GOSSIP_SELECT_DOOMREL "[PH] Continue..."
../src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp:#define GOSSIP_HELLO_EROZION2 "[PH] Teleport please, i'm tired."
../src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp:#define GOSSIP_ITEM_WALKING "[PH] Start walking."
../src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp:#define GOSSIP_BLY "[PH] In that case, I will take my reward!"
../src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp:#define GOSSIP_WEEGLI "[PH] Please blow up the door."
../src/server/scripts/World/npc_professions.cpp:#define GOSSIP_ITEM_KABLAM "[PH] Unknown"

5df06a6892b8

samples: https://github.com/TrinityCore/TrinityCore/pull/24075/files

Branch-3.3.5a

Most helpful comment

oh the template has been skipped, burn him! 馃槃

All 9 comments

oh the template has been skipped, burn him! 馃槃

shame !

ahem
ignore template is evil

not a bug / "feature request" per se.

SELECT * FROM `broadcast_text` WHERE `ID` BETWEEN 4873 AND 4901;
  ID  Language  MaleText                                                                                                                        FemaleText                                                                  EmoteID0  EmoteID1  EmoteID2  EmoteDelay0  EmoteDelay1  EmoteDelay2  SoundId    Unk1    Unk2  VerifiedBuild
----  --------  ------------------------------------------------------------------------------------------------------------------------------  --------------------------------------------------------------------------  --------  --------  --------  -----------  -----------  -----------  -------  ------  ------  -------------
4873         0                                                                                                                                  The death of our flesh marked the birth of our spirit and our sacred task.         0         0         0            0            0            0        0       0       1          18019
4874         0  I am one of the Seven, and it is our doom to stand sentry.  Forever.                                                                                                                                               0         0         0            0            0            0        0       0       1          18019
4875         0  Our leader, Doom'rel, has ears for the challenge.                                                                                                                                                                  0         0         0            0            0            0        0       0       1          18019
4876         0  I am forever denied the touch of stone.  I will never again know the glory of shaped iron...                                                                                                                       0         0         0            0            0            0        0       0       1          18019
4877         0                                                                                                                                  You may not pass.  You are not our kin, nor have you issued the challenge.         0         0         0            0            0            0        0       0       1          18019
4878         1  Which trainer do you seek?                                                                                                      Which trainer do you seek?                                                         0         0         0            0            0            0        0       0       1          18019
4879         0  Our fate is the doom of all who face the Great Fire.                                                                                                                                                               0         0         0            0            0            0        0       0       1          18019
4880         0  Hunter                                                                                                                          Hunter                                                                             0         0         0            0            0            0        0       0       1          18019
4881         0  Our punishment is also our blessing.                                                                                                                                                                               0         0         0            0            0            0        0       0       1          18019
4882         0  Mage                                                                                                                            Mage                                                                               0         0         0            0            0            0        0       0       1          18019
4883         0  Priest                                                                                                                          Priest                                                                             0         0         0            0            0            0        0       0       1          18019
4884         0  Shaman                                                                                                                          Shaman                                                                             0         0         0            0            0            0        0       0       1          18019
4885         0  Rogue                                                                                                                           Rogue                                                                              0         0         0            0            0            0        0       0       1          18019
4886         0  Warlock                                                                                                                         Warlock                                                                            0         0         0            0            0            0        0       0       1          18019
4887         0  Warrior                                                                                                                         Warrior                                                                            0         0         0            0            0            0        0       0       1          18019
4888         0  The bank                                                                                                                        The bank                                                                           0         0         0            0            0            0        0       0       1          18019
4889         0  Flight Master                                                                                                                   Flight Master                                                                      0         0         0            0            0            0        0       0       1          18019
4890         0  Guild Master & Vendor                                                                                                           Guild Master & Vendor                                                              0         0         0            0            0            0        0       0       1          18019
4891         0  Class Trainer                                                                                                                   Class Trainer                                                                      0         0         0            0            0            0        0       0       1          18019
4892         0  Your bondage is at an end, Doom'rel.  I challenge you!                                                                          Your bondage is at an end, Doom'rel.  I challenge you!                             0         0         0            0            0            0        0       0       1          18019
4893         0  The inn                                                                                                                         The inn                                                                            0         0         0            0            0            0        0       0       1          18019
4894         0  You have challenged the Seven, and now you will die!                                                                                                                                                               0         0         0            0            0            0        0       0       1          18019
4895         0  Mailbox                                                                                                                         Mailbox                                                                            0         0         0            0            0            0        0       0       1          18019
4896         0  Profession Trainer                                                                                                              Profession Trainer                                                                 0         0         0            0            0            0        0       0       1          18019
4897         0  Gloom'rel, tell me your secrets!                                                                                                Gloom'rel, tell me your secrets!                                                   0         0         0            0            0            0        0       0       1          18019
4898         0  You wish to learn the old craft?  You wish to smelt dark iron?$B$BAppease me, $r.  Show me a sacrifice and I will consider it!                                                                                     0         0         0            0            0            0        0       0       1          18019
4899         0  Your will is strong, and your intent is clear.$B$BPerhaps you are worthy...                                                                                                                                        0         0         0            0            0            0        0       0       1          18019
4900         0  I have paid your price, Gloom'rel.  Now, teach me your secrets!                                                                 I have paid your price, Gloom'rel.  Now, teach me your secrets!                    0         0         0            0            0            0        0       0       1          18019
4901         0  You have shown me your desire, and have paid with precious stone.  I will teach you...                                                                                                                             0         0         0            0            0            0        0       0       1          18019

See also https://github.com/velinath/TrinityCore/issues/2, https://github.com/velinath/TrinityCore/issues/3, https://github.com/velinath/TrinityCore/issues/7

SELECT * FROM `broadcast_text` WHERE `ID` BETWEEN 3800 AND 3811;
  ID  Language  MaleText                                                                                                                                                            FemaleText                                              EmoteID0  EmoteID1  EmoteID2  EmoteDelay0  EmoteDelay1  EmoteDelay2  SoundId    Unk1    Unk2  VerifiedBuild
----  --------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------  ------------------------------------------------------  --------  --------  --------  -----------  -----------  -----------  -------  ------  ------  -------------
3801         0  Help!$B$BIf you get me out of here, I can blow up the door that leads to the chief of Zul'Farrak!                                                                                                                                  0         0         0            0            0            0        0       0       1          18019
3802         0  Zul'Farrak - Weegli Blastfuse - Greeting default.                                                                                                                                                                                  0         0         0            0            0            0        0       0       1          18019
3803         0  We have to kill more trolls!  Kill enough and I'll blow the door to the troll chief!                                                                                                                                               0         0         0            0            0            0        0       0       1          18019
3804         0  Thanks, $n.  If you hadn't shown up I'm sure we would have been dead meat!  Now the only thing between us and the chief troll is that door yonder...                                                                               0         0         0            0            0            0        0       0       1          18019
3805         0  Will you blow up that door now?                                                                                                                                     Will you blow up that door now?                                0         0         0            0            0            0        0       0       1          18019
3806         0  Help!  My band and I have been captured by trolls, and they're going to sacrifice us!$B$BGet us out of here and I'll give you anything you want.                                                                                   0         0         0            0            0            0        0       0       1          18019
3807         0  We don't have time to talk!  We have to think about those trolls!                                                                                                                                                                  0         0         0            0            0            0        0       0       1          18019
3808         0  Thanks a lot, $n.  We couldn't have made it without you.  Oh, and if I had mentioned before something about repaying you for saving us, well... you can forget it!                                                                 0         0         0            0            0            0        0       0       1          18019
3809         0  Hey Bly!  Bilgewizzle wants his divino-matic rod back!                                                                                                              Hey Bly!  Bilgewizzle wants his divino-matic rod back!         0         0         0            0            0            0        0       0       1          18019
3810         0  Zul'Farrak - Sergeant Bly - Greeting default.                                                                                                                                                                                      0         0         0            0            0            0        0       0       1          18019
3811         0  I'm out of here!                                                                                                                                                                                                                   0         0         0            0            0            0        0       0       1          18019
SELECT * FROM `broadcast_text` WHERE `ID` BETWEEN 14461 AND 14471;
   ID  Language  MaleText                                                                      FemaleText                                              EmoteID0  EmoteID1  EmoteID2  EmoteDelay0  EmoteDelay1  EmoteDelay2  SoundId    Unk1    Unk2  VerifiedBuild
-----  --------  ----------------------------------------------------------------------------  ------------------------------------------------------  --------  --------  --------  -----------  -----------  -----------  -------  ------  ------  -------------
14461         0  Thrall has escaped!  Don't let him get away!                                  Thrall has escaped!  Don't let him get away!                   0         0         0            0            0            0        0       0       1          18019
14462         0  Show this upstart how a real Blood Knight fights, Swiftblade!                                                                                0         0         0            0            0            0        0       0       1          18019
14463         0  Show $n the meaning of pain, Sunstriker!                                                                                                     0         0         0            0            0            0        0       0       1          18019
14464         0  Well done, $n! You have passed the second trial!                                                                                             0         0         0            0            0            0        0       0       1          18019
14465         0  There he is, stop him!                                                        There he is, stop him!                                         0         0         0            0            0            0        0       0       1          18019
14466         0  Don't let him get away!                                                       Don't let him get away!                                        0         0         0            0            0            0        0       0       1          18019
14467         0  Who are you?  Just leave me be.                                                                                                              0         0         0            0            0            0        0       0       1          18019
14468         0  We are ready to get you out of here, Thrall. Let's go!                        We are ready to get you out of here, Thrall. Let's go!         0         0         0            0            0            0        0       0       1          18019
14470         0  Your beloved leader has failed you! Let your blood be on his hands! Attack!                                                                  0         0         0            0            0            0        0       0       1          18019
14471         0  Victory is a stone's throw away!  Lok-Tar Ogar!                                                                                              0         0         0            0            0            0        0       0       1          18019

One of the main challenges (at least to me) is to verify gossip_menu IDs to be able to move those menus and options into DB.


BTW, https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/scripts/World/npc_professions.cpp is full of hardcoded #define text which could be replaced by DB gossip.

SELECT * FROM `broadcast_text` WHERE `ID` BETWEEN 9983 AND 10000;
   ID  Language  MaleText                                                                                                                                                                                                                                                                                                                                                                                          FemaleText                                                                                           EmoteID0  EmoteID1  EmoteID2  EmoteDelay0  EmoteDelay1  EmoteDelay2  SoundId    Unk1    Unk2  VerifiedBuild
-----  --------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  ---------------------------------------------------------------------------------------------------  --------  --------  --------  -----------  -----------  -----------  -------  ------  ------  -------------
 9983         0  I am Kilram, master of the axe.                                                                                                                                                                                                                                                                                                                                                                                                                                                                               1         0         0            0            0            0        0       0       1          18019
 9984         0  Ah, a seasoned veteran you once were. Kilram can make you this again. I know you are capable, you merely need to ask and I shall teach you the way of the axesmith.                                                                                                                                                                                                                                                                                                                                           1         0         0            0            0            0        0       0       1          18019
 9985         0  Please teach me how to become an axesmith, Kilram.                                                                                                                                                                                                                                                                                                                                                Please teach me how to become an axesmith, Kilram.                                                          0         0         0            0            0            0        0       0       1          18019
 9986         0                                                                                                                                                                                                                                                                                                                                                                                                    Don't get too close, $n. I'm liable to fumble and bash your brains open with the face of my hammer.         1         0         0            0            0            0        0       0       1          18019
 9987         0                                                                                                                                                                                                                                                                                                                                                                                                    I will teach you the way of the hammersmith. Just ask nicely.                                               1         0         0            0            0            0        0       0       1          18019
 9988         0  Please teach me how to become a hammersmith, Lilith.                                                                                                                                                                                                                                                                                                                                              Please teach me how to become a hammersmith, Lilith.                                                        0         0         0            0            0            0        0       0       1          18019
 9989         0  Back off or I'll cut you in half.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            25         0         0            0            0            0        0       0       1          18019
 9990         0  If you wish to become a swordsmith, just ask.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 1         0         0            0            0            0        0       0       1          18019
 9991         0  Please teach me how to become a swordsmith, Seril.                                                                                                                                                                                                                                                                                                                                                Please teach me how to become a swordsmith, Seril.                                                          0         0         0            0            0            0        0       0       1          18019
 9992         0  I would like to buy from you.                                                                                                                                                                                                                                                                                                                                                                     I would like to buy from you.                                                                               0         0         0            0            0            0        0       0       1          18019
 9993         0  I have just completed a new dimensional imploder that will make me rich beyond my wildest goblin dreams!   All I need to do is get a skilled Goblin Engineer to build a dimensional ripper that connects to it and try it!                                                                                                                                                                                                                                                                                    0         0         0            0            0            0        0       0       1          18019
 9994         0  This Dimensional Imploder sounds dangerous!  How can I make one?                                                                                                                                                                                                                                                                                                                                  This Dimensional Imploder sounds dangerous!  How can I make one?                                            0         0         0            0            0            0        0       0       1          18019
 9995         0  The theory behind it is that we completely destroy you with a massive explosion wherever you are and send those particles through a dimensional rip and then re-implode you at the machine here.   Instant Transport!    It might not work ALL the time, but what kind of goblin engineer are you!   If survival was your first priority you could never be a real Goblin Engineer!                                                                                                                           0         0         0            0            0            0        0       0       1          18019
                 Here is the recipe you will need                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
 9996         0  With some of the technology that was recovered by bold gnomes venturing into Gnomeregan, I have managed to construct my greatest invention:  The Matter Transporter!    All I need now is a skilled Gnomish Engineer to build a powerful beacon attuned to the transporter.                                                                                                                                                                                                                                   0         0         0            0            0            0        0       0       1          18019
 9997         0  I must build a beacon for this marvelous device!                                                                                                                                                                                                                                                                                                                                                  I must build a beacon for this marvelous device!                                                            0         0         0            0            0            0        0       0       1          18019
 9998         0  Once you have built the device, you simply activate the device to be whisked away to lovely Gadgetzan!    Nearly everyone who has used the device has arrived on the pad here looking just the way they did when they began!                                                                                                                                                                                                                                                                                  0         0         0            0            0            0        0       0       1          18019
                 There have been some reported problems with transportees being replaced by their evil selves from an alternate universe, but I'm sure we will have that worked out soon...                                                                                                                                                                                                                                                                                                                                                                                                                                        
 9999         0  If you figure out any way to improve the device let me know!                                                                                                                                                                                                                                                                                                                                                                                                                                                  0         0         0            0            0            0        0       0       1          18019
10000         0  It's good to see an engineer brave enough to make the device.   We goblin engineers laugh at danger!                                                                                                                                                                                                                                                                                                                                                                                                         11         0         0            0            0            0        0       0       1          18019

i don;'t know if aletson/TrinityCore#7 is helpful here (as @illfated noted above) but I did compile a big list of hardcoded gossips and proper broadcast_text ids a couple years back

may be a little out of date

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jonne733 picture Jonne733  路  3Comments

Blasphemous picture Blasphemous  路  3Comments

cbcs picture cbcs  路  3Comments

DDuarte picture DDuarte  路  3Comments

ZenoX92 picture ZenoX92  路  3Comments