本文整理汇总了C#中WCell.RealmServer.Entities.ObjectBase.GetUInt32方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectBase.GetUInt32方法的具体用法?C# ObjectBase.GetUInt32怎么用?C# ObjectBase.GetUInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WCell.RealmServer.Entities.ObjectBase
的用法示例。
在下文中一共展示了ObjectBase.GetUInt32方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteNPCFlags
private static void WriteNPCFlags(ObjectBase obj, Character chr, UpdatePacket packet)
{
var flags = (NPCFlags)obj.GetUInt32(UnitFields.NPC_FLAGS);
if (obj is NPC)
{
var npc = (NPC)obj;
if (npc.IsTrainer && !npc.TrainerEntry.CanTrain(chr))
{
// Cannot talk to this Guy
flags = 0;
}
}
packet.Write((uint)flags);
}
示例2: WriteGODynamic
private static void WriteGODynamic(ObjectBase obj, Character receiver, UpdatePacket packet)
{
packet.Write(obj.GetUInt32(GameObjectFields.DYNAMIC));
}
示例3: WriteGODynamic
private static void WriteGODynamic(ObjectBase obj, Character receiver, UpdatePacket packet)
{
var go = (GameObject)obj;
if (go is Transport || !go.Flags.HasAnyFlag(GameObjectFlags.ConditionalInteraction))
{
packet.Write(obj.GetUInt32(GameObjectFields.DYNAMIC));
}
else
{
GODynamicLowFlags lowFlags;
if (go.CanBeUsedBy(receiver))
{
lowFlags = GODynamicLowFlags.Clickable | GODynamicLowFlags.Sparkle;
}
else
{
lowFlags = GODynamicLowFlags.None;
}
packet.Write((ushort)lowFlags);
packet.Write(ushort.MaxValue);
}
}