Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
        // 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);
            }
        }
Exemplo n.º 3
0
		// 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);
			}
		}
Exemplo n.º 4
0
        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);
        }