Page 1 of 1
What's the fastest way to clean this up?
PostPosted: Fri Jun 30, 2017 4:42 pm
by psychoninja911
I think I know what this is... Basically the Template is missing items?
Is there a quick way to clean this up? I'm not too worried about NPC's missing armor. Can I go through and just delete the templates? Or is that a bad idea?
Or should I just ignore this?
I figured if I fix it, the server would take less resources? Maybe even start up quicker?
Let me know whatcha think.

Re: What's the fastest way to clean this up?
PostPosted: Fri Jun 30, 2017 8:45 pm
by ontheDOL
without seeming the rest of the error, id guess its a missmatch between model number and the itemSlot number
I dont think its gonna affect performance or speed of boot up, but personally i like to have no errors/warnings when i boot up server.
Re: What's the fastest way to clean this up?
PostPosted: Fri Jun 30, 2017 10:54 pm
by Loki
Post your Error.log
Re: What's the fastest way to clean this up?
PostPosted: Fri Jun 30, 2017 11:18 pm
by PlanarChaosRvrtwo
The error is simple jaystar:
Some mob equiptemplates exist twice for same slot so it cant add an item couse slot is allready filled.
Re: What's the fastest way to clean this up?
PostPosted: Fri Jun 30, 2017 11:22 pm
by PlanarChaosRvrtwo
Best way would be to solve:
Sql command to find duplicates (not that easy couse diffrent ids but same slot in same template)
So find same template with same slot should solve it.
Re: What's the fastest way to clean this up?
PostPosted: Sat Jul 01, 2017 6:48 am
by Leodagan
This would probably need a "GROUP BY" query using every fields that represent the "Unique constraint"
Then "JOIN" the result back to the original table to list correctly all the records in each "group match"
Edit :
- Code: Select all
SELECT * FROM
(SELECT `TemplateID`, `Slot` FROM `npcequipment`
GROUP BY `TemplateID`, `Slot` HAVING count(slot) > 1)
as `duplicates`
JOIN `npcequipment` ON
(`duplicates`.`TemplateID` = `npcequipment`.`TemplateID` AND `duplicates`.`Slot` = `npcequipment`.`Slot`)
ORDER BY `duplicates`.`TemplateID`, `duplicates`.`Slot`, `npcequipment`.`NPCEquipment_ID`
Here, It was a nice exercise before my morning coffee
