private void GroupProfileHandler(Packet packet, Simulator simulator)
{
if (OnGroupProfile != null)
{
GroupProfileReplyPacket profile = (GroupProfileReplyPacket)packet;
Group group = new Group();
group.ID = profile.GroupData.GroupID;
group.AllowPublish = profile.GroupData.AllowPublish;
group.Charter = Utils.BytesToString(profile.GroupData.Charter);
group.FounderID = profile.GroupData.FounderID;
group.GroupMembershipCount = profile.GroupData.GroupMembershipCount;
group.GroupRolesCount = profile.GroupData.GroupRolesCount;
group.InsigniaID = profile.GroupData.InsigniaID;
group.MaturePublish = profile.GroupData.MaturePublish;
group.MembershipFee = profile.GroupData.MembershipFee;
group.MemberTitle = Utils.BytesToString(profile.GroupData.MemberTitle);
group.Money = profile.GroupData.Money;
group.Name = Utils.BytesToString(profile.GroupData.Name);
group.OpenEnrollment = profile.GroupData.OpenEnrollment;
group.OwnerRole = profile.GroupData.OwnerRole;
group.Powers = (GroupPowers)profile.GroupData.PowersMask;
group.ShowInList = profile.GroupData.ShowInList;
try { OnGroupProfile(group); }
catch (Exception e) { Logger.Log(e.Message, Helpers.LogLevel.Error, Client, e); }
}
}