mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
More bot raid changes
This commit is contained in:
@@ -1,34 +0,0 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.org)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
are required to give you total support for your newly bought product;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef BOTS
|
|
||||||
|
|
||||||
#include "bot.h"
|
|
||||||
#include "bot_raid.h"
|
|
||||||
#include "object.h"
|
|
||||||
#include "raids.h"
|
|
||||||
#include "doors.h"
|
|
||||||
#include "quest_parser_collection.h"
|
|
||||||
#include "lua_parser.h"
|
|
||||||
#include "../common/string_util.h"
|
|
||||||
#include "../common/say_link.h"
|
|
||||||
|
|
||||||
extern volatile bool is_zone_loaded;
|
|
||||||
extern bool Critical;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
+6
-13
@@ -2300,7 +2300,11 @@ bool Bot::Process()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bot AI
|
// Bot AI
|
||||||
AI_Process();
|
Raid* raid = entity_list.GetRaidByBot(this);
|
||||||
|
if (raid)
|
||||||
|
AI_Process_Raid();
|
||||||
|
else
|
||||||
|
AI_Process();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -2540,12 +2544,10 @@ void Bot::AI_Process()
|
|||||||
Client* bot_owner = (GetBotOwner() && GetBotOwner()->IsClient() ? GetBotOwner()->CastToClient() : nullptr);
|
Client* bot_owner = (GetBotOwner() && GetBotOwner()->IsClient() ? GetBotOwner()->CastToClient() : nullptr);
|
||||||
Group* bot_group = GetGroup();
|
Group* bot_group = GetGroup();
|
||||||
|
|
||||||
Raid* bot_raid = entity_list.GetRaidByBot(this);
|
|
||||||
|
|
||||||
//#pragma region PRIMARY AI SKIP CHECKS
|
//#pragma region PRIMARY AI SKIP CHECKS
|
||||||
|
|
||||||
// Primary reasons for not processing AI
|
// Primary reasons for not processing AI
|
||||||
if (!bot_owner || (!bot_group && !bot_raid) || !IsAIControlled()) {
|
if (!bot_owner || (!bot_group) || !IsAIControlled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2563,15 +2565,6 @@ void Bot::AI_Process()
|
|||||||
if (bot_group) {
|
if (bot_group) {
|
||||||
leash_owner = (bot_group->GetLeader() && bot_group->GetLeader()->IsClient() ? bot_group->GetLeader()->CastToClient() : bot_owner);
|
leash_owner = (bot_group->GetLeader() && bot_group->GetLeader()->IsClient() ? bot_group->GetLeader()->CastToClient() : bot_owner);
|
||||||
}
|
}
|
||||||
else if (bot_raid) {
|
|
||||||
int bot_raid_group = bot_raid->GetGroup(GetName());
|
|
||||||
if (bot_raid_group > 0) {
|
|
||||||
leash_owner = bot_raid->GetGroupLeader(bot_raid_group)->CastToClient();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
leash_owner = bot_raid->GetLeader();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!leash_owner) {
|
if (!leash_owner) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
+6
-2
@@ -362,8 +362,6 @@ public:
|
|||||||
static std::string RaceIdToString(uint16 raceId);
|
static std::string RaceIdToString(uint16 raceId);
|
||||||
static bool IsBotAttackAllowed(Mob* attacker, Mob* target, bool& hasRuleDefined);
|
static bool IsBotAttackAllowed(Mob* attacker, Mob* target, bool& hasRuleDefined);
|
||||||
static Bot* GetBotByBotClientOwnerAndBotName(Client* c, std::string botName);
|
static Bot* GetBotByBotClientOwnerAndBotName(Client* c, std::string botName);
|
||||||
static void ProcessRaidInvite(Bot* invitee, Client* invitor); //Mitch
|
|
||||||
static void ProcessRaidInvite(Client* invitee, Client* invitor); //Mitch
|
|
||||||
static void ProcessBotGroupInvite(Client* c, std::string botName);
|
static void ProcessBotGroupInvite(Client* c, std::string botName);
|
||||||
static void ProcessBotGroupDisband(Client* c, std::string botName);
|
static void ProcessBotGroupDisband(Client* c, std::string botName);
|
||||||
static void BotOrderCampAll(Client* c);
|
static void BotOrderCampAll(Client* c);
|
||||||
@@ -381,6 +379,12 @@ public:
|
|||||||
static bool CheckDisciplineRecastTimers(Bot *caster, int timer_index);
|
static bool CheckDisciplineRecastTimers(Bot *caster, int timer_index);
|
||||||
static uint32 GetDisciplineRemainingTime(Bot *caster, int timer_index);
|
static uint32 GetDisciplineRemainingTime(Bot *caster, int timer_index);
|
||||||
|
|
||||||
|
//Raid methods
|
||||||
|
void PetAIProcess_Raid();
|
||||||
|
void AI_Process_Raid();
|
||||||
|
static void ProcessRaidInvite(Bot* invitee, Client* invitor); //Mitch
|
||||||
|
static void ProcessRaidInvite(Client* invitee, Client* invitor); //Mitch
|
||||||
|
|
||||||
static std::list<BotSpell> GetBotSpellsForSpellEffect(Bot* botCaster, int spellEffect);
|
static std::list<BotSpell> GetBotSpellsForSpellEffect(Bot* botCaster, int spellEffect);
|
||||||
static std::list<BotSpell> GetBotSpellsForSpellEffectAndTargetType(Bot* botCaster, int spellEffect, SpellTargetType targetType);
|
static std::list<BotSpell> GetBotSpellsForSpellEffectAndTargetType(Bot* botCaster, int spellEffect, SpellTargetType targetType);
|
||||||
static std::list<BotSpell> GetBotSpellsBySpellType(Bot* botCaster, uint32 spellType);
|
static std::list<BotSpell> GetBotSpellsBySpellType(Bot* botCaster, uint32 spellType);
|
||||||
|
|||||||
+1530
File diff suppressed because it is too large
Load Diff
@@ -16,8 +16,8 @@
|
|||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BOT_H
|
#ifndef BOT_RAID_H
|
||||||
#define BOT_H
|
#define BOT_RAID_H
|
||||||
|
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
|
|
||||||
@@ -38,9 +38,10 @@
|
|||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
extern WorldServer worldserver;
|
extern WorldServer worldserver;
|
||||||
|
|
||||||
|
//void Bot::PetAIProcess_Raid();
|
||||||
|
|
||||||
#endif // BOTS
|
#endif // BOTS
|
||||||
|
|
||||||
#endif // BOT_H
|
#endif // BOT_RAID_H
|
||||||
@@ -31,6 +31,13 @@
|
|||||||
|
|
||||||
bool Bot::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
bool Bot::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
||||||
|
|
||||||
|
// Bot AI
|
||||||
|
Raid* raid = entity_list.GetRaidByBot(this);
|
||||||
|
if (raid) {
|
||||||
|
AI_CastSpell_Raid();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!tar) {
|
if (!tar) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ public:
|
|||||||
bool IsGroupLeader(const char *who);
|
bool IsGroupLeader(const char *who);
|
||||||
bool IsRaidMember(const char *name);
|
bool IsRaidMember(const char *name);
|
||||||
void UpdateLevel(const char *name, int newLevel);
|
void UpdateLevel(const char *name, int newLevel);
|
||||||
|
std::vector<RaidMember> GetRaidGroupMembers(uint32 gid);
|
||||||
|
|
||||||
uint32 GetFreeGroup();
|
uint32 GetFreeGroup();
|
||||||
uint8 GroupCount(uint32 gid);
|
uint8 GroupCount(uint32 gid);
|
||||||
|
|||||||
Reference in New Issue
Block a user