BUG:FIXED hovering over spells not displaying popup

Old bugs stored here for reference.
Locked
User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

BUG:FIXED hovering over spells not displaying popup

Post by Ememjr » Tue Mar 05, 2019 8:49 am

when hovering over a spell in the Knowledge book or on hot bar the popup of screen info is not appearing

this is handled by void Client::HandleExamineInfoRequest in client.cpp

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

Re: BUG: hovering over spells not displaying popup

Post by Ememjr » Tue Mar 05, 2019 9:16 am

more info these are type 3 requests

Code: Select all

if(type == 3){
		Spell* spell = 0;
		bool trait_display;
		request = configReader.getStruct("WS_ExamineInfoRequest", GetVersion());
		if(!request) {
					return;
		}
		request->LoadPacketData(app->pBuffer, app->size);
		int32 id = request->getType_int32_ByName("id");
		int32 tier = request->getType_int32_ByName("tier");
		int32 trait_tier = request->getType_int32_ByName("trait_tier");
		printf("Type: (%i) Tier: (%u) Unknown ID: (%u) Item ID: (%u)\n",type,tier,trait_tier,id);
		if (trait_tier != 0xFFFFFFFF){
			spell = master_spell_list.GetSpell(id, trait_tier);
			trait_display = true;
		}
		else{
			spell = master_spell_list.GetSpell(id, tier +1);
			trait_display = false;
		}

		if(spell && sent_spell_details.count(id) == 0){
			sent_spell_details[id] = true;
			EQ2Packet* app = spell->SerializeSpell(this, false, trait_display);
			//DumpPacket(app);
			QueuePacket(app);
		}
	}
tier and trait_tier are both returning 0 for everything, but our spells dont have a tier 0 that i know of
so
if (trait_tier != 0xFFFFFFFF){ always is true and the else never gets executed
now as far as i know triats are not even impletmented yet
by changing if (trait_tier != 0xFFFFFFFF){ to if (trait_tier != 0) {
and spell = master_spell_list.GetSpell(id, tier ); to spell = master_spell_list.GetSpell(id, tier +1);

i can get all spells i hover over to display correctly

any objections to comit, we can fix triats when the time comes

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

Re: BUG: hovering over spells not displaying popup

Post by Jabantiz » Tue Mar 05, 2019 4:35 pm

That is happening because the struct for the client you are using is wrong. So I would first look at the struct and try to figure it out before changing the code.

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

Re: BUG: hovering over spells not displaying popup

Post by Ememjr » Tue Mar 05, 2019 6:21 pm

Jabantiz wrote: Tue Mar 05, 2019 4:35 pm That is happening because the struct for the client you are using is wrong. So I would first look at the struct and try to figure it out before changing the code.
you are absuolutely correct, i didnt see those in ANAL and didnt think about the request packet being wrong
added the following struct and so far it is working

Code: Select all

<Struct Name="WS_ExamineInfoRequest" ClientVersion="60114" >
<Data ElementName="type" Type="int8" Size="1" />
<Data ElementName="trait_tier" Type="int32" />
<Data ElementName="unknown2" Type="int32" />
<Data ElementName="tier" Type="int32" />
<Data ElementName="unknown1" Type="int32" />
<Data ElementName="id" Type="int32" />
<Data ElementName="unknown6" Type="int16" />
</Struct>

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

Re: BUG: hovering over spells not displaying popup

Post by Ememjr » Fri Mar 08, 2019 3:14 pm

THis has been fixed and is now working on EMU

Locked

Who is online

Users browsing this forum: No registered users and 0 guests