Page 1 of 1

collections

Posted: Mon Jun 05, 2017 1:39 pm
by Ememjr
having trouble track this problem down, any ideas

i read the following as the result will be 1 if needing the item and 0 if do not need the item, which is working ok when hovering over a collection item in inventory, and when hovering over a collection item in a completed collection but not when hovering over am imcomplete collection

Code: Select all

packet->setSubstructDataByName("footer", "collection_needed", player->GetCollectionList()->NeedsItem(this) ? 1 : 0);
i think this is the correct portion of code if not thats my issue , anywho, on hovering on both collection items in a completed and a not completed collection

Code: Select all

if (collection_item->found)
is evalutating ture and so returns false which would mean the collection item is not needed

Code: Select all

bool Collection::NeedsItem(Item *item) {
	vector<struct CollectionItem *>::iterator itr;
	struct CollectionItem *collection_item;
	
	assert(item);

	if (completed)
		return false;

	for (itr = collection_items.begin(); itr != collection_items.end(); itr++) {
		collection_item = *itr;
		if (collection_item->item->details.item_id == item->details.item_id) {
			if (collection_item->found)
				return false;
			else
				return true;
		}
	}

	/* item is not required by this collection at all */
	return false;
}
here is a picture of the correct result
correct.JPG
and here is the incorrect result, it should have the you have already collected this on it
incorrect.JPG

Re: collections

Posted: Mon Jun 05, 2017 3:35 pm
by Jabantiz
My best guess would be collection_item->found is not being set properly, but isn't there suppose to be green text when you need an item or am I thinking of something else?

Re: collections

Posted: Mon Jun 05, 2017 8:05 pm
by Zcoretri
I think you are talking about the green text for Lore & Legend items Jabantiz...though my recollection may be mistaken, been awhile since I have been logged in live :oops:

Re: collections

Posted: Mon Jun 05, 2017 8:51 pm
by Jabantiz
Zcoretri wrote: Mon Jun 05, 2017 8:05 pm I think you are talking about the green text for Lore & Legend items Jabantiz...though my recollection may be mistaken, been awhile since I have been logged in live :oops:
You might be right that the green text is on the lore & legend, it has also been a long time (years) since I actually played live...

As for this problem, did you right click and examine the item? It would seem that the client caches item info and when you mouse over you get the last cached info which if you got that info from before adding to the collection it would not have the red text, actually right clicking and examining the item forces a refresh. Closing the client and restarting will result in the correct info, however I believe the cache persists if you just go to char select and back in, client actually needs to shut down to clear it.

You could send the examine again but that might cause the window to pop back open, or another window to open, not sure exactly how live handle this.

Re: collections

Posted: Mon Jun 05, 2017 9:07 pm
by Ememjr
mousing over actually send the 691 opcode same as when you hover an item in inventroy

Re: collections

Posted: Mon Jun 05, 2017 9:10 pm
by Ememjr
my guess is that it may be looking at a wrong list possibly but i having trouble tracing that one

Re: collections

Posted: Mon Jun 05, 2017 9:14 pm
by Jabantiz
Again the info is cached for tooltip examines. Summon the item again and right click and examine it and you will see the info updates and all mouse overs after will work.