collections

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

collections

Post by Ememjr » Mon Jun 05, 2017 1:39 pm

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
You do not have the required permissions to view the files attached to this post.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: collections

Post by Jabantiz » Mon Jun 05, 2017 3:35 pm

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?

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: collections

Post by Zcoretri » 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:

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: collections

Post by Jabantiz » Mon Jun 05, 2017 8:51 pm

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.

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: collections

Post by Ememjr » Mon Jun 05, 2017 9:07 pm

mousing over actually send the 691 opcode same as when you hover an item in inventroy

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: collections

Post by Ememjr » Mon Jun 05, 2017 9:10 pm

my guess is that it may be looking at a wrong list possibly but i having trouble tracing that one

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: collections

Post by Jabantiz » Mon Jun 05, 2017 9:14 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests