public static void CreateAchievementData(RealmPacketOut packet, Character chr) { foreach (AchievementRecord achievementRecord in chr.Achievements.m_completedAchievements.Values) { packet.WriteUInt(achievementRecord.AchievementEntryId); packet.WriteDateTime(achievementRecord.CompleteDate); } packet.WriteInt(uint.MaxValue); }
//SMSG_ACHIEVEMENT_EARNED public static void SendAchievementEarned(AchievementEntryId achievementEntryId, Character chr) { using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_ACHIEVEMENT_EARNED, 8 + 4 + 4)) { chr.EntityId.WritePacked(packet); packet.WriteUInt((uint)achievementEntryId); packet.WriteDateTime(DateTime.Now); packet.WriteUInt(0); chr.SendPacketToArea(packet, true); } }
public static void SendAchievementEarned(uint achievementEntryId, Character chr) { using (RealmPacketOut packet = new RealmPacketOut((PacketId)RealmServerOpCode.SMSG_ACHIEVEMENT_EARNED, 16)) { chr.EntityId.WritePacked((BinaryWriter)packet); packet.WriteUInt(achievementEntryId); packet.WriteDateTime(DateTime.Now); packet.WriteUInt(0); chr.SendPacketToArea(packet, true, false, Locale.Any, new float?()); } }
//SMSG_ACHIEVEMENT_EARNED public static void SendAchievementEarned(uint achievementEntryId, Character chr) { using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_ACHIEVEMENT_EARNED, 8 + 4 + 4)) { chr.EntityId.WritePacked(packet); packet.WriteUInt(achievementEntryId); packet.WriteDateTime(DateTime.Now); packet.WriteUInt(0); chr.SendPacketToArea(packet, true); } }
public static void CreateAchievementData(RealmPacketOut packet, Character chr) { foreach (AchievementRecord completedAchievement in chr.Achievements.m_completedAchievements.Values) { packet.WriteUInt((uint)completedAchievement.AchievementEntryId); packet.WriteDateTime(completedAchievement.CompleteDate); } packet.WriteInt(0xFFFFFFFFu); foreach (AchievementProgressRecord achievementProgressRecord in chr.Achievements.m_progressRecords.Values) { packet.WriteUInt((uint)achievementProgressRecord.AchievementCriteriaId); packet.WritePackedUInt64(achievementProgressRecord.Counter); // amount chr.EntityId.WritePacked(packet); packet.Write(0); packet.WriteDateTime(DateTime.Now); // start time? packet.Write(0); // Duration packet.Write(0); } packet.Write(0xFFFFFFFFu); }
public static void SendAchievmentStatus(AchievementProgressRecord achievementProgressRecord, Character chr) { using (RealmPacketOut realmPacketOut = new RealmPacketOut((PacketId)RealmServerOpCode.SMSG_CRITERIA_UPDATE, 36)) { realmPacketOut.WriteUInt(achievementProgressRecord.AchievementCriteriaId); realmPacketOut.WritePackedUInt64((ulong)achievementProgressRecord.Counter); chr.EntityId.WritePacked((BinaryWriter)realmPacketOut); realmPacketOut.Write(0); realmPacketOut.WriteDateTime(DateTime.Now); realmPacketOut.Write(0); realmPacketOut.Write(0); chr.Client.Send(realmPacketOut, false); } }
// SMSG_CRITERIA_UPDATE public static void SendAchievmentStatus(AchievementProgressRecord achievementProgressRecord, Character chr) { using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_CRITERIA_UPDATE, 4*5+8*2)) { packet.WriteUInt((uint)achievementProgressRecord.AchievementCriteriaId); packet.WritePackedUInt64(achievementProgressRecord.Counter); // amount chr.EntityId.WritePacked(packet); packet.Write(0); packet.WriteDateTime(DateTime.Now); // start time? packet.Write(0); // Duration packet.Write(0); // Duration left chr.Client.Send(packet); } }
// SMSG_CRITERIA_UPDATE public static void SendAchievmentStatus(AchievementProgressRecord achievementProgressRecord, Character chr) { using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_CRITERIA_UPDATE, 4 * 5 + 8 * 2)) { packet.WriteUInt((uint)achievementProgressRecord.AchievementCriteriaId); packet.WritePackedUInt64(achievementProgressRecord.Counter); // amount chr.EntityId.WritePacked(packet); packet.Write(0); packet.WriteDateTime(DateTime.Now); // start time? packet.Write(0); // Duration packet.Write(0); // Duration left chr.Client.Send(packet); } }
public static void CreateAchievementData(RealmPacketOut packet, Character chr) { foreach (AchievementRecord completedAchievement in chr.Achievements.m_completedAchievements.Values) { packet.WriteUInt((uint)completedAchievement.AchievementEntryId); packet.WriteDateTime(completedAchievement.CompleteDate); } packet.WriteInt(0xFFFFFFFFu); /*foreach (AchievementProgressRecord achievementProgressRecord in chr.Achievements.m_achivement_progress.Values) { packet.WriteUInt((uint)achievementProgressRecord.AchievementCriteriaId); packet.WritePackedUInt64(achievementProgressRecord.Counter); // amount chr.EntityId.WritePacked(packet); packet.Write(0); packet.WriteDateTime(DateTime.Now); // start time? packet.Write(0); // Duration packet.Write(0); } packet.Write(0xFFFFFFFFu);*/ }
public static void SendTimeSpeed(IPacketReceiver client, DateTime time, float timeSpeed) { using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_LOGIN_SETTIMESPEED, 8)) { packet.WriteDateTime(time); packet.WriteFloat(timeSpeed); packet.WriteInt(0); // new, unknown client.Send(packet); } }
public static void SendWorldStateUITimerUpdate(IRealmClient client) { using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_WORLD_STATE_UI_TIMER_UPDATE, 0)) { packet.WriteDateTime(DateTime.Now); // unk? client.Send(packet); } }