mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-08 15:33:53 +00:00
Correct OP_AugmentInfo reply
This fixes the display issue for RoF SoF/SoD/UF still won't show the charm info on Adventurer's Stone, probably a client bug.
This commit is contained in:
parent
c749155ad2
commit
0b44f58518
@ -1,5 +1,9 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 11/16/2014 ==
|
||||
demonstar55: Correct OP_AugmentInfo reply. This fixes RoF display issue with Adventurer's Stone
|
||||
Still issues with UF/SoF/SoD though.
|
||||
|
||||
== 11/16/2014 ==
|
||||
demonstar55: fix size issue with ControlBoat_Struct and exploit fix in OP_BoardBoat
|
||||
Akkadius: Implemented Automatic Database update and versioning system
|
||||
|
||||
@ -4389,8 +4389,8 @@ struct ControlBoat_Struct {
|
||||
struct AugmentInfo_Struct
|
||||
{
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint8 window; // window to display the information in
|
||||
/*005*/ uint8 unknown005[67]; // total packet length 72, all the rest were always 00
|
||||
/*004*/ uint32 window; // window to display the information in
|
||||
/*008*/ char augment_info[64]; // the reply has the text here
|
||||
/*072*/
|
||||
};
|
||||
|
||||
|
||||
@ -235,6 +235,18 @@ namespace RoF
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_AugmentInfo)
|
||||
{
|
||||
ENCODE_LENGTH_EXACT(AugmentInfo_Struct);
|
||||
SETUP_DIRECT_ENCODE(AugmentInfo_Struct, structs::AugmentInfo_Struct);
|
||||
|
||||
OUT(itemid);
|
||||
OUT(window);
|
||||
strn0cpy(eq->augment_info, emu->augment_info, 64);
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_Barter)
|
||||
{
|
||||
EQApplicationPacket *in = *p;
|
||||
|
||||
@ -5,6 +5,7 @@ E(OP_AltCurrency)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_Animation)
|
||||
E(OP_ApplyPoison)
|
||||
E(OP_AugmentInfo)
|
||||
E(OP_Barter)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_BeginCast)
|
||||
|
||||
@ -4692,9 +4692,9 @@ struct ItemQuaternaryBodyStruct
|
||||
struct AugmentInfo_Struct
|
||||
{
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint8 window; // window to display the information in
|
||||
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
|
||||
/*076*/
|
||||
/*004*/ uint32 window; // window to display the information in
|
||||
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
|
||||
/*072*/ uint32 unknown072;
|
||||
};
|
||||
|
||||
struct VeteranRewardItem
|
||||
|
||||
@ -174,6 +174,18 @@ namespace SoD
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_AugmentInfo)
|
||||
{
|
||||
ENCODE_LENGTH_EXACT(AugmentInfo_Struct);
|
||||
SETUP_DIRECT_ENCODE(AugmentInfo_Struct, structs::AugmentInfo_Struct);
|
||||
|
||||
OUT(itemid);
|
||||
OUT(window);
|
||||
strn0cpy(eq->augment_info, emu->augment_info, 64);
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_Barter)
|
||||
{
|
||||
EQApplicationPacket *in = *p;
|
||||
|
||||
@ -3,6 +3,7 @@ E(OP_Action)
|
||||
E(OP_AdventureMerchantSell)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_ApplyPoison)
|
||||
E(OP_AugmentInfo)
|
||||
E(OP_Barter)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_Buff)
|
||||
|
||||
@ -4173,9 +4173,9 @@ struct ItemQuaternaryBodyStruct
|
||||
struct AugmentInfo_Struct
|
||||
{
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint8 window; // window to display the information in
|
||||
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
|
||||
/*076*/
|
||||
/*004*/ uint32 window; // window to display the information in
|
||||
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
|
||||
/*072*/ uint32 unknown072;
|
||||
};
|
||||
|
||||
struct VeteranRewardItem
|
||||
|
||||
@ -174,6 +174,18 @@ namespace SoF
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_AugmentInfo)
|
||||
{
|
||||
ENCODE_LENGTH_EXACT(AugmentInfo_Struct);
|
||||
SETUP_DIRECT_ENCODE(AugmentInfo_Struct, structs::AugmentInfo_Struct);
|
||||
|
||||
OUT(itemid);
|
||||
OUT(window);
|
||||
strn0cpy(eq->augment_info, emu->augment_info, 64);
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_BazaarSearch)
|
||||
{
|
||||
if (((*p)->size == sizeof(BazaarReturnDone_Struct)) || ((*p)->size == sizeof(BazaarWelcome_Struct))) {
|
||||
|
||||
@ -3,6 +3,7 @@ E(OP_Action)
|
||||
E(OP_AdventureMerchantSell)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_ApplyPoison)
|
||||
E(OP_AugmentInfo)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_BecomeTrader)
|
||||
E(OP_Buff)
|
||||
|
||||
@ -4027,9 +4027,9 @@ struct ItemQuaternaryBodyStruct
|
||||
struct AugmentInfo_Struct
|
||||
{
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint8 window; // window to display the information in
|
||||
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
|
||||
/*076*/
|
||||
/*004*/ uint32 window; // window to display the information in
|
||||
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
|
||||
/*072*/ uint32 unknown072;
|
||||
};
|
||||
|
||||
struct VeteranRewardItem
|
||||
|
||||
@ -226,6 +226,18 @@ namespace Underfoot
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_AugmentInfo)
|
||||
{
|
||||
ENCODE_LENGTH_EXACT(AugmentInfo_Struct);
|
||||
SETUP_DIRECT_ENCODE(AugmentInfo_Struct, structs::AugmentInfo_Struct);
|
||||
|
||||
OUT(itemid);
|
||||
OUT(window);
|
||||
strn0cpy(eq->augment_info, emu->augment_info, 64);
|
||||
|
||||
FINISH_ENCODE();
|
||||
}
|
||||
|
||||
ENCODE(OP_Barter)
|
||||
{
|
||||
EQApplicationPacket *in = *p;
|
||||
|
||||
@ -4,6 +4,7 @@ E(OP_AdventureMerchantSell)
|
||||
E(OP_AltCurrency)
|
||||
E(OP_AltCurrencySell)
|
||||
E(OP_ApplyPoison)
|
||||
E(OP_AugmentInfo)
|
||||
E(OP_Barter)
|
||||
E(OP_BazaarSearch)
|
||||
E(OP_Buff)
|
||||
|
||||
@ -4272,9 +4272,9 @@ struct ItemQuaternaryBodyStruct
|
||||
struct AugmentInfo_Struct
|
||||
{
|
||||
/*000*/ uint32 itemid; // id of the solvent needed
|
||||
/*004*/ uint8 window; // window to display the information in
|
||||
/*005*/ uint8 unknown005[71]; // total packet length 76, all the rest were always 00
|
||||
/*076*/
|
||||
/*004*/ uint32 window; // window to display the information in
|
||||
/*008*/ char augment_info[64]; // total packet length 76, all the rest were always 00
|
||||
/*072*/ uint32 unknown072;
|
||||
};
|
||||
|
||||
struct VeteranRewardItem
|
||||
|
||||
@ -3034,47 +3034,23 @@ void Client::Handle_OP_AssistGroup(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_AugmentInfo(const EQApplicationPacket *app)
|
||||
{
|
||||
|
||||
// This packet is sent by the client when an Augment item information window is opened.
|
||||
// We respond with an OP_ReadBook containing the type of distiller required to remove the augment.
|
||||
// The OP_Augment packet includes a window parameter to determine which Item window in the UI the
|
||||
// text is to be displayed in. out->type = 2 indicates the BookText_Struct contains item information.
|
||||
//
|
||||
// Some clients this seems to nuke the charm text (ex. Adventurer's Stone)
|
||||
|
||||
if (app->size != sizeof(AugmentInfo_Struct))
|
||||
{
|
||||
if (app->size != sizeof(AugmentInfo_Struct)) {
|
||||
LogFile->write(EQEMuLog::Debug, "Size mismatch in OP_AugmentInfo expected %i got %i",
|
||||
sizeof(AugmentInfo_Struct), app->size);
|
||||
|
||||
DumpPacket(app);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
AugmentInfo_Struct* AugInfo = (AugmentInfo_Struct*)app->pBuffer;
|
||||
|
||||
char *outstring = nullptr;
|
||||
|
||||
const Item_Struct * item = database.GetItem(AugInfo->itemid);
|
||||
|
||||
if (item)
|
||||
{
|
||||
MakeAnyLenString(&outstring, "You must use the solvent %s to remove this augment safely.", item->Name);
|
||||
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_ReadBook, strlen(outstring) + sizeof(BookText_Struct));
|
||||
|
||||
BookText_Struct *out = (BookText_Struct *)outapp->pBuffer;
|
||||
|
||||
out->window = AugInfo->window;
|
||||
|
||||
out->type = 2;
|
||||
|
||||
out->invslot = 0;
|
||||
|
||||
strcpy(out->booktext, outstring);
|
||||
|
||||
safe_delete_array(outstring);
|
||||
|
||||
FastQueuePacket(&outapp);
|
||||
if (item) {
|
||||
strn0cpy(AugInfo->augment_info, item->Name, 64);
|
||||
AugInfo->itemid = 0;
|
||||
QueuePacket(app);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user