mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 07:16:37 +00:00
Partial implementation of leadership in raids
Currently working: stat bonuses and client side only effects Currently not working: Mark NPC and others that need more server side work Currently only tested on UF, Ti and 62 may work, but not tested SoF, SoD, and RoF need packet translators, which are most likely the same as UF
This commit is contained in:
+22
-2
@@ -43,8 +43,8 @@ enum { //raid packet types:
|
||||
raidChangeLootType = 11,
|
||||
raidStringID = 12,
|
||||
raidChangeGroupLeader = 13, //136 raid leader, new group leader, group_id?
|
||||
raidBecomeGroupLeader = 14, //472
|
||||
raidUnknown2 = 15,
|
||||
raidSetLeaderAbilities = 14, //472
|
||||
raidSetLeaderData = 15, // 14,15 SoE names, not sure on difference, 14 packet has 0x100 bytes 15 0x214 in addition to raid general
|
||||
raidChangeGroup = 16, //?? len 136 old leader, new leader, 0 (preceeded with a remove2)
|
||||
raidLock = 17, //len 136 leader?, leader, 0
|
||||
raidUnlock = 18, //len 136 leader?, leader, 0
|
||||
@@ -79,6 +79,7 @@ enum { //raid command types
|
||||
|
||||
#define MAX_RAID_GROUPS 12
|
||||
#define MAX_RAID_MEMBERS 72
|
||||
const uint32 RAID_GROUPLESS = 0xFFFFFFFF;
|
||||
|
||||
struct RaidMember{
|
||||
char membername[64];
|
||||
@@ -111,6 +112,7 @@ public:
|
||||
void DisbandRaid();
|
||||
void MoveMember(const char *name, uint32 newGroup);
|
||||
void SetGroupLeader(const char *who, bool glFlag = true);
|
||||
Client *GetGroupLeader(uint32 group_id);
|
||||
void RemoveGroupLeader(const char *who);
|
||||
bool IsGroupLeader(const char *who);
|
||||
bool IsRaidMember(const char *name);
|
||||
@@ -203,6 +205,22 @@ public:
|
||||
|
||||
void QueuePacket(const EQApplicationPacket *app, bool ack_req = true);
|
||||
|
||||
// Leadership
|
||||
void UpdateGroupAAs(uint32 gid);
|
||||
void SaveGroupLeaderAA(uint32 gid);
|
||||
void UpdateRaidAAs();
|
||||
void SaveRaidLeaderAA();
|
||||
void SendGroupLeadershipAA(Client *c, uint32 gid);
|
||||
void SendGroupLeadershipAA(uint32 gid);
|
||||
void SendAllRaidLeadershipAA();
|
||||
void LoadLeadership();
|
||||
inline int GetLeadershipAA(int AAID, uint32 gid = 0)
|
||||
{ if (AAID >= 16) return raid_aa.ranks[AAID - 16]; else return group_aa[gid].ranks[AAID]; }
|
||||
inline void SetGroupAAs(uint32 gid, GroupLeadershipAA_Struct *glaa)
|
||||
{ memcpy(&group_aa[gid], glaa, sizeof(GroupLeadershipAA_Struct)); }
|
||||
inline void SetRaidAAs(RaidLeadershipAA_Struct *rlaa)
|
||||
{ memcpy(&raid_aa, rlaa, sizeof(RaidLeadershipAA_Struct)); }
|
||||
|
||||
RaidMember members[MAX_RAID_MEMBERS];
|
||||
char leadername[64];
|
||||
protected:
|
||||
@@ -213,6 +231,8 @@ protected:
|
||||
bool disbandCheck;
|
||||
bool forceDisband;
|
||||
std::string motd;
|
||||
RaidLeadershipAA_Struct raid_aa;
|
||||
GroupLeadershipAA_Struct group_aa[MAX_RAID_GROUPS];
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user