Problem with material ID of custom item

Hello everyone,

I got a weird problem with my custom weapons, every time I run the worldserver, red texts will pop up, says:

item <entry: 70001> does not have a correct material <1>, must be <4>.

item <entry: 70002> does not have a correct material <1>, must be <4>.

I thought material <1> = metal and other “official” weapons in the template are like this, googled this but got no ideas.

In spite of the problem, my items seem to work properly in game, I’m quite confused.

Anyone could help?

Thanks =)

Paste my codes below:

INSERT INTO item_template VALUES (70001, 2, 8, -1, ‘Nathrezim Reaper’, 24049, 4, 0, 0, 1, 924630, 184920, 17, -1, -1, 89, 50, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 4, 30, 5, 30, 7, 50, 31, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 265, 413, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4000, 0, 0, 34929, 2, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 1, ‘Bloodthirsty.’, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, 0, 0, 0, 0, ‘’, 65, 0, 0, 0, 0, 0);
INSERT INTO item_template VALUES (70002, 2, 8, -1, ‘Dreadfury’, 52261, 4, 0, 0, 1, 1365799, 478633, 17, -1, -1, 170, 65, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 4, 75, 5, 75, 7, 120, 31, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 476, 728, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4000, 0, 0, 34929, 2, 0, 0, -1, 0, -1, 38308, 2, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 1, ‘The blade struggles to defy your control.’, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 150, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 1075, 0, 300, 0, 0, 0, 0, ‘’, 67, 0, 0, 0, 0, 0);

You also have to update your DBC files for custom items and may have to make client mod.

(TC doesn’t support client mods, btw.)

Changing the DBC is not required, that error you get is more like a warning and it can be ignored (since the changes you did are intended.)

https://github.com/TrinityCore/TrinityCore/blob/5ca5a75d21ba6f79c9c83d1e1b6a84da88f65dc0/src/server/game/Globals/ObjectMgr.cpp#L2392-L2396

I updated my DBC files and also a MPQ patch, so my items work properly as described in the post.

That’s why I am confused, I observed many weapons in item_template with their material ID being <1>, while only my custom items encounter the error. Maybe this is just an annoying glitch as you said, since the problem does not effect my playing by far.

Thanks for your replies. /emoticons/default_biggrin.png

It’s not a glitch. The core will print that error if the DBC and the table item_template has different data.

It will also correct the item_template data if “Enforce DBC attributes” in worldserver.conf is set to true (default behaviour).

The error message says in your DB you have ‘1’ and in your DBC you have ‘4’. Make in both tables the same value and the error will disappear.

You are right, I reedited my DBC and the error disappeared. And I found the problem is in the script I use to make DBC&MPQ patches:

SELECT entry, class, subclass, soundoverridesubclass, quality, displayid, inventorytype, sheath FROM item_template WHERE entry > 70000
where the ‘quality’ should be ‘material’.

Thanks for your help and I solved the problem. /emoticons/default_laugh.png