Page 1 of 1
BUG:FIXED hovering over spells not displaying popup
Posted: Tue Mar 05, 2019 8:49 am
by Ememjr
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
Re: BUG: hovering over spells not displaying popup
Posted: Tue Mar 05, 2019 9:16 am
by Ememjr
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
Re: BUG: hovering over spells not displaying popup
Posted: Tue Mar 05, 2019 4:35 pm
by Jabantiz
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.
Re: BUG: hovering over spells not displaying popup
Posted: Tue Mar 05, 2019 6:21 pm
by Ememjr
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>
Re: BUG: hovering over spells not displaying popup
Posted: Fri Mar 08, 2019 3:14 pm
by Ememjr
THis has been fixed and is now working on EMU