Page 1 of 1

Current status of crafting

Posted: Thu Jan 19, 2017 10:27 am
by Gangrenous
I just want to get a verification if crafting is working, not working or partially working? I have tried summoning items and noticed things like the fuel were not showing.

Re: Current status of crafting

Posted: Thu Jan 19, 2017 3:54 pm
by Jabantiz
It works except for the skills displaying in the crafting window, could never reliably get them to display in the correct order. Components can be tricky as a lot of the crafting materials have dupes for whatever reason so if you summon the wrong one it will not show, best to look at the DB to see what item id it is expecting.

Re: Current status of crafting

Posted: Thu Jan 19, 2017 5:32 pm
by Gangrenous
What can I do to fix the display problem? Will it be within my skillset to fix? It is not problem either way, I may just need more knowledge to fix it.

Re: Current status of crafting

Posted: Thu Jan 19, 2017 8:55 pm
by Jabantiz
I think it comes down to it will need a new table to get it to be ordered correctly, it would mostly be static data and at the time I was trying to avoid another new table for that but I was never able to get it ordering right dynamically and hardcoding isn't an option because spell id's could change from server to server, so really I think a table is the only option.

Re: Current status of crafting

Posted: Fri Jan 20, 2017 6:24 am
by Gangrenous
Roger that.

Re: Current status of crafting

Posted: Tue Aug 15, 2017 12:24 pm
by Ememjr
i have been trying and cant get it to display in any order, but on live it lets you drag and drop to change the order, i was going to collect that process and see what it does, it may just be a UI think that determines the order but will def need a table with the default order maybe as an index.the area of the struct that it is stored in is just 6 int32 for a spell id, now that said i believe that would match up with the spell id used when we send to the knowledge book been investigating

Re: Current status of crafting

Posted: Tue Aug 15, 2017 4:40 pm
by Jabantiz
Yea it should just be the spell id, I had them displaying it was just the order I couldn't get right and at the time I was trying every thing I could with out hardcoding the spell ids or making a new table but it just wasn't possible.

Re: Current status of crafting

Posted: Thu Aug 17, 2017 8:02 am
by Ememjr
ok I finally go this to work in the live client the displaying i am working on the order now, i know we dont want an additional table for the order tracking, but was curious if you all think it would be to much over ahead to add a field to the spells table that what be an index of 1-6 for the order for those particular spells , then when we populate the array when crafting we us the index from db to determine which slot it goes in

Re: Current status of crafting

Posted: Thu Aug 17, 2017 8:29 am
by Ememjr
ok for the icons to show up on any client above 1193
please remove the last line below in the tradeskillpackets.cpp

Code: Select all

	packet->setDataByName("product_item_name", item->name.c_str());
	packet->setDataByName("product_item_icon", item->details.icon);

	if(client->GetVersion() < 860)
		packet->setItemByName("product_item", item, client->GetPlayer(), 0, -1);
	else if (client->GetVersion() < 1193)
		packet->setItemByName("product_item", item, client->GetPlayer());
	else
		packet->setItemByName("product_item", item, client->GetPlayer(), 0, 2);

	packet->setItemByName("product_item", item, client->GetPlayer()); <<< remove this line
as you can see it was going through the client version check and then setting the value again on that last line

Re: Current status of crafting

Posted: Thu Aug 17, 2017 3:38 pm
by Jabantiz
We will probably have to go with a table for the order, putting an index in spells means every spell will load that and with the thousands of spells it seems like a waste of memory when most won't need it.

Re: Current status of crafting

Posted: Thu Aug 17, 2017 4:20 pm
by Ememjr
hmm how about keep in spells table but on spell load if that field has a value >0 then we could have array in the world that just has the spell number and index and add to that instead of loading into the masterspell list

Re: Current status of crafting

Posted: Thu Aug 17, 2017 5:35 pm
by Ememjr
ok so for now i have the index in spell table, and added the field to the master spell list until we figure out a better or more effiecient way to do it

Re: Current status of crafting

Posted: Sun Dec 10, 2017 4:54 pm
by Gangrenous
How far did you get with this Ememjr?

Re: Current status of crafting

Posted: Sun Dec 10, 2017 6:05 pm
by Ememjr
i fixed it on mine

Re: Current status of crafting

Posted: Sun Dec 10, 2017 6:06 pm
by Ememjr
i will post the fix later this week