mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Merge branch 'master' of https://github.com/EQEmu/Server
Conflicts: changelog.txt
This commit is contained in:
+162
-16
@@ -2952,11 +2952,20 @@ char* Database::GetGroupLeaderForLogin(const char* name, char* leaderbuf){
|
||||
}
|
||||
|
||||
void Database::SetGroupLeaderName(uint32 gid, const char* name) {
|
||||
std::string query = StringFormat("REPLACE INTO `group_leaders` SET `gid` = %lu, `leadername` = '%s'",(unsigned long)gid,name);
|
||||
auto results = QueryDatabase(query);
|
||||
std::string query = StringFormat("UPDATE group_leaders SET leadername = '%s' WHERE gid = %u", EscapeString(name).c_str(), gid);
|
||||
auto result = QueryDatabase(query);
|
||||
|
||||
if (!results.Success())
|
||||
std::cout << "Unable to set group leader: " << results.ErrorMessage() << std::endl;
|
||||
if(result.RowsAffected() != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
query = StringFormat("INSERT INTO group_leaders(gid, leadername, marknpc, leadershipaa, maintank, assist, puller) VALUES(%u, '%s', '', '', '', '', '')",
|
||||
gid, EscapeString(name).c_str());
|
||||
result = QueryDatabase(query);
|
||||
|
||||
if(!result.Success()) {
|
||||
LogFile->write(EQEMuLog::Debug, "Error in Database::SetGroupLeaderName: %s", result.ErrorMessage().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
char *Database::GetGroupLeadershipInfo(uint32 gid, char* leaderbuf, char* maintank, char* assist, char* puller, char *marknpc, GroupLeadershipAA_Struct* GLAA){
|
||||
@@ -3163,6 +3172,142 @@ const char* Database::GetRaidLeaderName(uint32 rid)
|
||||
return name;
|
||||
}
|
||||
|
||||
// maintank, assist, puller, marknpc currently unused
|
||||
void Database::GetGroupLeadershipInfo(uint32 gid, uint32 rid, char *maintank,
|
||||
char *assist, char *puller, char *marknpc, GroupLeadershipAA_Struct *GLAA)
|
||||
{
|
||||
std::string query = StringFormat(
|
||||
"SELECT maintank, assist, puller, marknpc, leadershipaa FROM raid_leaders WHERE gid = %lu AND rid = %lu",
|
||||
(unsigned long)gid, (unsigned long)rid);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (!results.Success() || results.RowCount() == 0) {
|
||||
if (maintank)
|
||||
maintank[0] = '\0';
|
||||
|
||||
if (assist)
|
||||
assist[0] = '\0';
|
||||
|
||||
if (puller)
|
||||
puller[0] = '\0';
|
||||
|
||||
if (marknpc)
|
||||
marknpc[0] = '\0';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
auto row = results.begin();
|
||||
|
||||
if (maintank)
|
||||
strcpy(maintank, row[0]);
|
||||
|
||||
if (assist)
|
||||
strcpy(assist, row[1]);
|
||||
|
||||
if (puller)
|
||||
strcpy(puller, row[2]);
|
||||
|
||||
if (marknpc)
|
||||
strcpy(marknpc, row[3]);
|
||||
|
||||
if (GLAA && results.LengthOfColumn(4) == sizeof(GroupLeadershipAA_Struct))
|
||||
memcpy(GLAA, row[4], sizeof(GroupLeadershipAA_Struct));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// maintank, assist, puller, marknpc currently unused
|
||||
void Database::GetRaidLeadershipInfo(uint32 rid, char *maintank,
|
||||
char *assist, char *puller, char *marknpc, RaidLeadershipAA_Struct *RLAA)
|
||||
{
|
||||
std::string query = StringFormat(
|
||||
"SELECT maintank, assist, puller, marknpc, leadershipaa FROM raid_leaders WHERE gid = %lu AND rid = %lu",
|
||||
(unsigned long)0xFFFFFFFF, (unsigned long)rid);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (!results.Success() || results.RowCount() == 0) {
|
||||
if (maintank)
|
||||
maintank[0] = '\0';
|
||||
|
||||
if (assist)
|
||||
assist[0] = '\0';
|
||||
|
||||
if (puller)
|
||||
puller[0] = '\0';
|
||||
|
||||
if (marknpc)
|
||||
marknpc[0] = '\0';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
auto row = results.begin();
|
||||
|
||||
if (maintank)
|
||||
strcpy(maintank, row[0]);
|
||||
|
||||
if (assist)
|
||||
strcpy(assist, row[1]);
|
||||
|
||||
if (puller)
|
||||
strcpy(puller, row[2]);
|
||||
|
||||
if (marknpc)
|
||||
strcpy(marknpc, row[3]);
|
||||
|
||||
if (RLAA && results.LengthOfColumn(4) == sizeof(RaidLeadershipAA_Struct))
|
||||
memcpy(RLAA, row[4], sizeof(RaidLeadershipAA_Struct));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void Database::SetRaidGroupLeaderInfo(uint32 gid, uint32 rid)
|
||||
{
|
||||
std::string query = StringFormat("UPDATE raid_leaders SET leadershipaa = '', WHERE gid = %lu AND rid = %lu",
|
||||
(unsigned long)gid, (unsigned long)rid);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (results.RowsAffected() != 0)
|
||||
return;
|
||||
|
||||
query = StringFormat("INSERT INTO raid_leaders(gid, rid, marknpc, leadershipaa, maintank, assist, puller) VALUES(%lu, %lu, '', '', '', '', '')",
|
||||
(unsigned long)gid, (unsigned long)rid);
|
||||
results = QueryDatabase(query);
|
||||
|
||||
if (!results.Success())
|
||||
std::cout << "Unable to set raid/group leader: " << results.ErrorMessage() << std::endl;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Clearing all raid leaders
|
||||
void Database::ClearAllRaidLeaders(void)
|
||||
{
|
||||
std::string query("DELETE from raid_leaders");
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (!results.Success())
|
||||
std::cout << "Unable to clear raid leaders: " << results.ErrorMessage() << std::endl;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void Database::ClearRaidLeader(uint32 gid, uint32 rid)
|
||||
{
|
||||
if (rid == 0) {
|
||||
ClearAllRaidLeaders();
|
||||
return;
|
||||
}
|
||||
|
||||
std::string query = StringFormat("DELETE from raid_leaders where gid = %lu and rid = %lu",
|
||||
(unsigned long)gid, (unsigned long)rid);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (!results.Success())
|
||||
std::cout << "Unable to clear raid leader: " << results.ErrorMessage() << std::endl;
|
||||
}
|
||||
|
||||
bool Database::VerifyInstanceAlive(uint16 instance_id, uint32 char_id)
|
||||
{
|
||||
//we are not saved to this instance so set our instance to 0
|
||||
@@ -3699,8 +3844,7 @@ void Database::UpdateAdventureStatsEntry(uint32 char_id, uint8 theme, bool win)
|
||||
QueryDatabase(query);
|
||||
}
|
||||
|
||||
bool Database::GetAdventureStats(uint32 char_id, uint32 &guk_w, uint32 &mir_w, uint32 &mmc_w, uint32 &ruj_w,
|
||||
uint32 &tak_w, uint32 &guk_l, uint32 &mir_l, uint32 &mmc_l, uint32 &ruj_l, uint32 &tak_l)
|
||||
bool Database::GetAdventureStats(uint32 char_id, AdventureStats_Struct *as)
|
||||
{
|
||||
|
||||
std::string query = StringFormat("SELECT `guk_wins`, `mir_wins`, `mmc_wins`, `ruj_wins`, `tak_wins`, `guk_losses`, "
|
||||
@@ -3715,16 +3859,18 @@ bool Database::GetAdventureStats(uint32 char_id, uint32 &guk_w, uint32 &mir_w, u
|
||||
|
||||
auto row = results.begin();
|
||||
|
||||
guk_w = atoi(row[0]);
|
||||
mir_w = atoi(row[1]);
|
||||
mmc_w = atoi(row[2]);
|
||||
ruj_w = atoi(row[3]);
|
||||
tak_w = atoi(row[4]);
|
||||
guk_l = atoi(row[5]);
|
||||
mir_l = atoi(row[6]);
|
||||
mmc_l = atoi(row[7]);
|
||||
ruj_l = atoi(row[8]);
|
||||
tak_l = atoi(row[9]);
|
||||
as->success.guk = atoi(row[0]);
|
||||
as->success.mir = atoi(row[1]);
|
||||
as->success.mmc = atoi(row[2]);
|
||||
as->success.ruj = atoi(row[3]);
|
||||
as->success.tak = atoi(row[4]);
|
||||
as->failure.guk = atoi(row[5]);
|
||||
as->failure.mir = atoi(row[6]);
|
||||
as->failure.mmc = atoi(row[7]);
|
||||
as->failure.ruj = atoi(row[8]);
|
||||
as->failure.tak = atoi(row[9]);
|
||||
as->failure.total = as->failure.guk + as->failure.mir + as->failure.mmc + as->failure.ruj + as->failure.tak;
|
||||
as->success.total = as->success.guk + as->success.mir + as->success.mmc + as->success.ruj + as->success.tak;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+8
-2
@@ -174,8 +174,7 @@ public:
|
||||
* Adventure related.
|
||||
*/
|
||||
void UpdateAdventureStatsEntry(uint32 char_id, uint8 theme, bool win);
|
||||
bool GetAdventureStats(uint32 char_id, uint32 &guk_w, uint32 &mir_w, uint32 &mmc_w, uint32 &ruj_w, uint32 &tak_w,
|
||||
uint32 &guk_l, uint32 &mir_l, uint32 &mmc_l, uint32 &ruj_l, uint32 &tak_l);
|
||||
bool GetAdventureStats(uint32 char_id, AdventureStats_Struct *as);
|
||||
|
||||
/*
|
||||
* Account Related
|
||||
@@ -215,6 +214,12 @@ public:
|
||||
void ClearRaidDetails(uint32 rid = 0);
|
||||
uint32 GetRaidID(const char* name);
|
||||
const char *GetRaidLeaderName(uint32 rid);
|
||||
void GetGroupLeadershipInfo(uint32 gid, uint32 rid, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr,
|
||||
GroupLeadershipAA_Struct* GLAA = nullptr);
|
||||
void GetRaidLeadershipInfo(uint32 rid, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr,
|
||||
RaidLeadershipAA_Struct* RLAA = nullptr);
|
||||
void SetRaidGroupLeaderInfo(uint32 gid, uint32 rid);
|
||||
void ClearRaidLeader(uint32 gid = 0xFFFFFFFF, uint32 rid = 0);
|
||||
|
||||
bool CheckDatabaseConversions();
|
||||
|
||||
@@ -274,6 +279,7 @@ private:
|
||||
*/
|
||||
void ClearAllRaids();
|
||||
void ClearAllRaidDetails();
|
||||
void ClearAllRaidLeaders();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -759,14 +759,62 @@ struct MovePotionToBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -3934,6 +3982,15 @@ struct RaidMOTD_Struct {
|
||||
/*136*/ char motd[0]; // max size is 1024, but reply is variable
|
||||
};
|
||||
|
||||
struct RaidLeadershipUpdate_Struct {
|
||||
/*000*/ uint32 action;
|
||||
/*004*/ char player_name[64];
|
||||
/*068*/ char leader_name[64];
|
||||
/*132*/ GroupLeadershipAA_Struct group; //unneeded
|
||||
/*196*/ RaidLeadershipAA_Struct raid;
|
||||
/*260*/ char Unknown260[128]; //unverified
|
||||
};
|
||||
|
||||
struct RaidAdd_Struct {
|
||||
/*000*/ uint32 action; //=0
|
||||
/*004*/ char player_name[64]; //should both be the player's name
|
||||
|
||||
@@ -611,14 +611,62 @@ struct PotionBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -2613,6 +2613,18 @@ namespace RoF
|
||||
strn0cpy(outmotd->motd, inmotd->motd, strlen(inmotd->motd) + 1);
|
||||
dest->FastQueuePacket(&outapp);
|
||||
}
|
||||
else if (raid_gen->action == 14)
|
||||
{
|
||||
RaidLeadershipUpdate_Struct *inlaa = (RaidLeadershipUpdate_Struct *)__emu_buffer;
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(structs::RaidLeadershipUpdate_Struct));
|
||||
structs::RaidLeadershipUpdate_Struct *outlaa = (structs::RaidLeadershipUpdate_Struct *)outapp->pBuffer;
|
||||
|
||||
outlaa->action = inlaa->action;
|
||||
strn0cpy(outlaa->player_name, inlaa->player_name, 64);
|
||||
strn0cpy(outlaa->leader_name, inlaa->leader_name, 64);
|
||||
memcpy(&outlaa->raid, &inlaa->raid, sizeof(RaidLeadershipAA_Struct));
|
||||
dest->FastQueuePacket(&outapp);
|
||||
}
|
||||
else
|
||||
{
|
||||
RaidGeneral_Struct* in_raid_general = (RaidGeneral_Struct*)__emu_buffer;
|
||||
|
||||
@@ -915,14 +915,62 @@ struct PotionBelt_Struct {
|
||||
BandolierItem_Struct items[MAX_POTIONS_IN_BELT];
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -3999,6 +4047,16 @@ struct RaidMOTD_Struct {
|
||||
/*140*/ char motd[0]; // max size 1024, but reply is variable
|
||||
};
|
||||
|
||||
struct RaidLeadershipUpdate_Struct {
|
||||
/*000*/ uint32 action;
|
||||
/*004*/ char player_name[64];
|
||||
/*068*/ uint32 Unknown068;
|
||||
/*072*/ char leader_name[64];
|
||||
/*136*/ GroupLeadershipAA_Struct group; //unneeded
|
||||
/*200*/ RaidLeadershipAA_Struct raid;
|
||||
/*264*/ char Unknown264[128];
|
||||
};
|
||||
|
||||
struct RaidAdd_Struct {
|
||||
/*000*/ uint32 action; //=0
|
||||
/*004*/ char player_name[64]; //should both be the player's name
|
||||
|
||||
@@ -1668,6 +1668,18 @@ namespace SoD
|
||||
strn0cpy(outmotd->motd, inmotd->motd, strlen(inmotd->motd) + 1);
|
||||
dest->FastQueuePacket(&outapp);
|
||||
}
|
||||
else if (raid_gen->action == 14)
|
||||
{
|
||||
RaidLeadershipUpdate_Struct *inlaa = (RaidLeadershipUpdate_Struct *)__emu_buffer;
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(structs::RaidLeadershipUpdate_Struct));
|
||||
structs::RaidLeadershipUpdate_Struct *outlaa = (structs::RaidLeadershipUpdate_Struct *)outapp->pBuffer;
|
||||
|
||||
outlaa->action = inlaa->action;
|
||||
strn0cpy(outlaa->player_name, inlaa->player_name, 64);
|
||||
strn0cpy(outlaa->leader_name, inlaa->leader_name, 64);
|
||||
memcpy(&outlaa->raid, &inlaa->raid, sizeof(RaidLeadershipAA_Struct));
|
||||
dest->FastQueuePacket(&outapp);
|
||||
}
|
||||
else
|
||||
{
|
||||
RaidGeneral_Struct* in_raid_general = (RaidGeneral_Struct*)__emu_buffer;
|
||||
|
||||
@@ -711,14 +711,62 @@ struct PotionBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -3567,6 +3615,16 @@ struct RaidMOTD_Struct {
|
||||
/*140*/ char motd[0]; // max size 1024, but reply is variable
|
||||
};
|
||||
|
||||
struct RaidLeadershipUpdate_Struct {
|
||||
/*000*/ uint32 action;
|
||||
/*004*/ char player_name[64];
|
||||
/*068*/ uint32 Unknown068;
|
||||
/*072*/ char leader_name[64];
|
||||
/*136*/ GroupLeadershipAA_Struct group; //unneeded
|
||||
/*200*/ RaidLeadershipAA_Struct raid;
|
||||
/*264*/ char Unknown264[128];
|
||||
};
|
||||
|
||||
struct RaidAdd_Struct {
|
||||
/*000*/ uint32 action; //=0
|
||||
/*004*/ char player_name[64]; //should both be the player's name
|
||||
|
||||
@@ -1326,6 +1326,18 @@ namespace SoF
|
||||
strn0cpy(outmotd->motd, inmotd->motd, strlen(inmotd->motd) + 1);
|
||||
dest->FastQueuePacket(&outapp);
|
||||
}
|
||||
else if (raid_gen->action == 14)
|
||||
{
|
||||
RaidLeadershipUpdate_Struct *inlaa = (RaidLeadershipUpdate_Struct *)__emu_buffer;
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(structs::RaidLeadershipUpdate_Struct));
|
||||
structs::RaidLeadershipUpdate_Struct *outlaa = (structs::RaidLeadershipUpdate_Struct *)outapp->pBuffer;
|
||||
|
||||
outlaa->action = inlaa->action;
|
||||
strn0cpy(outlaa->player_name, inlaa->player_name, 64);
|
||||
strn0cpy(outlaa->leader_name, inlaa->leader_name, 64);
|
||||
memcpy(&outlaa->raid, &inlaa->raid, sizeof(RaidLeadershipAA_Struct));
|
||||
dest->FastQueuePacket(&outapp);
|
||||
}
|
||||
else
|
||||
{
|
||||
RaidGeneral_Struct* in_raid_general = (RaidGeneral_Struct*)__emu_buffer;
|
||||
|
||||
@@ -689,14 +689,62 @@ struct PotionBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -3430,6 +3478,16 @@ struct RaidMOTD_Struct {
|
||||
/*140*/ char motd[0]; // max size 1024, but reply is variable
|
||||
};
|
||||
|
||||
struct RaidLeadershipUpdate_Struct {
|
||||
/*000*/ uint32 action;
|
||||
/*004*/ char player_name[64];
|
||||
/*068*/ uint32 Unknown068;
|
||||
/*072*/ char leader_name[64];
|
||||
/*136*/ GroupLeadershipAA_Struct group; //unneeded
|
||||
/*200*/ RaidLeadershipAA_Struct raid;
|
||||
/*264*/ char Unknown264[128];
|
||||
};
|
||||
|
||||
struct RaidAdd_Struct {
|
||||
/*000*/ uint32 action; //=0
|
||||
/*004*/ char player_name[64]; //should both be the player's name
|
||||
|
||||
@@ -619,14 +619,62 @@ struct PotionBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1940,6 +1940,18 @@ namespace Underfoot
|
||||
strn0cpy(outmotd->motd, inmotd->motd, strlen(inmotd->motd) + 1);
|
||||
dest->FastQueuePacket(&outapp);
|
||||
}
|
||||
else if (raid_gen->action == 14)
|
||||
{
|
||||
RaidLeadershipUpdate_Struct *inlaa = (RaidLeadershipUpdate_Struct *)__emu_buffer;
|
||||
EQApplicationPacket *outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(structs::RaidLeadershipUpdate_Struct));
|
||||
structs::RaidLeadershipUpdate_Struct *outlaa = (structs::RaidLeadershipUpdate_Struct *)outapp->pBuffer;
|
||||
|
||||
outlaa->action = inlaa->action;
|
||||
strn0cpy(outlaa->player_name, inlaa->player_name, 64);
|
||||
strn0cpy(outlaa->leader_name, inlaa->leader_name, 64);
|
||||
memcpy(&outlaa->raid, &inlaa->raid, sizeof(RaidLeadershipAA_Struct));
|
||||
dest->FastQueuePacket(&outapp);
|
||||
}
|
||||
else
|
||||
{
|
||||
RaidGeneral_Struct* in_raid_general = (RaidGeneral_Struct*)__emu_buffer;
|
||||
|
||||
@@ -754,14 +754,62 @@ struct PotionBelt_Struct {
|
||||
static const uint32 MAX_GROUP_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_RAID_LEADERSHIP_AA_ARRAY = 16;
|
||||
static const uint32 MAX_LEADERSHIP_AA_ARRAY = (MAX_GROUP_LEADERSHIP_AA_ARRAY+MAX_RAID_LEADERSHIP_AA_ARRAY);
|
||||
struct LeadershipAA_Struct {
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
struct GroupLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 groupAAMarkNPC;
|
||||
uint32 groupAANPCHealth;
|
||||
uint32 groupAADelegateMainAssist;
|
||||
uint32 groupAADelegateMarkNPC;
|
||||
uint32 groupAA4;
|
||||
uint32 groupAA5;
|
||||
uint32 groupAAInspectBuffs;
|
||||
uint32 groupAA7;
|
||||
uint32 groupAASpellAwareness;
|
||||
uint32 groupAAOffenseEnhancement;
|
||||
uint32 groupAAManaEnhancement;
|
||||
uint32 groupAAHealthEnhancement;
|
||||
uint32 groupAAHealthRegeneration;
|
||||
uint32 groupAAFindPathToPC;
|
||||
uint32 groupAAHealthOfTargetsTarget;
|
||||
uint32 groupAA15;
|
||||
};
|
||||
uint32 ranks[MAX_GROUP_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct RaidLeadershipAA_Struct {
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
union {
|
||||
struct {
|
||||
uint32 raidAAMarkNPC;
|
||||
uint32 raidAANPCHealth;
|
||||
uint32 raidAADelegateMainAssist;
|
||||
uint32 raidAADelegateMarkNPC;
|
||||
uint32 raidAA4;
|
||||
uint32 raidAA5;
|
||||
uint32 raidAA6;
|
||||
uint32 raidAASpellAwareness;
|
||||
uint32 raidAAOffenseEnhancement;
|
||||
uint32 raidAAManaEnhancement;
|
||||
uint32 raidAAHealthEnhancement;
|
||||
uint32 raidAAHealthRegeneration;
|
||||
uint32 raidAAFindPathToPC;
|
||||
uint32 raidAAHealthOfTargetsTarget;
|
||||
uint32 raidAA14;
|
||||
uint32 raidAA15;
|
||||
};
|
||||
uint32 ranks[MAX_RAID_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
struct LeadershipAA_Struct {
|
||||
union {
|
||||
struct {
|
||||
GroupLeadershipAA_Struct group;
|
||||
RaidLeadershipAA_Struct raid;
|
||||
};
|
||||
uint32 ranks[MAX_LEADERSHIP_AA_ARRAY];
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -3628,6 +3676,16 @@ struct RaidMOTD_Struct {
|
||||
/*140*/ char motd[0]; // max size 1024, but reply is variable
|
||||
};
|
||||
|
||||
struct RaidLeadershipUpdate_Struct {
|
||||
/*000*/ uint32 action;
|
||||
/*004*/ char player_name[64];
|
||||
/*068*/ uint32 Unknown068;
|
||||
/*072*/ char leader_name[64];
|
||||
/*136*/ GroupLeadershipAA_Struct group; //unneeded
|
||||
/*200*/ RaidLeadershipAA_Struct raid;
|
||||
/*264*/ char Unknown264[128];
|
||||
};
|
||||
|
||||
struct RaidAdd_Struct {
|
||||
/*000*/ uint32 action; //=0
|
||||
/*004*/ char player_name[64]; //should both be the player's name
|
||||
|
||||
Reference in New Issue
Block a user