mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
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:
@@ -621,6 +621,7 @@ public:
|
||||
void SendGuildURL();
|
||||
void SendGuildChannel();
|
||||
void SendGuildSpawnAppearance();
|
||||
void SendGuildRanks();
|
||||
void SendGuildMembers();
|
||||
void SendGuildList();
|
||||
void SendGuildJoin(GuildJoin_Struct* gj);
|
||||
|
||||
@@ -4431,6 +4431,7 @@ void Client::Handle_OP_GuildInviteAccept(const EQApplicationPacket *app)
|
||||
}
|
||||
if(zone->GetZoneID() == RuleI(World, GuildBankZoneID) && GuildBanks)
|
||||
GuildBanks->SendGuildBank(this);
|
||||
SendGuildRanks();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -8128,7 +8129,10 @@ void Client::Handle_OP_ClientError(const EQApplicationPacket *app)
|
||||
void Client::Handle_OP_ReloadUI(const EQApplicationPacket *app)
|
||||
{
|
||||
if(IsInAGuild())
|
||||
{
|
||||
SendGuildRanks();
|
||||
SendGuildMembers();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -9603,6 +9607,7 @@ void Client::CompleteConnect()
|
||||
|
||||
if(IsInAGuild())
|
||||
{
|
||||
SendGuildRanks();
|
||||
guild_mgr.SendGuildMemberUpdateToWorld(GetName(), GuildID(), zone->GetZoneID(), time(nullptr));
|
||||
guild_mgr.RequestOnlineGuildMembers(this->CharacterID(), this->GuildID());
|
||||
}
|
||||
@@ -12528,6 +12533,7 @@ void Client::Handle_OP_GuildCreate(const EQApplicationPacket *app)
|
||||
|
||||
if(zone->GetZoneID() == RuleI(World, GuildBankZoneID) && GuildBanks)
|
||||
GuildBanks->SendGuildBank(this);
|
||||
SendGuildRanks();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user