diff --git a/zone/attack.cpp b/zone/attack.cpp index c2286d341..b2bd97395 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3839,7 +3839,7 @@ void Mob::CommonDamage(Mob* attacker, int& damage, const uint16 spell_id, const if (!FromDamageShield) { #ifdef BOTS // If a bot is the attacker, send a damage message ot the Bot Owner - if (spell_id != SPELL_UNKNOWN && damage > 0 && !Critical && attacker && attacker != this && attacker->IsBot() && RuleB(Bots, DisplaySpellDamage)) { + if (attacker->GetTarget() && spell_id != SPELL_UNKNOWN && damage > 0 && !Critical && attacker && attacker != this && attacker->IsBot() && RuleB(Bots, DisplaySpellDamage)) { attacker->CastToBot()->GetBotOwner()->FilteredMessageString( attacker->CastToBot()->GetBotOwner(), Chat::DotDamage, @@ -3894,7 +3894,7 @@ void Mob::CommonDamage(Mob* attacker, int& damage, const uint16 spell_id, const } #ifdef BOTS // If a bot is the attacker, send a damage message ot the Bot Owner - else if (spell_id != SPELL_UNKNOWN && attacker->IsBot() && damage > 0 && !Critical && attacker && attacker != this && RuleB(Bots, DisplaySpellDamage)) { + else if (attacker->GetTarget() && spell_id != SPELL_UNKNOWN && attacker->IsBot() && damage > 0 && !Critical && attacker && attacker != this && RuleB(Bots, DisplaySpellDamage)) { attacker->CastToBot()->GetBotOwner()->FilteredMessageString( attacker->CastToBot()->GetBotOwner(), Chat::DotDamage, diff --git a/zone/bot.h b/zone/bot.h index 4edf3d4a1..ffb50fe87 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -387,7 +387,6 @@ public: static void ProcessRaidInvite(Bot* invitee, Client* invitor); //Mitch static void ProcessRaidInvite(Client* invitee, Client* invitor); //Mitch uint8 GetNumberNeedingHealedInRaidGroup(uint8 hpr, bool includePets); //Mitch - bool m_dirtyautohaters; inline void SetDirtyAutoHaters() { m_dirtyautohaters = true; } static std::list GetBotSpellsForSpellEffect(Bot* botCaster, int spellEffect); @@ -677,6 +676,7 @@ private: Timer m_auto_defend_timer; //Timer m_combat_jitter_timer; //bool m_combat_jitter_flag; + bool m_dirtyautohaters; bool m_guard_flag; bool m_hold_flag; bool m_attack_flag; @@ -743,6 +743,7 @@ private: public: static uint8 spell_casting_chances[SPELL_TYPE_COUNT][PLAYER_CLASS_COUNT][EQ::constants::STANCE_TYPE_COUNT][cntHSND]; + }; #endif // BOTS diff --git a/zone/exp.cpp b/zone/exp.cpp index 608a7c4ad..b625935e6 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -1089,7 +1089,7 @@ void Raid::SplitExp(uint32 exp, Mob* other) { return; for (unsigned int x = 0; x < MAX_RAID_MEMBERS; x++) { - if (members[x].member != nullptr) // If Group Member is Client + if (members[x].member != nullptr && members[x].member->CastToBot()->GetBotID() == 0) // If Group Member is Client { Client *cmember = members[x].member; // add exp + exp cap diff --git a/zone/mob.cpp b/zone/mob.cpp index c51d372f2..efaf619ef 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -3033,8 +3033,7 @@ void Mob::QuestJournalledSay(Client *QuestInitiator, const char *str, Journal::O const char *Mob::GetCleanName() { if (clean_name != NULL && !strlen(clean_name)) { //extra check added for crash condition. Mitch - if (this) - CleanMobName(GetName(), clean_name); + CleanMobName(GetName(), clean_name); } return clean_name; diff --git a/zone/raids.cpp b/zone/raids.cpp index 657c8a604..23f0b2740 100644 --- a/zone/raids.cpp +++ b/zone/raids.cpp @@ -1750,7 +1750,7 @@ void Raid::SendHPManaEndPacketsFrom(Mob *mob) mob->CreateHPPacket(&hpapp); for(int x = 0; x < MAX_RAID_MEMBERS; x++) { - if(members[x].member) { + if(members[x].member && members[x].member->CastToBot()->GetBotID() == 0 ) { if(!mob->IsClient() || ((members[x].member != mob->CastToClient()) && (members[x].GroupNumber == group_id))) { members[x].member->QueuePacket(&hpapp, false); if (members[x].member->IsClient() && members[x].member->ClientVersion() >= EQ::versions::ClientVersion::SoD) { //Mitch @@ -1810,7 +1810,7 @@ void Raid::SendEndurancePacketFrom(Mob *mob) EQApplicationPacket outapp(OP_MobManaUpdate, sizeof(MobManaUpdate_Struct)); for (int x = 0; x < MAX_RAID_MEMBERS; x++) { - if (members[x].member) { + if (members[x].member && members[x].member->CastToBot()->GetBotID() == 0) { if (!mob->IsClient() || ((members[x].member != mob->CastToClient()) && (members[x].GroupNumber == group_id))) { if (members[x].member->ClientVersion() >= EQ::versions::ClientVersion::SoD) { outapp.SetOpcode(OP_MobEnduranceUpdate); @@ -1917,7 +1917,7 @@ void Raid::CheckGroupMentor(uint32 group_id, Client *c) void Raid::SetDirtyAutoHaters() { for (int i = 0; i < MAX_RAID_MEMBERS; ++i) - if (members[i].member) + if (members[i].member && members[i].member->CastToBot()->GetBotID() == 0) members[i].member->SetDirtyAutoHaters(); }