Crash handler: don't hang on a corrupted heap; fix guild tribute names (#5130)

This commit is contained in:
straps-eq authored and GitHub committed 2026-11-10 23:35:33 -08:00
1 parent c9c8747ac9
commit a572b03f56
9 files changed
+33 -10

No files matched your search

+6 -1
View File
@@ -3221,8 +3221,10 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
break;
}
// a swap targets a filled slot; the old augment comes out below
const bool is_swap = in_augment->augment_action == AugmentActions::Swap;
if (
tobe_auged->IsAugmentSlotAvailable(new_aug->GetAugmentType(), static_cast<uint8>(in_augment->augment_index)) &&
tobe_auged->IsAugmentSlotAvailable(new_aug->GetAugmentType(), static_cast<uint8>(in_augment->augment_index), is_swap) &&
tobe_auged->AvailableWearSlot(new_aug->GetItem()->Slots)
) {
old_aug = tobe_auged->RemoveAugment(static_cast<uint8>(in_augment->augment_index));
@@ -11861,6 +11863,9 @@ void Client::Handle_OP_PetitionCheckIn(const EQApplicationPacket *app)
Petition_Struct* inpet = (Petition_Struct*)app->pBuffer;
Petition* pet = PetitionList::Instance()->GetPetitionByID(inpet->petnumber);
if (!pet) {
return;
}
//if (inpet->urgency != pet->GetUrgency())
pet->SetUrgency(inpet->urgency);
pet->SetLastGM(GetName());
+1 -1
View File
@@ -123,7 +123,7 @@
#define DISARMED_TRAP 305 //You have disarmed the trap.
#define LDON_SENSE_TRAP1 306 //You do not Sense any traps.
#define TRADESKILL_NOCOMBINE 334 //You cannot combine these items in this container type!
#define TRADESKILL_FAILED 336 //You lacked the skills to fashion the items together. // TODO: TOB - 336 You lacked the skills to fashion %1.
#define TRADESKILL_FAILED 336 //You lacked the skills to fashion the items together. (ToB: ...to fashion %1.)
#define TRADESKILL_TRIVIAL 338 //You can no longer advance your skill from making this item.
#define TRADESKILL_SUCCEED 339 //You have fashioned the items together to create something new! // TODO: TOB - 339 You have %2fashioned the items together to create something new: %1.
#define EVADE_SUCCESS 343 //You have momentarily ducked away from the main combat.
+6 -1
View File
@@ -1199,7 +1199,12 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
if(over_trivial < 0)
CheckIncreaseTradeskill(bonusstat, stat_modifier, skillup_modifier, success_modifier, spec->tradeskill);
MessageString(Chat::Emote,TRADESKILL_FAILED);
// ToB's text names the recipe (%1); the argument overload sends Emote as type 4, so older clients keep the plain one
if (ClientVersion() >= EQ::versions::ClientVersion::TOB) {
MessageString(Chat::Emote, TRADESKILL_FAILED, spec->name.c_str());
} else {
MessageString(Chat::Emote, TRADESKILL_FAILED);
}
LogTradeskills("Tradeskill failed");
if (GetGroup())
+1 -1
View File
@@ -396,7 +396,7 @@ void Client::SendGuildTributes()
gtas->ability.tiers[ti].tribute_item_id = htonl(t.second.tiers[ti].tribute_item_id);
gtas->ability.tiers[ti].level = htonl(t.second.tiers[ti].level);
}
strn0cpy(gtas->ability.name, t.second.name.data(), t.second.name.length());
strn0cpy(gtas->ability.name, t.second.name.data(), len);
FastQueuePacket(&outapp);
}
}
+1 -1
View File
@@ -871,7 +871,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
ServerMultiLineMsg_Struct* mlm = (ServerMultiLineMsg_Struct*)pack->pBuffer;
Client* client = entity_list.GetClientByName(mlm->to);
if (client) {
auto outapp = new EQApplicationPacket(OP_MultiLineMsg, strlen(mlm->message));
auto outapp = new EQApplicationPacket(OP_MultiLineMsg, strlen(mlm->message) + 1);
strcpy((char*)outapp->pBuffer, mlm->message);
client->QueuePacket(outapp);
safe_delete(outapp);