mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
* test * complete * Update effects.cpp * Update spells.cpp * Update effects.cpp * [Spells] Support for bards using Disciplines while casting or /melody. Support for spell field 'cast not standing' not allow casting from divine aura * [Spells] Support for bards using Disciplines while casting or /melody. DA bypass logic for spells with field 'cast_not_standing' * updates * stun and mez bypass * Update spdat.cpp * Update spdat.cpp * Update spells.cpp * clean * requirement messages * update * pct * save work * Reform code 1_22_22 * updated * update id to pointer * Update spells.cpp * rework 2 * update 1_23_22 * Update spells.cpp * updates * msg string works * fix disc timers not be set * more optimization * update 1_23_22 PM moved stop casting out charm and harmony moved in * update 1_25_22 rework of functions * updates 1_26_22 * remove old checks * gm override added for some * update bard AA casting checks * updates * addbuff exception for bard * debugs * charm working * update * moved skill check here * cast from item while singing * lets not attack mounts * instant cast items click * aug clicks working * aug tests Bug? Cast time not display on aug clicks for bards * aug recast from items semi ok * added item timer function * unified setting item recast timer * clean up time * update * bard AA cast updates * debugs removed * debugs removed * clean up * clean up * better placement of bindsight and numhits fix * move and rename function * Update spells.cpp * add logs * delete old DoCastingChecks * Removed old bard pulse functions * remove AEBardPulse and GroupPulse * removed Raid::GroupBardPulse * Pulse Restriction: Divine Aura * Pulse Restrictions : Fear behavior * Update spells.cpp * Update spells.cpp * [Spells] Major update to Bard song pulsing, Bard item clicks while singing, and spell casting restriction logic. bots... * [Spells] Major update to Bard song pulsing, Bard item clicks while singing, and spell casting restriction logic. added recommended isvalidspell check * [Spells] Major update to Bard song pulsing, Bard item clicks while singing, and spell casting restriction logic. merged * [Spells] Major update to Bard song pulsing, Bard item clicks while singing, and spell casting restriction logic. removed defines since we have them as constants
184 lines
7.5 KiB
C++
184 lines
7.5 KiB
C++
/* EQEMu: Everquest Server Emulator
|
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemu.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
|
|
*/
|
|
#ifndef GROUPS_H
|
|
#define GROUPS_H
|
|
|
|
#include "../common/eq_packet_structs.h"
|
|
#include "../common/types.h"
|
|
|
|
#include "mob.h"
|
|
#include "xtargetautohaters.h"
|
|
|
|
class Client;
|
|
class EQApplicationPacket;
|
|
class Mob;
|
|
|
|
#define MAX_MARKED_NPCS 3
|
|
|
|
enum { RoleAssist = 1, RoleTank = 2, RolePuller = 4 };
|
|
|
|
class GroupIDConsumer {
|
|
public:
|
|
GroupIDConsumer() { id = 0; }
|
|
GroupIDConsumer(uint32 gid) { id = gid; }
|
|
inline const uint32 GetID() const { return id; }
|
|
|
|
protected:
|
|
friend class EntityList;
|
|
//use of this function is highly discouraged
|
|
inline void SetID(uint32 set_id) { id = set_id; }
|
|
private:
|
|
uint32 id;
|
|
};
|
|
|
|
class Group : public GroupIDConsumer {
|
|
public:
|
|
Group(Mob* leader);
|
|
Group(uint32 gid);
|
|
~Group();
|
|
|
|
bool AddMember(Mob* newmember, const char* NewMemberName = nullptr, uint32 CharacterID = 0, bool ismerc = false);
|
|
void AddMember(const char* NewMemberName);
|
|
void SendUpdate(uint32 type,Mob* member);
|
|
void SendLeadershipAAUpdate();
|
|
void SendWorldGroup(uint32 zone_id,Mob* zoningmember);
|
|
bool DelMemberOOZ(const char *Name);
|
|
bool DelMember(Mob* oldmember,bool ignoresender = false);
|
|
void DisbandGroup(bool joinraid = false);
|
|
void GetMemberList(std::list<Mob*>& member_list, bool clear_list = true);
|
|
void GetClientList(std::list<Client*>& client_list, bool clear_list = true);
|
|
#ifdef BOTS
|
|
void GetBotList(std::list<Bot*>& bot_list, bool clear_list = true);
|
|
#endif
|
|
bool IsGroupMember(Mob* client);
|
|
bool IsGroupMember(const char *Name);
|
|
bool Process();
|
|
bool IsGroup() { return true; }
|
|
void SendGroupJoinOOZ(Mob* NewMember);
|
|
void CastGroupSpell(Mob* caster,uint16 spellid);
|
|
void SplitExp(uint32 exp, Mob* other);
|
|
void GroupMessage(Mob* sender,uint8 language,uint8 lang_skill,const char* message);
|
|
void GroupMessageString(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
|
|
uint32 GetTotalGroupDamage(Mob* other);
|
|
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Client *splitter = nullptr);
|
|
inline void SetLeader(Mob* newleader){ leader=newleader; };
|
|
inline Mob* GetLeader() { return leader; };
|
|
const char* GetLeaderName() { return membername[0]; };
|
|
void SendHPManaEndPacketsTo(Mob* newmember);
|
|
void SendHPPacketsFrom(Mob* member);
|
|
void SendManaPacketFrom(Mob* member);
|
|
void SendEndurancePacketFrom(Mob* member);
|
|
bool UpdatePlayer(Mob* update);
|
|
void MemberZoned(Mob* removemob);
|
|
inline bool IsLeader(Mob* leadertest) { return leadertest==leader; };
|
|
uint8 GroupCount();
|
|
uint32 GetHighestLevel();
|
|
uint32 GetLowestLevel();
|
|
void QueuePacket(const EQApplicationPacket *app, bool ack_req = true);
|
|
void TeleportGroup(Mob* sender, uint32 zoneID, uint16 instance_id, float x, float y, float z, float heading);
|
|
uint16 GetAvgLevel();
|
|
bool LearnMembers();
|
|
void VerifyGroup();
|
|
void BalanceHP(int32 penalty, float range = 0, Mob* caster = nullptr, int32 limit = 0);
|
|
void BalanceMana(int32 penalty, float range = 0, Mob* caster = nullptr, int32 limit = 0);
|
|
void HealGroup(uint32 heal_amt, Mob* caster, float range = 0);
|
|
inline void SetGroupAAs(GroupLeadershipAA_Struct *From) { memcpy(&LeaderAbilities, From, sizeof(GroupLeadershipAA_Struct)); }
|
|
inline void GetGroupAAs(GroupLeadershipAA_Struct *Into) { memcpy(Into, &LeaderAbilities, sizeof(GroupLeadershipAA_Struct)); }
|
|
void UpdateGroupAAs();
|
|
void SaveGroupLeaderAA();
|
|
void MarkNPC(Mob* Target, int Number);
|
|
int8 GetNumberNeedingHealedInGroup(int8 hpr, bool includePets);
|
|
void DelegateMainTank(const char *NewMainAssistName, uint8 toggle = 0);
|
|
void DelegateMainAssist(const char *NewMainAssistName, uint8 toggle = 0);
|
|
void DelegatePuller(const char *NewMainAssistName, uint8 toggle = 0);
|
|
void UnDelegateMainTank(const char *OldMainAssistName, uint8 toggle = 0);
|
|
void UnDelegateMainAssist(const char *OldMainAssistName, uint8 toggle = 0);
|
|
void UnDelegatePuller(const char *OldMainAssistName, uint8 toggle = 0);
|
|
bool IsNPCMarker(Client *c);
|
|
void SetGroupAssistTarget(Mob *m);
|
|
void SetGroupTankTarget(Mob *m);
|
|
void SetGroupPullerTarget(Mob *m);
|
|
bool HasRole(Mob *m, uint8 Role);
|
|
void NotifyAssistTarget(Client *c);
|
|
void NotifyTankTarget(Client *c);
|
|
void NotifyPullerTarget(Client *c);
|
|
void DelegateMarkNPC(const char *NewNPCMarkerName);
|
|
void UnDelegateMarkNPC(const char *OldNPCMarkerName);
|
|
void NotifyMainTank(Client *c, uint8 toggle = 0);
|
|
void NotifyMainAssist(Client *c, uint8 toggle = 0);
|
|
void NotifyPuller(Client *c, uint8 toggle = 0);
|
|
void NotifyMarkNPC(Client *c);
|
|
inline uint32 GetNPCMarkerID() { return NPCMarkerID; }
|
|
void SetMainTank(const char *NewMainTankName);
|
|
void SetMainAssist(const char *NewMainAssistName);
|
|
void SetPuller(const char *NewPullerName);
|
|
const char *GetMainTankName() { return MainTankName.c_str(); }
|
|
const char *GetMainAssistName() { return MainAssistName.c_str(); }
|
|
const char *GetPullerName() { return PullerName.c_str(); }
|
|
bool AmIMainTank(const char *mob_name);
|
|
bool AmIMainAssist(const char *mob_name);
|
|
bool AmIPuller(const char *mob_name);
|
|
void SetNPCMarker(const char *NewNPCMarkerName);
|
|
void UnMarkNPC(uint16 ID);
|
|
void SendMarkedNPCsToMember(Client *c, bool Clear = false);
|
|
inline int GetLeadershipAA(int AAID) { return LeaderAbilities.ranks[AAID]; }
|
|
void ClearAllNPCMarks();
|
|
void QueueHPPacketsForNPCHealthAA(Mob* sender, const EQApplicationPacket* app);
|
|
void QueueClients(Mob *sender, const EQApplicationPacket *app, bool ack_required = true, bool ignore_sender = true, float distance = 0);
|
|
void ChangeLeader(Mob* newleader);
|
|
const char *GetClientNameByIndex(uint8 index);
|
|
void UpdateXTargetMarkedNPC(uint32 Number, Mob *m);
|
|
void SetDirtyAutoHaters();
|
|
inline XTargetAutoHaters *GetXTargetAutoMgr() { return &m_autohatermgr; }
|
|
void JoinRaidXTarget(Raid *raid, bool first = false);
|
|
|
|
void SetGroupMentor(int percent, char *name);
|
|
void ClearGroupMentor();
|
|
inline int GetMentorPercent() { return mentor_percent; }
|
|
inline Client *GetMentoree() { return mentoree; }
|
|
|
|
bool DoesAnyMemberHaveExpeditionLockout(const std::string& expedition_name, const std::string& event_name, int max_check_count = 0);
|
|
|
|
Mob* members[MAX_GROUP_MEMBERS];
|
|
char membername[MAX_GROUP_MEMBERS][64];
|
|
uint8 MemberRoles[MAX_GROUP_MEMBERS];
|
|
bool disbandcheck;
|
|
bool castspell;
|
|
|
|
private:
|
|
Mob* leader;
|
|
GroupLeadershipAA_Struct LeaderAbilities;
|
|
std::string MainTankName;
|
|
std::string MainAssistName;
|
|
std::string PullerName;
|
|
std::string NPCMarkerName;
|
|
uint16 NPCMarkerID;
|
|
uint16 AssistTargetID;
|
|
uint16 TankTargetID;
|
|
uint16 PullerTargetID;
|
|
uint16 MarkedNPCs[MAX_MARKED_NPCS];
|
|
|
|
std::string mentoree_name;
|
|
Client *mentoree;
|
|
int mentor_percent;
|
|
|
|
XTargetAutoHaters m_autohatermgr;
|
|
};
|
|
|
|
#endif
|