当前位置: 首页>>代码示例>>C#>>正文


C# RealmPacketOut.WriteDateTime方法代码示例

本文整理汇总了C#中RealmPacketOut.WriteDateTime方法的典型用法代码示例。如果您正苦于以下问题:C# RealmPacketOut.WriteDateTime方法的具体用法?C# RealmPacketOut.WriteDateTime怎么用?C# RealmPacketOut.WriteDateTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RealmPacketOut的用法示例。


在下文中一共展示了RealmPacketOut.WriteDateTime方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendAchievementEarned

 //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);
     }
 }
开发者ID:NVN,项目名称:WCell,代码行数:12,代码来源:AchievementHandler.cs

示例2: SendAchievmentStatus

		// 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);
			}
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:16,代码来源:AchievementHandler.cs

示例3: CreateAchievementData

		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);*/
		}
开发者ID:NVN,项目名称:WCell,代码行数:23,代码来源:AchievementHandler.cs

示例4: SendTimeSpeed

        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);
            }
        }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:11,代码来源:CharacterHandler.cs

示例5: SendWorldStateUITimerUpdate

 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);
     }
 }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:8,代码来源:CharacterHandler.cs


注:本文中的RealmPacketOut.WriteDateTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。