Jump to content

Problem with demon trainers.


Gibbss
 Share

Recommended Posts

Hello.

I got a little problem with demon trainer. There is a lot of books with spells dedicated for summons.

There is only one book which i can get [Grimoire of Firebolt (Rank 2)].

Others books are bugged. When i trying to get them i see " The item was not found".

By the GM command i can add this item...So i dont know where is problem :/ Items are defined in npc_vendor_template...

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

I ran into this problem myself and tried to fix it by modifying the vendors table. I noticed there weren't any entries for the demon trainers in the npc_vendors table, though they did have entries in the npc_vendors_template table. So I created entries in the npc_vendor table for the demon trainers and their grimoires using this query:

INSERT INTO `npc_vendor`
(`entry`, `item`, `maxcount`, `incrtime`, `ExtendedCost`)
SELECT C.`entry`, I.`entry`, 0, 0, 0
FROM `creature_template` C, `item_template` I
WHERE
   C.`subname`='Demon Trainer'
   AND I.`name` LIKE 'Grimoire%'
   -- exclude the grimoires that train player spells
   AND I.`name` NOT LIKE '%Doom%'
   AND I.`name` NOT LIKE '%Inferno%'
   AND I.`name` NOT LIKE '%Shadow Bolt%'
   AND I.`name` NOT LIKE '%Immolate%'
   AND I.`name` NOT LIKE '%Corruption%';

Unfortunately, now whenever anyone goes to buy from a demon trainer, when the store opens most visible NPCs immediately change appearance to wisps and when attempting to buy a book the "you are too far away" message appears. I reverted my changes, but I could use some guidance on how I can modify the database to fix these vendors. Or will it require a change in the server code to fix?

Link to comment
Share on other sites

Try this:

UPDATE `creature_template` SET `vendor_id` = '0' WHERE `vendor_id` = '1';

INSERT INTO `npc_vendor` (`entry`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES
(5815, 16302, 0, 0, 0),
(5815, 16316, 0, 0, 0),
(5815, 16317, 0, 0, 0),
(5815, 16318, 0, 0, 0),
(5815, 16319, 0, 0, 0),
(5815, 16320, 0, 0, 0),
(5815, 16321, 0, 0, 0),
(5815, 16322, 0, 0, 0),
(5815, 16323, 0, 0, 0),
(5815, 16324, 0, 0, 0),
(5815, 16325, 0, 0, 0),
(5815, 16326, 0, 0, 0),
(5815, 16327, 0, 0, 0),
(5815, 16328, 0, 0, 0),
(5815, 16329, 0, 0, 0),
(5815, 16330, 0, 0, 0),
(5815, 16331, 0, 0, 0),
(5815, 16346, 0, 0, 0),
(5815, 16347, 0, 0, 0),
(5815, 16348, 0, 0, 0),
(5815, 16349, 0, 0, 0),
(5815, 16350, 0, 0, 0),
(5815, 16351, 0, 0, 0),
(5815, 16352, 0, 0, 0),
(5815, 16353, 0, 0, 0),
(5815, 16354, 0, 0, 0),
(5815, 16355, 0, 0, 0),
(5815, 16356, 0, 0, 0),
(5815, 16357, 0, 0, 0),
(5815, 16358, 0, 0, 0),
(5815, 16359, 0, 0, 0),
(5815, 16360, 0, 0, 0),
(5815, 16361, 0, 0, 0),
(5815, 16362, 0, 0, 0),
(5815, 16363, 0, 0, 0),
(5815, 16364, 0, 0, 0),
(5815, 16365, 0, 0, 0),
(5815, 16366, 0, 0, 0),
(5815, 16368, 0, 0, 0),
(5815, 16371, 0, 0, 0),
(5815, 16372, 0, 0, 0),
(5815, 16373, 0, 0, 0),
(5815, 16374, 0, 0, 0),
(5815, 16375, 0, 0, 0),
(5815, 16376, 0, 0, 0),
(5815, 16377, 0, 0, 0),
(5815, 16378, 0, 0, 0),
(5815, 16379, 0, 0, 0),
(5815, 16380, 0, 0, 0),
(5815, 16381, 0, 0, 0),
(5815, 16382, 0, 0, 0),
(5815, 16383, 0, 0, 0),
(5815, 16384, 0, 0, 0),
(5815, 16385, 0, 0, 0),
(5815, 16386, 0, 0, 0),
(5815, 16387, 0, 0, 0),
(5815, 16388, 0, 0, 0),
(5815, 16389, 0, 0, 0),
(5815, 16390, 0, 0, 0),
(5815, 22179, 0, 0, 0),
(5815, 22180, 0, 0, 0),
(5815, 22181, 0, 0, 0),
(5815, 22182, 0, 0, 0),
(5815, 22184, 0, 0, 0),
(5815, 22185, 0, 0, 0),
(5815, 22186, 0, 0, 0),
(5815, 22187, 0, 0, 0),
(5815, 22188, 0, 0, 0),
(5815, 22189, 0, 0, 0),
(5815, 22190, 0, 0, 0),
(5815, 23711, 0, 0, 0),
(5815, 23730, 0, 0, 0),
(5815, 23731, 0, 0, 0),
(5815, 23734, 0, 0, 0),
(5815, 23745, 0, 0, 0),
(5815, 23755, 0, 0, 0),
(5815, 25469, 0, 0, 0),
(5815, 25900, 0, 0, 0),
(5815, 28068, 0, 0, 0),
(5815, 28071, 0, 0, 0),
(5815, 28072, 0, 0, 0),
(5815, 28073, 0, 0, 0);

Insert into npc_vendor with this entry: (All demon trainers)

5815 / 5520 / 5753 / 6382 / 12807 / 16267 / 16649 / 23535

Link to comment
Share on other sites

Thanks, that fixes it. I appears both of our queries to modify the npc_vendor table are doing the same thing, but I wasn't setting the vendor IDs in the creature_template table to zero. So out of curiosity, what exactly does the vendor ID control?

Link to comment
Share on other sites

  • 2 months later...
  • 5 weeks later...

I have posted about problem in TBC-DB Forums. It looks like Mangos One problem and I am urgently trying to get Mangos Dev's to review this issue.

From TBC-DB side everything looks perfect. Very Early on I converted all Grimoire Vendors from NPC_Vendor to NPC_Vendor_Template (As will happen with ALL vendors very soon...like weapons and armor and ect). NPC_Vendor_Template is the next generation Vendor Table system (for those who were unaware).

Anyways The items are properly listed in NPC_Vendor_Template and assigned to Vendors properly. But why only ONE Grimoire works to purchase is beyond me. ("Grimoire of Firebolt (Rank 2)") is the only item that works to purchase and all other items gets in-game error message: "The Item Was Not Found"... and this item HAPPENS to be first item listed (May have something to do with it).

Here is TBC-DB Forum Topic for this issue as well: http://udb.no-ip.org/index.php/topic,12801.0.html

Can Mangos Devs please Look at this as soon as possible as I am holding back TBC-DB 1.2.1 Release until this can be fixed.

Thank You!

Link to comment
Share on other sites

Schmoo has discovered problem (very simple typo) in Player.cpp causing problem.

hopefully should be committed soon.

(FYI: NPC_VENDOR fix is extreme hacky fix and I am disappointed no one bothered to try and look into cause of problem instead of covering it up).

Edit by Schmoo: We found a truely beautiful patch, but the margin is too small to copy it here

Link to comment
Share on other sites

  • 2 weeks later...
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use