Identified the opcode/struct for guild ranks in Rain of Fear+ clients and created a temporary workaround for permissions until full DB support is added for the new permissions system.

This commit is contained in:
SecretsOTheP
2014-05-17 23:33:35 -04:00
parent 10c43bfa51
commit cc6dce25ad
5 changed files with 67 additions and 0 deletions
+36
View File
@@ -115,6 +115,42 @@ void Client::SendGuildChannel()
}
}
void Client::SendGuildRanks()
{
if(GetClientVersion() < EQClientRoF)
return;
int permissions = 30 + 1; //Static number of permissions in all EQ clients as of May 2014
int ranks = 8 + 1; // Static number of RoF+ ranks as of May 2014
int j = 1;
int i = 1;
if(IsInAGuild())
{
while(j < ranks)
{
while(i < permissions)
{
EQApplicationPacket *outapp = new EQApplicationPacket(OP_GuildUpdateURLAndChannel, sizeof(GuildUpdateRanks_Struct));
GuildUpdateRanks_Struct *guuacs = (GuildUpdateRanks_Struct*) outapp->pBuffer;
//guuacs->Unknown0008 = this->GuildID();
strncpy(guuacs->Unknown0012, this->GetCleanName(), 64);
guuacs->Action = 5;
guuacs->RankID = j;
guuacs->GuildID = this->GuildID();
guuacs->PermissionID = i;
guuacs->PermissionVal = 1;
guuacs->Unknown0089[0] = 0x2c;
guuacs->Unknown0089[1] = 0x01;
guuacs->Unknown0089[2] = 0x00;
FastQueuePacket(&outapp);
i++;
}
j++;
i = 1;
}
}
}
void Client::SendGuildSpawnAppearance() {
if (!IsInAGuild()) {
// clear guildtag