From 8615df0a039c20b63fc40f5061d9a25e392e03db Mon Sep 17 00:00:00 2001 From: Natedog2012 Date: Sat, 25 Jun 2016 18:04:23 -0700 Subject: [PATCH] Bot names skip player name filter to allow for longer bot names. RoF/RoF2/UF item packets allow for 1000 stack items again.. not capped at 254 --- common/patches/rof.cpp | 2 +- common/patches/rof2.cpp | 2 +- common/patches/uf.cpp | 2 +- zone/bot_database.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index b60e0534f..0b45b98e6 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -5209,7 +5209,7 @@ namespace RoF snprintf(hdr.unknown000, sizeof(hdr.unknown000), "%016d", item->ID); - hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 254) ? 0xFFFFFFFF : inst->GetCharges()) : 1); + hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 1000) ? 0xFFFFFFFF : inst->GetCharges()) : 1); hdr.unknown004 = 0; structs::InventorySlot_Struct slot_id = ServerToRoFSlot(slot_id_in); diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index 114238d83..57f823ce2 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -5497,7 +5497,7 @@ namespace RoF2 snprintf(hdr.unknown000, sizeof(hdr.unknown000), "%016d", item->ID); - hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 254) ? 0xFFFFFFFF : inst->GetCharges()) : 1); + hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 1000) ? 0xFFFFFFFF : inst->GetCharges()) : 1); hdr.unknown004 = 0; structs::InventorySlot_Struct slot_id = ServerToRoF2Slot(slot_id_in, packet_type); diff --git a/common/patches/uf.cpp b/common/patches/uf.cpp index 2756ae6dd..d613c8867 100644 --- a/common/patches/uf.cpp +++ b/common/patches/uf.cpp @@ -3845,7 +3845,7 @@ namespace UF UF::structs::ItemSerializationHeader hdr; - hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 254) ? 0xFFFFFFFF : inst->GetCharges()) : 1); + hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 1000) ? 0xFFFFFFFF : inst->GetCharges()) : 1); hdr.unknown004 = 0; int32 slot_id = ServerToUFSlot(slot_id_in); diff --git a/zone/bot_database.cpp b/zone/bot_database.cpp index 3f8a60c0d..7a746c721 100644 --- a/zone/bot_database.cpp +++ b/zone/bot_database.cpp @@ -86,7 +86,7 @@ bool BotDatabase::LoadBotCommandSettings(std::map 15 || !database.CheckNameFilter(bot_name.c_str()) || !database.CheckUsedName(bot_name.c_str())) + if (bot_name.empty() || bot_name.size() > 60 || !database.CheckUsedName(bot_name.c_str())) return false; query = StringFormat("SELECT `id` FROM `vw_bot_character_mobs` WHERE `name` LIKE '%s' LIMIT 1", bot_name.c_str());