public static void HandleInspectAchievements(IRealmClient client, RealmPacketIn packet) { Character character = World.GetCharacter(packet.ReadPackedEntityId().Low); if (character == null || !character.IsInContext) { return; } AchievementHandler.SendRespondInspectAchievements(character); }
public static void SendRespondInspectAchievements(Character chr) { using (RealmPacketOut packet = new RealmPacketOut( (PacketId)RealmServerOpCode.SMSG_RESPOND_INSPECT_ACHIEVEMENTS, chr.Achievements.AchievementsCount * 2 * 4 + 4 + 8)) { chr.EntityId.WritePacked((BinaryWriter)packet); AchievementHandler.CreateAchievementData(packet, chr); chr.Client.Send(packet, false); } }
public static void SendAchievementData(Character chr) { using (RealmPacketOut packet = new RealmPacketOut((PacketId)RealmServerOpCode.SMSG_ALL_ACHIEVEMENT_DATA, chr.Achievements.AchievementsCount * 2 * 4 + 4)) { if (chr.Achievements.AchievementsCount <= 0) { return; } AchievementHandler.CreateAchievementData(packet, chr); chr.Client.Send(packet, false); } }