diff --git a/zone/bot.cpp b/zone/bot.cpp index 48f9fc9a1..17bdc2cae 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -15372,7 +15372,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { if(!strcasecmp(sep->arg[1], "stance")) { if(sep->argnum == 3){ - Bot* tempBot; + Bot* tempBot = NULL; std::string botName = std::string(sep->arg[2]); if(!botName.empty()) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 07771f1e7..49e12374d 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -13503,19 +13503,20 @@ void Client::Handle_OP_MercenaryDataRequest(const EQApplicationPacket *app) } NPC* tar = entity_list.GetNPCByID(merchant_id); - if(tar) { + + if(tar) { int mercTypeCount = 0; int mercCount = 0; + if(DistNoRoot(*tar) > USE_NPC_RANGE2) + return; + + if(tar->GetClass() != MERCERNARY_MASTER) { + return; + } + MercenaryMerchantList_Struct* mml = new MercenaryMerchantList_Struct; - if(DistNoRoot(*tar) > USE_NPC_RANGE2) - return; - - if(tar->GetClass() != MERCERNARY_MASTER) { - return; - } - mercTypeCount = tar->GetNumMercTypes(GetClientVersion()); mercCount = tar->GetNumMercs(GetClientVersion()); diff --git a/zone/merc.cpp b/zone/merc.cpp index 3dd9f8e3e..01a4ff1b4 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -5165,12 +5165,9 @@ bool Merc::Unsuspend(bool setMaxStats) { return true; } -bool Merc::Dismiss() { - Client* mercOwner; +bool Merc::Dismiss(){ - if(GetMercOwner()) { - mercOwner = GetMercOwner(); - } + Client* mercOwner = GetMercOwner(); if(!mercOwner) return false;