本文整理汇总了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);
}
}
示例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);
}
}
示例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);*/
}
示例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);
}
}
示例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);
}
}