mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-18 11:48:21 +00:00
Full Packet Review for Known Conversion (#5100)
This commit is contained in:
@@ -2305,6 +2305,7 @@ void Client::SetStats(uint8 type,int16 set_val){
|
||||
m_pp.CHA=set_val;
|
||||
break;
|
||||
}
|
||||
*reinterpret_cast<uint16*>(iss->unknown13) = GetID();
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
@@ -2395,6 +2396,7 @@ void Client::IncStats(uint8 type, int16 increase_val)
|
||||
}
|
||||
break;
|
||||
}
|
||||
*reinterpret_cast<uint16*>(iss->unknown13) = GetID();
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
@@ -8868,9 +8868,9 @@ void Client::Handle_OP_Hide(const EQApplicationPacket *app)
|
||||
// newer client respond to OP_CancelSneakHide with OP_Hide with a size of 4 and 0 data
|
||||
if (app->size == 4) {
|
||||
auto data = app->ReadUInt32(0);
|
||||
if (data)
|
||||
LogDebug("Got OP_Hide with unexpected data [{}]", data);
|
||||
return;
|
||||
// only return if data is 0. data == 1 (or potentially non-zero) is the client requesting a hide roll
|
||||
if (data == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!HasSkill(EQ::skills::SkillHide) && GetSkill(EQ::skills::SkillHide) == 0)
|
||||
|
||||
@@ -973,6 +973,22 @@ void Client::SendTradeskillDetails(uint32 recipe_id) {
|
||||
|
||||
uint32 total = sizeof(uint32) + dist + datalen;
|
||||
|
||||
// The TOB client reads 4 bytes of trivial after the 10 component slots.
|
||||
// Fetch the trivial from the recipe table and append it so the client doesn't read garbage.
|
||||
uint32 trivial = 0;
|
||||
std::string trivial_query = StringFormat(
|
||||
"SELECT trivial FROM tradeskill_recipe WHERE id = %u LIMIT 1", recipe_id);
|
||||
auto trivial_results = content_db.QueryDatabase(trivial_query);
|
||||
if (trivial_results.Success() && trivial_results.RowCount() > 0) {
|
||||
auto trow = trivial_results.begin();
|
||||
if (trow[0]) {
|
||||
trivial = (uint32)Strings::ToInt(trow[0]);
|
||||
}
|
||||
}
|
||||
uint32 trivial_net = htonl(trivial);
|
||||
memcpy(buf + total, &trivial_net, sizeof(uint32));
|
||||
total += sizeof(uint32);
|
||||
|
||||
auto outapp = new EQApplicationPacket(OP_RecipeDetails);
|
||||
outapp->size = total;
|
||||
outapp->pBuffer = (uchar*) buf;
|
||||
|
||||
Reference in New Issue
Block a user