Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 //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);
     }
 }
Esempio n. 3
0
 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?());
     }
 }
Esempio n. 4
0
 //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);
     }
 }
Esempio n. 5
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);
        }
Esempio n. 6
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);
     }
 }
Esempio n. 7
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);
			}
		}
Esempio n. 8
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);
            }
        }
Esempio n. 9
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_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);*/
		}
Esempio n. 10
0
        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);
            }
        }
Esempio n. 11
0
 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);
     }
 }