From 2bed1290370f3c321e687772a2ca60ec792791d5 Mon Sep 17 00:00:00 2001 From: Uleat Date: Sun, 22 Feb 2015 22:27:58 -0500 Subject: [PATCH 1/7] Fix for tutorial button kicking client when re-entering tutorial (return home button for RoF/RoF2 issue still at large) --- world/client.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/world/client.cpp b/world/client.cpp index c0492b7fd..540dfa683 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -741,9 +741,12 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { bool home_enabled = false; for (auto row = tgh_results.begin(); row != tgh_results.end(); ++row) { if (strcasecmp(row[1], char_name) == 0) { - if (RuleB(World, EnableTutorialButton) && ((uint8)atoi(row[2]) <= RuleI(World, MaxLevelForTutorial))) { - home_enabled = true; - break; + if (RuleB(World, EnableReturnHomeButton)) { + int now = time(nullptr); + if ((now - atoi(row[3])) >= RuleI(World, MinOfflineTimeToReturnHome)) { + home_enabled = true; + break; + } } } } @@ -764,12 +767,9 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { bool tutorial_enabled = false; for (auto row = tgh_results.begin(); row != tgh_results.end(); ++row) { if (strcasecmp(row[1], char_name) == 0) { - if (RuleB(World, EnableReturnHomeButton)) { - int now = time(nullptr); - if ((now - atoi(row[3])) >= RuleI(World, MinOfflineTimeToReturnHome)) { - tutorial_enabled = true; - break; - } + if (RuleB(World, EnableTutorialButton) && ((uint8)atoi(row[2]) <= RuleI(World, MaxLevelForTutorial))) { + tutorial_enabled = true; + break; } } } From 167b6f5ebfe0b8c41c6522bfdf9d3f893a90461a Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Mon, 23 Feb 2015 00:39:06 -0500 Subject: [PATCH 2/7] perl NPC function RemoveFromHateList(mob) --- zone/perl_npc.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/zone/perl_npc.cpp b/zone/perl_npc.cpp index f06623f4a..e2d3fcdd9 100644 --- a/zone/perl_npc.cpp +++ b/zone/perl_npc.cpp @@ -795,6 +795,42 @@ XS(XS_NPC_IsOnHatelist) XSRETURN(1); } +XS(XS_NPC_RemoveFromHateList); /* prototype to pass -Wmissing-prototypes */ +XS(XS_NPC_RemoveFromHateList) +{ + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: NPC::RemoveFromHateList(THIS, ent)"); + { + NPC * THIS; + Mob* ent; + + if (sv_derived_from(ST(0), "NPC")) { + IV tmp = SvIV((SV*)SvRV(ST(0))); + THIS = INT2PTR(NPC *,tmp); + } + else + Perl_croak(aTHX_ "THIS is not of type NPC"); + if(THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + + if (sv_derived_from(ST(1), "Mob")) { + IV tmp = SvIV((SV*)SvRV(ST(1))); + ent = INT2PTR(Mob *,tmp); + } + else + Perl_croak(aTHX_ "ent is not of type Mob"); + if(ent == nullptr) + Perl_croak(aTHX_ "ent is nullptr, avoiding crash."); + + THIS->RemoveFromHateList(ent); + + } + XSRETURN_EMPTY; +} + + + XS(XS_NPC_SetNPCFactionID); /* prototype to pass -Wmissing-prototypes */ XS(XS_NPC_SetNPCFactionID) { @@ -2420,6 +2456,7 @@ XS(boot_NPC) newXSproto(strcpy(buf, "GetPrimaryFaction"), XS_NPC_GetPrimaryFaction, file, "$"); newXSproto(strcpy(buf, "GetNPCHate"), XS_NPC_GetNPCHate, file, "$$"); newXSproto(strcpy(buf, "IsOnHatelist"), XS_NPC_IsOnHatelist, file, "$$"); + newXSproto(strcpy(buf, "RemoveFromHateList"), XS_NPC_RemoveFromHateList, file, "$$"); newXSproto(strcpy(buf, "SetNPCFactionID"), XS_NPC_SetNPCFactionID, file, "$$"); newXSproto(strcpy(buf, "GetMaxDMG"), XS_NPC_GetMaxDMG, file, "$"); newXSproto(strcpy(buf, "GetMinDMG"), XS_NPC_GetMinDMG, file, "$"); From 9d866c18897df30567b26901e96e19f161886953 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Mon, 23 Feb 2015 03:52:43 -0500 Subject: [PATCH 3/7] perl $npc->ChangeLastName(name) perl $npc->ClearLastName() Modifies NPC last names. --- zone/npc.cpp | 23 +++++++++++++++++++++ zone/npc.h | 3 +++ zone/perl_npc.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) diff --git a/zone/npc.cpp b/zone/npc.cpp index 5d180e994..c69b6499a 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -2394,6 +2394,29 @@ void NPC::DoQuestPause(Mob *other) { } +void NPC::ChangeLastName(const char* in_lastname) +{ + + EQApplicationPacket* outapp = new EQApplicationPacket(OP_GMLastName, sizeof(GMLastName_Struct)); + GMLastName_Struct* gmn = (GMLastName_Struct*)outapp->pBuffer; + strcpy(gmn->name, GetName()); + strcpy(gmn->gmname, GetName()); + strcpy(gmn->lastname, in_lastname); + gmn->unknown[0]=1; + gmn->unknown[1]=1; + gmn->unknown[2]=1; + gmn->unknown[3]=1; + entity_list.QueueClients(this, outapp, false); + safe_delete(outapp); +} + +void NPC::ClearLastName() +{ + std::string WT; + WT = '\0'; //Clear Last Name + ChangeLastName( WT.c_str()); +} + void NPC::DepopSwarmPets() { if (GetSwarmInfo()) { diff --git a/zone/npc.h b/zone/npc.h index ee3dedf62..8fb80e2a2 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -361,6 +361,9 @@ public: const bool IsUnderwaterOnly() const { return NPCTypedata->underwater; } const char* GetRawNPCTypeName() const { return NPCTypedata->name; } + void ChangeLastName(const char* in_lastname); + void ClearLastName(); + bool GetDepop() { return p_depop; } void NPCSlotTexture(uint8 slot, uint16 texture); // Sets new material values for slots diff --git a/zone/perl_npc.cpp b/zone/perl_npc.cpp index e2d3fcdd9..a2943d035 100644 --- a/zone/perl_npc.cpp +++ b/zone/perl_npc.cpp @@ -2409,6 +2409,55 @@ XS(XS_NPC_AddDefensiveProc) { XSRETURN_EMPTY; } +XS(XS_NPC_ChangeLastName); /* prototype to pass -Wmissing-prototypes */ +XS(XS_NPC_ChangeLastName) +{ + dXSARGS; + if (items < 1 || items > 2) + Perl_croak(aTHX_ "Usage: Mob::ChangeLastName(THIS, name)"); + { + NPC * THIS; + char * name = nullptr; + + if (sv_derived_from(ST(0), "NPC")) { + IV tmp = SvIV((SV*)SvRV(ST(0))); + THIS = INT2PTR(NPC *,tmp); + } + else + Perl_croak(aTHX_ "THIS is not of type NPC"); + if(THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + + if (items > 1) { name = (char *)SvPV_nolen(ST(1)); } + + THIS->ChangeLastName(name); + } + XSRETURN_EMPTY; +} + +XS(XS_NPC_ClearLastName); /* prototype to pass -Wmissing-prototypes */ +XS(XS_NPC_ClearLastName) +{ + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: Mob::ClearLastName(THIS)"); + { + NPC * THIS; + + if (sv_derived_from(ST(0), "NPC")) { + IV tmp = SvIV((SV*)SvRV(ST(0))); + THIS = INT2PTR(NPC *,tmp); + } + else + Perl_croak(aTHX_ "THIS is not of type NPC"); + if(THIS == nullptr) + Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); + + THIS->ClearLastName(); + } + XSRETURN_EMPTY; +} + #ifdef __cplusplus extern "C" #endif @@ -2517,6 +2566,8 @@ XS(boot_NPC) newXSproto(strcpy(buf, "AddMeleeProc"), XS_NPC_AddMeleeProc, file, "$$$"); newXSproto(strcpy(buf, "AddRangedProc"), XS_NPC_AddRangedProc, file, "$$$"); newXSproto(strcpy(buf, "AddDefensiveProc"), XS_NPC_AddDefensiveProc, file, "$$$"); + newXSproto(strcpy(buf, "ChangeLastName"), XS_NPC_ChangeLastName, file, "$:$"); + newXSproto(strcpy(buf, "ClearLastName"), XS_NPC_ClearLastName, file, "$"); XSRETURN_YES; } From d601a705460802d0c94db563543364f367e9b92d Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 23 Feb 2015 17:51:30 -0500 Subject: [PATCH 4/7] Fix for RoF+ clients showing active 'Return Home' button when action is not available --- changelog.txt | 3 +++ common/eq_packet_structs.h | 5 +++-- common/patches/rof.cpp | 4 ++-- common/patches/rof2.cpp | 4 ++-- common/patches/rof2_structs.h | 4 ++-- common/patches/rof_structs.h | 4 ++-- world/client.cpp | 1 + world/worlddb.cpp | 12 ++++++------ 8 files changed, 21 insertions(+), 16 deletions(-) diff --git a/changelog.txt b/changelog.txt index f12dfd0ae..4d2d34a2c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 02/23/2015 == +Uleat: Fix for RoF+ clients showing active 'Return Home' button when action is not available (swapped 'GoHome' and 'Enabled' fields in RoF-era CharacterSelectEntry structs) + == 02/21/2015 == Noudess: Starting erudites that were supposed to start in paineel were landing in erudin on Titanium. Fixed to be paineel. diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 27fe9bb2b..65d6fba3b 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -158,6 +158,7 @@ struct CharSelectEquip Color_Struct Color; }; +// RoF2-based hybrid struct struct CharacterSelectEntry_Struct { char Name[64]; @@ -184,11 +185,11 @@ struct CharacterSelectEntry_Struct uint8 EyeColor2; uint8 HairStyle; uint8 Beard; - uint8 Enabled; + uint8 GoHome; // Seen 0 for new char and 1 for existing uint8 Tutorial; // Seen 1 for new char or 0 for existing uint32 DrakkinHeritage; uint8 Unknown1; // Seen 0 - uint8 GoHome; // Seen 0 for new char and 1 for existing + uint8 Enabled; // Originally labeled as 'CharEnabled' - unknown purpose and setting -U uint32 LastLogin; uint8 Unknown2; // Seen 0 }; diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index d6723db4d..f47d55c89 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -2982,11 +2982,11 @@ namespace RoF eq_cse->EyeColor2 = emu_cse->EyeColor2; eq_cse->HairStyle = emu_cse->HairStyle; eq_cse->Beard = emu_cse->Beard; - eq_cse->Enabled = emu_cse->Enabled; + eq_cse->GoHome = emu_cse->GoHome; eq_cse->Tutorial = emu_cse->Tutorial; eq_cse->DrakkinHeritage = emu_cse->DrakkinHeritage; eq_cse->Unknown1 = emu_cse->Unknown1; - eq_cse->GoHome = emu_cse->GoHome; + eq_cse->Enabled = emu_cse->Enabled; eq_cse->LastLogin = emu_cse->LastLogin; eq_cse->Unknown2 = emu_cse->Unknown2; diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 493f369e1..c03c8cd30 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -3066,11 +3066,11 @@ namespace RoF2 eq_cse->EyeColor2 = emu_cse->EyeColor2; eq_cse->HairStyle = emu_cse->HairStyle; eq_cse->Beard = emu_cse->Beard; - eq_cse->Enabled = emu_cse->Enabled; + eq_cse->GoHome = emu_cse->GoHome; eq_cse->Tutorial = emu_cse->Tutorial; eq_cse->DrakkinHeritage = emu_cse->DrakkinHeritage; eq_cse->Unknown1 = emu_cse->Unknown1; - eq_cse->GoHome = emu_cse->GoHome; + eq_cse->Enabled = emu_cse->Enabled; eq_cse->LastLogin = emu_cse->LastLogin; eq_cse->Unknown2 = emu_cse->Unknown2; diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index d5ab87fb6..a00991a70 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -189,11 +189,11 @@ struct CharacterSelectEntry_Struct /*0000*/ uint8 EyeColor2; /*0000*/ uint8 HairStyle; /*0000*/ uint8 Beard; -/*0000*/ uint8 Enabled; +/*0000*/ uint8 GoHome; // Seen 0 for new char and 1 for existing /*0000*/ uint8 Tutorial; // Seen 1 for new char or 0 for existing /*0000*/ uint32 DrakkinHeritage; /*0000*/ uint8 Unknown1; // Seen 0 -/*0000*/ uint8 GoHome; // Seen 0 for new char and 1 for existing +/*0000*/ uint8 Enabled; // Swapped position with 'GoHome' 02/23/2015 -U /*0000*/ uint32 LastLogin; /*0000*/ uint8 Unknown2; // Seen 0 }; diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index f773d422c..42845a244 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -189,11 +189,11 @@ struct CharacterSelectEntry_Struct /*0000*/ uint8 EyeColor2; /*0000*/ uint8 HairStyle; /*0000*/ uint8 Beard; -/*0000*/ uint8 Enabled; +/*0000*/ uint8 GoHome; // Seen 0 for new char and 1 for existing /*0000*/ uint8 Tutorial; // Seen 1 for new char or 0 for existing /*0000*/ uint32 DrakkinHeritage; /*0000*/ uint8 Unknown1; // Seen 0 -/*0000*/ uint8 GoHome; // Seen 0 for new char and 1 for existing +/*0000*/ uint8 Enabled; // Swapped position with 'GoHome' 02/23/2015 -U /*0000*/ uint32 LastLogin; /*0000*/ uint8 Unknown2; // Seen 0 }; diff --git a/world/client.cpp b/world/client.cpp index 540dfa683..b6b846f31 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -720,6 +720,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { } // This can probably be moved outside and have another method return requested info (don't forget to remove the #include "../common/shareddb.h" above) + // (This is a literal translation of the original process..I don't see why it can't be changed to a single-target query over account iteration -U) if (!pZoning) { size_t character_limit = EQLimits::CharacterCreationLimit(eqs->GetClientVersion()); if (character_limit > EmuConstants::CHARACTER_CREATION_LIMIT) { character_limit = EmuConstants::CHARACTER_CREATION_LIMIT; } diff --git a/world/worlddb.cpp b/world/worlddb.cpp index 9a2bb630a..4b2a75ac6 100644 --- a/world/worlddb.cpp +++ b/world/worlddb.cpp @@ -138,25 +138,25 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou cse->EyeColor2 = (uint8)atoi(row[12]); cse->HairStyle = (uint8)atoi(row[13]); cse->Beard = (uint8)atoi(row[14]); - cse->Enabled = 1; + cse->GoHome = 0; // Processed Below cse->Tutorial = 0; // Processed Below cse->DrakkinHeritage = (uint32)atoi(row[16]); cse->Unknown1 = 0; - cse->GoHome = 0; // Processed Below + cse->Enabled = 1; cse->LastLogin = (uint32)atoi(row[7]); // RoF2 value: 1212696584 cse->Unknown2 = 0; /* Fill End */ - if (RuleB(World, EnableTutorialButton) && (cse->Level <= RuleI(World, MaxLevelForTutorial))) { - cse->Tutorial = 1; - } - if (RuleB(World, EnableReturnHomeButton)) { int now = time(nullptr); if ((now - atoi(row[7])) >= RuleI(World, MinOfflineTimeToReturnHome)) cse->GoHome = 1; } + if (RuleB(World, EnableTutorialButton) && (cse->Level <= RuleI(World, MaxLevelForTutorial))) { + cse->Tutorial = 1; + } + /* Set Bind Point Data for any character that may possibly be missing it for any reason */ cquery = StringFormat("SELECT `zone_id`, `instance_id`, `x`, `y`, `z`, `heading`, `is_home` FROM `character_bind` WHERE `id` = %i LIMIT 2", character_id); auto results_bind = database.QueryDatabase(cquery); From 318a664b0995386a5ed61c74697d53642d0fbc6c Mon Sep 17 00:00:00 2001 From: JJ Date: Mon, 23 Feb 2015 19:57:47 -0500 Subject: [PATCH 5/7] No "sigs". [skip ci] --- common/eq_constants.h | 2 +- common/eq_packet_structs.h | 16 ++++++++-------- common/item.cpp | 6 +++--- common/patches/rof.cpp | 2 +- common/patches/rof2.cpp | 2 +- common/patches/rof2_structs.h | 6 +++--- common/patches/rof_structs.h | 6 +++--- common/patches/sod_structs.h | 6 +++--- common/patches/sof_structs.h | 6 +++--- common/patches/titanium.cpp | 4 ++-- common/patches/titanium_structs.h | 6 +++--- common/patches/uf_structs.h | 6 +++--- common/shareddb.cpp | 2 +- queryserv/database.cpp | 2 +- world/client.cpp | 2 +- zone/bot.cpp | 4 ++-- zone/client_packet.cpp | 2 +- zone/client_process.cpp | 6 +++--- zone/corpse.cpp | 2 +- zone/effects.cpp | 2 +- zone/embparser.cpp | 6 +++--- zone/inventory.cpp | 12 ++++++------ zone/trading.cpp | 6 +++--- 23 files changed, 57 insertions(+), 57 deletions(-) diff --git a/common/eq_constants.h b/common/eq_constants.h index 14f695069..a6c98e2ba 100644 --- a/common/eq_constants.h +++ b/common/eq_constants.h @@ -55,7 +55,7 @@ enum ItemClassTypes ** ** (ref: database and eqstr_us.txt) ** -** (Looking at a recent database, it's possible that some of the item values may be off [10-27-2013] -U) +** (Looking at a recent database, it's possible that some of the item values may be off [10-27-2013]) */ enum ItemUseTypes : uint8 { diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 65d6fba3b..57dfe5482 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -189,7 +189,7 @@ struct CharacterSelectEntry_Struct uint8 Tutorial; // Seen 1 for new char or 0 for existing uint32 DrakkinHeritage; uint8 Unknown1; // Seen 0 - uint8 Enabled; // Originally labeled as 'CharEnabled' - unknown purpose and setting -U + uint8 Enabled; // Originally labeled as 'CharEnabled' - unknown purpose and setting uint32 LastLogin; uint8 Unknown2; // Seen 0 }; @@ -1265,7 +1265,7 @@ struct ZoneChange_Struct { // Whatever you send to the client in RequestClientZoneChange_Struct.type, the client will send back // to the server in ZoneChange_Struct.zone_reason. My guess is this is a memo field of sorts. -// WildcardX 27 January 2008 +// 27 January 2008 struct RequestClientZoneChange_Struct { /*00*/ uint16 zone_id; @@ -2421,11 +2421,11 @@ struct InspectResponse_Struct { /*004*/ uint32 playerid; /*008*/ char itemnames[23][64]; /*1480*/uint32 itemicons[23]; -/*1572*/char text[288]; // Max number of chars in Inspect Window appears to be 254 // Msg struct property is 256 (254 + '\0' is my guess) -U +/*1572*/char text[288]; // Max number of chars in Inspect Window appears to be 254 // Msg struct property is 256 (254 + '\0' is my guess) /*1860*/ }; -//OP_InspectMessageUpdate - Size: 256 (SoF+ clients after self-inspect window is closed) -U +//OP_InspectMessageUpdate - Size: 256 (SoF+ clients after self-inspect window is closed) struct InspectMessage_Struct { /*000*/ char text[256]; /*256*/ @@ -2534,7 +2534,7 @@ struct BookRequest_Struct { ** */ struct Object_Struct { -/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list +/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list /*08*/ uint16 unknown008; // /*10*/ uint16 unknown010; // /*12*/ uint32 drop_id; // Unique object id for zone @@ -2553,8 +2553,8 @@ struct Object_Struct { /*88*/ uint32 spawn_id; // Spawn Id of client interacting with object /*92*/ }; -// 01 = generic drop, 02 = armor, 19 = weapon -//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject +// 01 = generic drop, 02 = armor, 19 = weapon +//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject /* ** Click Object Struct @@ -2611,7 +2611,7 @@ struct CloseContainer_Struct { */ struct Door_Struct { -/*0000*/ char name[32]; // Filename of Door // Was 10char long before... added the 6 in the next unknown to it: Daeken M. BlackBlade //changed both to 32: Trevius +/*0000*/ char name[32]; // Filename of Door // Was 10char long before... added the 6 in the next unknown to it //changed both to 32 /*0032*/ float yPos; // y loc /*0036*/ float xPos; // x loc /*0040*/ float zPos; // z loc diff --git a/common/item.cpp b/common/item.cpp index 0e2f0f574..4f7a81703 100644 --- a/common/item.cpp +++ b/common/item.cpp @@ -660,7 +660,7 @@ int16 Inventory::FindFreeSlotForTradeItem(const ItemInst* inst) { // Do not arbitrarily use this function..it is designed for use with Client::ResetTrade() and Client::FinishTrade(). // If you have a need, use it..but, understand it is not a compatible replacement for Inventory::FindFreeSlot(). // - // I'll probably implement a bitmask in the new inventory system to avoid having to adjust stack bias -U + // I'll probably implement a bitmask in the new inventory system to avoid having to adjust stack bias if (!inst || !inst->GetID()) return INVALID_INDEX; @@ -1232,7 +1232,7 @@ int16 Inventory::_HasItem(ItemInstQueue& iqueue, uint32 item_id, uint8 quantity) // found, it is presented as being available on the cursor. In cases of a parity check, this // is sufficient. However, in cases where referential criteria is considered, this can lead // to unintended results. Funtionality should be observed when referencing the return value - // of this query -U + // of this query uint8 quantity_found = 0; @@ -2148,7 +2148,7 @@ ItemInst* ItemInst::Clone() const } bool ItemInst::IsSlotAllowed(int16 slot_id) const { - // 'SupportsContainers' and 'slot_id > 21' previously saw the reassigned PowerSource slot (9999 to 22) as valid -U + // 'SupportsContainers' and 'slot_id > 21' previously saw the reassigned PowerSource slot (9999 to 22) as valid if (!m_item) { return false; } else if (Inventory::SupportsContainers(slot_id)) { return true; } else if (m_item->Slots & (1 << slot_id)) { return true; } diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index f47d55c89..22414d6e5 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -4925,7 +4925,7 @@ namespace RoF slot_id = legacy::SLOT_TRADESKILL; // 1000 } emu->container_slot = slot_id; - emu->guildtribute_slot = RoFToServerSlot(eq->guildtribute_slot); // this should only return INVALID_INDEX until implemented -U + emu->guildtribute_slot = RoFToServerSlot(eq->guildtribute_slot); // this should only return INVALID_INDEX until implemented FINISH_DIRECT_DECODE(); } diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index c03c8cd30..59c0258a9 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -5123,7 +5123,7 @@ namespace RoF2 slot_id = legacy::SLOT_TRADESKILL; // 1000 } emu->container_slot = slot_id; - emu->guildtribute_slot = RoF2ToServerSlot(eq->guildtribute_slot); // this should only return INVALID_INDEX until implemented -U + emu->guildtribute_slot = RoF2ToServerSlot(eq->guildtribute_slot); // this should only return INVALID_INDEX until implemented FINISH_DIRECT_DECODE(); } diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index a00991a70..79da918b9 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -193,7 +193,7 @@ struct CharacterSelectEntry_Struct /*0000*/ uint8 Tutorial; // Seen 1 for new char or 0 for existing /*0000*/ uint32 DrakkinHeritage; /*0000*/ uint8 Unknown1; // Seen 0 -/*0000*/ uint8 Enabled; // Swapped position with 'GoHome' 02/23/2015 -U +/*0000*/ uint8 Enabled; // Swapped position with 'GoHome' 02/23/2015 /*0000*/ uint32 LastLogin; /*0000*/ uint8 Unknown2; // Seen 0 }; @@ -3616,7 +3616,7 @@ struct Split_Struct */ struct NewCombine_Struct { /*00*/ ItemSlotStruct container_slot; -/*12*/ ItemSlotStruct guildtribute_slot; // Slot type is 8? (MapGuildTribute = 8 -U) +/*12*/ ItemSlotStruct guildtribute_slot; // Slot type is 8? (MapGuildTribute = 8) /*24*/ }; @@ -4552,7 +4552,7 @@ struct ItemSecondaryBodyStruct uint32 augtype; // swapped augrestrict and augdistiller positions // (this swap does show the proper augment restrictions in Item Information window now) - // unsure what the purpose of augdistiller is at this time -U 3/17/2014 + // unsure what the purpose of augdistiller is at this time 3/17/2014 int32 augrestrict2; // New to December 10th 2012 client - Hidden Aug Restriction uint32 augrestrict; AugSlotStruct augslots[6]; diff --git a/common/patches/rof_structs.h b/common/patches/rof_structs.h index 42845a244..a623c7cf4 100644 --- a/common/patches/rof_structs.h +++ b/common/patches/rof_structs.h @@ -193,7 +193,7 @@ struct CharacterSelectEntry_Struct /*0000*/ uint8 Tutorial; // Seen 1 for new char or 0 for existing /*0000*/ uint32 DrakkinHeritage; /*0000*/ uint8 Unknown1; // Seen 0 -/*0000*/ uint8 Enabled; // Swapped position with 'GoHome' 02/23/2015 -U +/*0000*/ uint8 Enabled; // Swapped position with 'GoHome' 02/23/2015 /*0000*/ uint32 LastLogin; /*0000*/ uint8 Unknown2; // Seen 0 }; @@ -3617,7 +3617,7 @@ struct Split_Struct */ struct NewCombine_Struct { /*00*/ ItemSlotStruct container_slot; -/*12*/ ItemSlotStruct guildtribute_slot; // Slot type is 8? (MapGuildTribute = 8 -U) +/*12*/ ItemSlotStruct guildtribute_slot; // Slot type is 8? (MapGuildTribute = 8) /*24*/ }; @@ -4554,7 +4554,7 @@ struct ItemSecondaryBodyStruct uint32 augtype; // swapped augrestrict and augdistiller positions // (this swap does show the proper augment restrictions in Item Information window now) - // unsure what the purpose of augdistiller is at this time -U 3/17/2014 + // unsure what the purpose of augdistiller is at this time 3/17/2014 uint32 augdistiller; // New to December 10th 2012 client - NEW uint32 augrestrict; AugSlotStruct augslots[6]; diff --git a/common/patches/sod_structs.h b/common/patches/sod_structs.h index 274cfe876..ef4dd32cb 100644 --- a/common/patches/sod_structs.h +++ b/common/patches/sod_structs.h @@ -2371,7 +2371,7 @@ struct BookRequest_Struct { ** */ struct Object_Struct { -/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list +/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list /*08*/ uint32 unknown008; // Something related to the linked list? /*12*/ uint32 drop_id; // Unique object id for zone /*16*/ uint16 zone_id; // Redudant, but: Zone the object appears in @@ -2391,8 +2391,8 @@ struct Object_Struct { /*100*/ uint32 spawn_id; // Spawn Id of client interacting with object /*104*/ }; -// 01 = generic drop, 02 = armor, 19 = weapon -//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject +//01 = generic drop, 02 = armor, 19 = weapon +//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject /* ** Click Object Struct diff --git a/common/patches/sof_structs.h b/common/patches/sof_structs.h index 23b080f0c..51dbef1f5 100644 --- a/common/patches/sof_structs.h +++ b/common/patches/sof_structs.h @@ -2305,7 +2305,7 @@ struct BookRequest_Struct { ** */ struct Object_Struct { -/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list +/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list /*08*/ uint32 unknown008; // Something related to the linked list? /*12*/ uint32 drop_id; // Unique object id for zone /*16*/ uint16 zone_id; // Redudant, but: Zone the object appears in @@ -2325,8 +2325,8 @@ struct Object_Struct { /*100*/ uint32 spawn_id; // Spawn Id of client interacting with object /*104*/ }; -// 01 = generic drop, 02 = armor, 19 = weapon -//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject +//01 = generic drop, 02 = armor, 19 = weapon +//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject /* ** Click Object Struct diff --git a/common/patches/titanium.cpp b/common/patches/titanium.cpp index b183acf4b..c8eeea36a 100644 --- a/common/patches/titanium.cpp +++ b/common/patches/titanium.cpp @@ -1070,7 +1070,7 @@ namespace Titanium ENCODE(OP_ReadBook) { - // no apparent slot translation needed -U + // no apparent slot translation needed EQApplicationPacket *in = *p; *p = nullptr; @@ -1949,7 +1949,7 @@ namespace Titanium DECODE(OP_ReadBook) { - // no apparent slot translation needed -U + // no apparent slot translation needed DECODE_LENGTH_ATLEAST(structs::BookRequest_Struct); SETUP_DIRECT_DECODE(BookRequest_Struct, structs::BookRequest_Struct); diff --git a/common/patches/titanium_structs.h b/common/patches/titanium_structs.h index 60b764dfe..1c3afd90b 100644 --- a/common/patches/titanium_structs.h +++ b/common/patches/titanium_structs.h @@ -2010,7 +2010,7 @@ struct BookRequest_Struct { ** */ struct Object_Struct { -/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list +/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list /*08*/ uint16 unknown008[2]; // /*12*/ uint32 drop_id; // Unique object id for zone /*16*/ uint16 zone_id; // Redudant, but: Zone the object appears in @@ -2029,8 +2029,8 @@ struct Object_Struct { /*88*/ uint32 spawn_id; // Spawn Id of client interacting with object /*92*/ }; -// 01 = generic drop, 02 = armor, 19 = weapon -//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject +//01 = generic drop, 02 = armor, 19 = weapon +//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject /* ** Click Object Struct diff --git a/common/patches/uf_structs.h b/common/patches/uf_structs.h index 2f5aa95b3..d7b14b385 100644 --- a/common/patches/uf_structs.h +++ b/common/patches/uf_structs.h @@ -2440,7 +2440,7 @@ struct BookRequest_Struct { ** */ struct Object_Struct { -/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list +/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list /*08*/ uint32 unknown008; // Something related to the linked list? /*12*/ uint32 drop_id; // Unique object id for zone /*16*/ uint16 zone_id; // Redudant, but: Zone the object appears in @@ -2460,8 +2460,8 @@ struct Object_Struct { /*100*/ uint32 spawn_id; // Spawn Id of client interacting with object /*104*/ }; -// 01 = generic drop, 02 = armor, 19 = weapon -//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject +//01 = generic drop, 02 = armor, 19 = weapon +//[13:40] and 0xff seems to be indicative of the tradeskill/openable items that end up returning the old style item type in the OP_OpenObject /* ** Click Object Struct diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 0e057812d..396bdb494 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -154,7 +154,7 @@ bool SharedDatabase::SaveInventory(uint32 char_id, const ItemInst* inst, int16 s // If we never save tribute slots..how are we to ever benefit from them!!? The client // object is destroyed upon zoning - including its inventory object..and if tributes // don't exist in the database, then they will never be loaded when the new client - // object is created in the new zone object... Something to consider... -U + // object is created in the new zone object... Something to consider... // // (we could add them to the 'NoRent' checks and dispose of after 30 minutes offline) diff --git a/queryserv/database.cpp b/queryserv/database.cpp index 231e100cf..ea5bdff65 100644 --- a/queryserv/database.cpp +++ b/queryserv/database.cpp @@ -306,7 +306,7 @@ void Database::LogPlayerMove(QSPlayerLogMove_Struct* QS, uint32 items) { } void Database::LogMerchantTransaction(QSMerchantLogTransaction_Struct* QS, uint32 items) { - /* Merchant transactions are from the perspective of the merchant, not the player -U */ + /* Merchant transactions are from the perspective of the merchant, not the player */ std::string query = StringFormat("INSERT INTO `qs_merchant_transaction_record` SET `time` = NOW(), " "`zone_id` = '%i', `merchant_id` = '%i', `merchant_pp` = '%i', " "`merchant_gp` = '%i', `merchant_sp` = '%i', `merchant_cp` = '%i', " diff --git a/world/client.cpp b/world/client.cpp index b6b846f31..34a404673 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -720,7 +720,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) { } // This can probably be moved outside and have another method return requested info (don't forget to remove the #include "../common/shareddb.h" above) - // (This is a literal translation of the original process..I don't see why it can't be changed to a single-target query over account iteration -U) + // (This is a literal translation of the original process..I don't see why it can't be changed to a single-target query over account iteration) if (!pZoning) { size_t character_limit = EQLimits::CharacterCreationLimit(eqs->GetClientVersion()); if (character_limit > EmuConstants::CHARACTER_CREATION_LIMIT) { character_limit = EmuConstants::CHARACTER_CREATION_LIMIT; } diff --git a/zone/bot.cpp b/zone/bot.cpp index 6eb90551f..1b1da0b6a 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -4132,7 +4132,7 @@ void Bot::Spawn(Client* botCharacterOwner, std::string* errorMessage) { this->SendPosition(); // there is something askew with spawn struct appearance fields... - // I re-enabled this until I can sort it out -U + // I re-enabled this until I can sort it out uint32 itemID = 0; uint8 materialFromSlot = 0xFF; for(int i = EmuConstants::EQUIPMENT_BEGIN; i <= EmuConstants::EQUIPMENT_END; ++i) { @@ -10823,7 +10823,7 @@ void Bot::ProcessBotInspectionRequest(Bot* inspectedBot, Client* client) { // Modded to display power source items (will only show up on SoF+ client inspect windows though.) // I don't think bots are currently coded to use them..but, you'll have to use '#bot inventory list' - // to see them on a Titanium client when/if they are activated. -U + // to see them on a Titanium client when/if they are activated. for(int16 L = EmuConstants::EQUIPMENT_BEGIN; L <= MainWaist; L++) { inst = inspectedBot->GetBotItem(L); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index f93f83018..5ff205202 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -3899,7 +3899,7 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app) } else if (m_inv.SupportsClickCasting(castspell->inventoryslot) || (castspell->slot == POTION_BELT_SPELL_SLOT) || (castspell->slot == TARGET_RING_SPELL_SLOT)) // sanity check { - // packet field types will be reviewed as packet transistions occur -U + // packet field types will be reviewed as packet transistions occur const ItemInst* inst = m_inv[castspell->inventoryslot]; //slot values are int16, need to check packet on this field //bool cancast = true; if (inst && inst->IsType(ItemClassCommon)) diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 45cc7d386..439c2c6c6 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -816,14 +816,14 @@ void Client::OnDisconnect(bool hard_disconnect) { // Sends the client complete inventory used in character login -// DO WE STILL NEED THE 'ITEMCOMBINED' CONDITIONAL CODE? -U +// DO WE STILL NEED THE 'ITEMCOMBINED' CONDITIONAL CODE? //#ifdef ITEMCOMBINED void Client::BulkSendInventoryItems() { int16 slot_id = 0; // LINKDEAD TRADE ITEMS - // Move trade slot items back into normal inventory..need them there now for the proceeding validity checks -U + // Move trade slot items back into normal inventory..need them there now for the proceeding validity checks for(slot_id = EmuConstants::TRADE_BEGIN; slot_id <= EmuConstants::TRADE_END; slot_id++) { ItemInst* inst = m_inv.PopItem(slot_id); if(inst) { @@ -842,7 +842,7 @@ void Client::BulkSendInventoryItems() { RemoveDuplicateLore(false); MoveSlotNotAllowed(false); - // The previous three method calls took care of moving/removing expired/illegal item placements -U + // The previous three method calls took care of moving/removing expired/illegal item placements //TODO: this function is just retarded... it re-allocates the buffer for every //new item. It should be changed to loop through once, gather the diff --git a/zone/corpse.cpp b/zone/corpse.cpp index 236128048..ca6619539 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -340,7 +340,7 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob ( database.TransactionBegin(); - // I have an untested process that avoids this snarl up when all possessions inventory is removed..but this isn't broke -U + // I have an untested process that avoids this snarl up when all possessions inventory is removed..but this isn't broke if (!removed_list.empty()) { std::stringstream ss(""); ss << "DELETE FROM inventory WHERE charid=" << client->CharacterID(); diff --git a/zone/effects.cpp b/zone/effects.cpp index 5cc024ce2..8a42b8e09 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -756,7 +756,7 @@ void EntityList::AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_ } else { // check to stop casting beneficial ae buffs (to wit: bard songs) on enemies... // This does not check faction for beneficial AE buffs..only agro and attackable. // I've tested for spells that I can find without problem, but a faction-based - // check may still be needed. Any changes here should also reflect in BardAEPulse() -U + // check may still be needed. Any changes here should also reflect in BardAEPulse() if (caster->IsAttackAllowed(curmob, true)) continue; if (caster->CheckAggro(curmob)) diff --git a/zone/embparser.cpp b/zone/embparser.cpp index e222edfda..3bfb2e90a 100644 --- a/zone/embparser.cpp +++ b/zone/embparser.cpp @@ -863,7 +863,7 @@ void PerlembParser::GetQuestPackageName(bool &isPlayerQuest, bool &isGlobalPlaye } } else if(isItemQuest) { - // need a valid ItemInst pointer check here..unsure how to cancel this process -U + // need a valid ItemInst pointer check here..unsure how to cancel this process const Item_Struct* item = iteminst->GetItem(); package_name = "qst_item_"; package_name += itoa(item->ID); @@ -1308,7 +1308,7 @@ void PerlembParser::ExportEventVariables(std::string &package_name, QuestEventID case EVENT_SCALE_CALC: case EVENT_ITEM_ENTER_ZONE: { - // need a valid ItemInst pointer check here..unsure how to cancel this process -U + // need a valid ItemInst pointer check here..unsure how to cancel this process ExportVar(package_name.c_str(), "itemid", objid); ExportVar(package_name.c_str(), "itemname", iteminst->GetItem()->Name); break; @@ -1316,7 +1316,7 @@ void PerlembParser::ExportEventVariables(std::string &package_name, QuestEventID case EVENT_ITEM_CLICK_CAST: case EVENT_ITEM_CLICK: { - // need a valid ItemInst pointer check here..unsure how to cancel this process -U + // need a valid ItemInst pointer check here..unsure how to cancel this process ExportVar(package_name.c_str(), "itemid", objid); ExportVar(package_name.c_str(), "itemname", iteminst->GetItem()->Name); ExportVar(package_name.c_str(), "slotid", extradata); diff --git a/zone/inventory.cpp b/zone/inventory.cpp index 35053731c..00f16c2a6 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -1067,12 +1067,12 @@ bool MakeItemLink(char* &ret_link, const Item_Struct *item, uint32 aug0, uint32 // Currently, enabling them causes misalignments in what the client expects. I haven't looked // into it further to determine the cause..but, the function is setup to accept the parameters. // Note: some links appear with '00000' in front of the name..so, it's likely we need to send - // some additional information when certain parameters are true -U + // some additional information when certain parameters are true //switch (GetClientVersion()) { switch (0) { case EQClientRoF2: // This operator contains 14 parameter masks..but, only 13 parameter values. - // Even so, the client link appears ok... Need to figure out the discrepancy -U + // Even so, the client link appears ok... Need to figure out the discrepancy MakeAnyLenString(&ret_link, "%1X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%05X" "%1X" "%1X" "%04X" "%1X" "%05X" "%08X", 0, item->ID, @@ -1793,14 +1793,14 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) { // with any luck..this won't be needed in the future // resync the 'from' and 'to' slots on an as-needed basis - // Not as effective as the full process, but less intrusive to gameplay -U + // Not as effective as the full process, but less intrusive to gameplay Log.Out(Logs::Detail, Logs::Inventory, "Inventory desyncronization. (charname: %s, source: %i, destination: %i)", GetName(), move_slots->from_slot, move_slots->to_slot); Message(15, "Inventory Desyncronization detected: Resending slot data..."); if((move_slots->from_slot >= EmuConstants::EQUIPMENT_BEGIN && move_slots->from_slot <= EmuConstants::CURSOR_BAG_END) || move_slots->from_slot == MainPowerSource) { int16 resync_slot = (Inventory::CalcSlotId(move_slots->from_slot) == INVALID_INDEX) ? move_slots->from_slot : Inventory::CalcSlotId(move_slots->from_slot); if (IsValidSlot(resync_slot) && resync_slot != INVALID_INDEX) { - // This prevents the client from crashing when closing any 'phantom' bags -U + // This prevents the client from crashing when closing any 'phantom' bags const Item_Struct* token_struct = database.GetItem(22292); // 'Copper Coin' ItemInst* token_inst = database.CreateItem(token_struct, 1); @@ -2297,7 +2297,7 @@ void Client::RemoveDuplicateLore(bool client_update) safe_delete(inst); } - // Shared Bank and Shared Bank Containers are not checked due to their allowing duplicate lore items -U + // Shared Bank and Shared Bank Containers are not checked due to their allowing duplicate lore items if (!m_inv.CursorEmpty()) { std::list local_1; @@ -2367,7 +2367,7 @@ void Client::MoveSlotNotAllowed(bool client_update) safe_delete(inst); } - // No need to check inventory, cursor, bank or shared bank since they allow max item size and containers -U + // No need to check inventory, cursor, bank or shared bank since they allow max item size and containers // Code can be added to check item size vs. container size, but it is left to attrition for now. } diff --git a/zone/trading.cpp b/zone/trading.cpp index 91d9c8a8a..0e44a91bc 100644 --- a/zone/trading.cpp +++ b/zone/trading.cpp @@ -108,7 +108,7 @@ void Trade::AddEntity(uint16 trade_slot_id, uint32 stack_size) { ItemInst* inst2 = client->GetInv().GetItem(trade_slot_id); // it looks like the original code attempted to allow stacking... - // (it just didn't handle partial stack move actions -U) + // (it just didn't handle partial stack move actions) if (stack_size > 0) { if (!inst->IsStackable() || !inst2 || !inst2->GetItem() || (inst->GetID() != inst2->GetID()) || (stack_size > inst->GetCharges())) { client->Kick(); @@ -800,7 +800,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st // QS code if(RuleB(QueryServ, PlayerLogTrades) && event_entry && event_details) { // Currently provides only basic functionality. Calling method will also - // need to be modified before item returns and rewards can be logged. -U + // need to be modified before item returns and rewards can be logged. qs_audit = (QSPlayerLogHandin_Struct*)event_entry; qs_log = true; @@ -819,7 +819,7 @@ void Client::FinishTrade(Mob* tradingWith, bool finalizer, void* event_entry, st qs_audit->npc_count = 0; } - if(qs_log) { // This can be incorporated below when revisions are made -U + if(qs_log) { // This can be incorporated below when revisions are made for (int16 trade_slot = EmuConstants::TRADE_BEGIN; trade_slot <= EmuConstants::TRADE_NPC_END; ++trade_slot) { const ItemInst* trade_inst = m_inv[trade_slot]; From 0b6d71181fe89db14d6e2b310982cd9bc7929060 Mon Sep 17 00:00:00 2001 From: Uleat Date: Tue, 24 Feb 2015 00:52:18 -0500 Subject: [PATCH 6/7] Added safety check to DraggedCorpses list iteration in Client::DraggedCorpses() --- zone/client.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zone/client.cpp b/zone/client.cpp index 4b813c1b2..93ef853d0 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -6220,6 +6220,8 @@ void Client::DragCorpses() !corpse->CastToCorpse()->Summon(this, false, false)) { Message_StringID(MT_DefaultText, CORPSEDRAG_STOP); It = DraggedCorpses.erase(It); + if (It == DraggedCorpses.end()) + break; } } } From e47f9d95b010595fc856737bdf2c5cb08c6c3de9 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 24 Feb 2015 16:26:25 -0500 Subject: [PATCH 7/7] Fix title/suffix for RoF/RoF2 --- common/patches/rof.cpp | 4 ++-- common/patches/rof2.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 22414d6e5..0495935b1 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -3844,8 +3844,8 @@ namespace RoF PacketSize += strlen(emu->name); PacketSize += strlen(emu->lastName); - emu->title[0] = 0; - emu->suffix[0] = 0; + emu->title[31] = 0; + emu->suffix[31] = 0; if (strlen(emu->title)) PacketSize += strlen(emu->title) + 1; diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 59c0258a9..9e0bd9c8a 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -3985,8 +3985,8 @@ namespace RoF2 PacketSize += strlen(emu->name); PacketSize += strlen(emu->lastName); - emu->title[0] = 0; - emu->suffix[0] = 0; + emu->title[31] = 0; + emu->suffix[31] = 0; if (strlen(emu->title)) PacketSize += strlen(emu->title) + 1;