mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 19:46:35 +00:00
[Feature] Update raid features (#3443)
* [RAID] Add Raid Features [RAID] Add Raid Features - Add delegate main assist - Add delegate main marker - Add target ring for main assisters. Uses MA1, then MA2, then MA3 - Add /assist raid respecting /assist on and /assist off - Add Raid Notes. Functions across zones - Add Raid XTarget functional - Raid Leader can mark without being delegated Main Marker. Must have the appropriate AA * Update to new db routines * Updated several formatting issues based on review * Update to pp->tribute_time_remaining to avoid edge case. Unrelated to raid updates. * Updates to resolve comments/review. Added a few edge case updates as well. * Refactored to use database repositories for raid_details and raid_members. Other updates as noted in review. * Updated database manifest and fixed potential leak within Client::Handle_OP_AssistGroup * Update for remaining review items * Refactor SendAssistTarget to use struct/vector loop * Have IsAssister use range based for loop and return bool * General cleanup * Simplify SendRaidAssistTarget to use struct / vector * Formatting in Handle_OP_RaidDelegateAbility * Format SendRemoveRaidXTargets and clean up error statements * Format SendRemoveAllRaidXTargets * Formatting * Default return FindNextRaidDelegateSlot to -1 * Change fields to marked_npc_1/2/3 (missing last underscore) --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
+69
-1
@@ -21,6 +21,7 @@
|
||||
#include "../common/types.h"
|
||||
#include "groups.h"
|
||||
#include "xtargetautohaters.h"
|
||||
#include "client.h"
|
||||
|
||||
class Client;
|
||||
class EQApplicationPacket;
|
||||
@@ -75,9 +76,46 @@ enum { //raid command types
|
||||
RaidCommandSetNote = 36,
|
||||
};
|
||||
|
||||
enum {
|
||||
FindNextMarkerSlot = 1,
|
||||
FindNextAssisterSlot = 2,
|
||||
RaidDelegateMainAssist = 3,
|
||||
RaidDelegateMainMarker = 4
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
MAIN_ASSIST_1_SLOT = 0,
|
||||
MAIN_ASSIST_2_SLOT = 1,
|
||||
MAIN_ASSIST_3_SLOT = 2,
|
||||
MAIN_ASSIST_1 = 1,
|
||||
MAIN_ASSIST_2 = 2,
|
||||
MAIN_ASSIST_3 = 3,
|
||||
} MainAssistType;
|
||||
|
||||
typedef enum {
|
||||
MAIN_MARKER_1_SLOT = 0,
|
||||
MAIN_MARKER_2_SLOT = 1,
|
||||
MAIN_MARKER_3_SLOT = 2,
|
||||
MAIN_MARKER_1 = 1,
|
||||
MAIN_MARKER_2 = 2,
|
||||
MAIN_MARKER_3 = 3,
|
||||
} MainMarkerType;
|
||||
|
||||
enum {
|
||||
ClearDelegate = 1,
|
||||
SetDelegate = 0,
|
||||
FindNextRaidMainMarkerSlot = 1,
|
||||
FindNextRaidMainAssisterSlot = 2,
|
||||
DELEGATE_OFF = 0,
|
||||
DELEGATE_ON = 1
|
||||
};
|
||||
|
||||
|
||||
constexpr uint8_t MAX_RAID_GROUPS = 12;
|
||||
constexpr uint8_t MAX_RAID_MEMBERS = 72;
|
||||
const uint32 RAID_GROUPLESS = 0xFFFFFFFF;
|
||||
#define MAX_NO_RAID_MAIN_ASSISTERS 3
|
||||
#define MAX_NO_RAID_MAIN_MARKERS 3
|
||||
|
||||
struct RaidMember{
|
||||
char member_name[64];
|
||||
@@ -85,9 +123,12 @@ struct RaidMember{
|
||||
uint32 group_number;
|
||||
uint8 _class;
|
||||
uint8 level;
|
||||
char note[64];
|
||||
bool is_group_leader;
|
||||
bool is_raid_leader;
|
||||
bool is_looter;
|
||||
uint8 main_marker;
|
||||
uint8 main_assister;
|
||||
bool is_bot = false;
|
||||
bool is_raid_main_assist_one = false;
|
||||
};
|
||||
@@ -131,6 +172,8 @@ public:
|
||||
bool IsRaidMember(Client *c);
|
||||
void UpdateLevel(const char *name, int newLevel);
|
||||
void SetNewRaidLeader(uint32 i);
|
||||
bool IsAssister(const char* who);
|
||||
bool IsMarker(const char* who);
|
||||
|
||||
uint32 GetFreeGroup();
|
||||
uint8 GroupCount(uint32 gid);
|
||||
@@ -188,6 +231,17 @@ public:
|
||||
void SendEndurancePacketFrom(Mob *mob);
|
||||
void RaidSay(const char *msg, Client *c, uint8 language, uint8 lang_skill);
|
||||
void RaidGroupSay(const char *msg, Client *c, uint8 language, uint8 lang_skill);
|
||||
void SaveRaidNote(std::string who, std::string note);
|
||||
std::vector<RaidMember> GetMembersWithNotes();
|
||||
void DelegateAbilityAssist(Mob* mob, const char* who);
|
||||
void DelegateAbilityMark(Mob* mob, const char* who);
|
||||
void RaidMarkNPC(Mob* mob, uint32 parameter);
|
||||
void UpdateXTargetType(XTargetType Type, Mob* m, const char* name = (const char*)nullptr);
|
||||
int FindNextRaidDelegateSlot(int option);
|
||||
void UpdateXtargetMarkedNPC();
|
||||
void RaidClearNPCMarks(Client* c);
|
||||
void RemoveRaidDelegates(const char* delegatee);
|
||||
void UpdateRaidXTargets();
|
||||
|
||||
//Packet Functions
|
||||
void SendRaidCreate(Client *to);
|
||||
@@ -200,7 +254,13 @@ public:
|
||||
void SendRaidMove(const char* who, Client *to);
|
||||
void SendRaidMoveAll(const char* who);
|
||||
void SendBulkRaid(Client *to);
|
||||
|
||||
void SendRaidNotes();
|
||||
void SendRaidNotesToWorld();
|
||||
void SendRemoveRaidXTargets(XTargetType Type);
|
||||
void SendRemoveAllRaidXTargets();
|
||||
void SendRemoveAllRaidXTargets(const char* client_name);
|
||||
void SendRaidAssistTarget();
|
||||
void SendAssistTarget(Client* c);
|
||||
void GroupUpdate(uint32 gid, bool initial = true);
|
||||
void SendGroupUpdate(Client *to);
|
||||
void SendGroupDisband(Client *to);
|
||||
@@ -218,6 +278,11 @@ public:
|
||||
void SendRaidMOTD(Client *c);
|
||||
void SendRaidMOTD();
|
||||
void SendRaidMOTDToWorld();
|
||||
void SendRaidAssisterTo(const char* assister, Client* to);
|
||||
void SendRaidAssister(const char* assister);
|
||||
void SendRaidMarkerTo(const char* marker, Client* to);
|
||||
void SendRaidMarker(const char* marker);
|
||||
void SendMarkTargets(Client* c);
|
||||
|
||||
void QueuePacket(const EQApplicationPacket *app, bool ack_req = true);
|
||||
|
||||
@@ -259,6 +324,9 @@ public:
|
||||
|
||||
RaidMember members[MAX_RAID_MEMBERS];
|
||||
char leadername[64];
|
||||
char main_assister_pcs[MAX_NO_RAID_MAIN_ASSISTERS][64];
|
||||
char main_marker_pcs[MAX_NO_RAID_MAIN_MARKERS][64];
|
||||
uint32 marked_npcs[MAX_MARKED_NPCS];
|
||||
protected:
|
||||
Client *leader;
|
||||
bool locked;
|
||||
|
||||
Reference in New Issue
Block a user