本文整理汇总了C#中StreamHandler.ReadPackedGuid方法的典型用法代码示例。如果您正苦于以下问题:C# StreamHandler.ReadPackedGuid方法的具体用法?C# StreamHandler.ReadPackedGuid怎么用?C# StreamHandler.ReadPackedGuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StreamHandler
的用法示例。
在下文中一共展示了StreamHandler.ReadPackedGuid方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public void Read(StreamHandler Reader)
{
Flags = (SpellCastTargetFlags)Reader.ReadUInt32();
if ((Flags & (
SpellCastTargetFlags.Unit | SpellCastTargetFlags.Unk2 |
SpellCastTargetFlags.Object |
SpellCastTargetFlags.Corpse | SpellCastTargetFlags.PvPCorpse
)) != 0)
TargetUnit = Reader.ReadPackedGuid();
if ((Flags & (SpellCastTargetFlags.Item | SpellCastTargetFlags.TradeItem)) != 0)
TargetItem = Reader.ReadPackedGuid();
if ((Flags & SpellCastTargetFlags.SourceLocation) != 0)
{
SourceTransportGuid = Reader.ReadPackedGuid();
SourceLocation = Reader.ReadVector3();
}
if ((Flags & SpellCastTargetFlags.DestLocation) != 0)
{
DestTransportGuid = Reader.ReadPackedGuid();
DestLocation = Reader.ReadVector3();
}
if ((Flags & SpellCastTargetFlags.String) != 0)
StringTarget = Reader.ReadCString();
}
示例2: Read
public override void Read(StreamHandler reader)
{
this.Unit = reader.ReadPackedGuid();
var count = reader.ReadInt32();
this.ThreatList = new ThreatUpdatePair[count];
for (int i = 0; i < count; ++i)
this.ThreatList[i] = new ThreatUpdatePair { Unit = reader.ReadPackedGuid(), Threat = reader.ReadUInt32() };
}
示例3: ReadObjectValuesUpdate
private void ReadObjectValuesUpdate(StreamHandler Reader)
{
var guid = Reader.ReadPackedGuid();
var values = ReadValues(Reader);
if (!m_valuesUpdates.ContainsKey(guid))
m_valuesUpdates.Add(guid, values);
else
Console.WriteLine("Error: Updated object duplicate guid {0}", guid);
}
示例4: Read
public override void Read(StreamHandler reader)
{
Caster = reader.ReadPackedGuid();
SpellId = reader.ReadUInt32();
Duration = reader.ReadInt32();
HaveFlags = reader.ReadBoolean();
if (HaveFlags)
{
TargetFlags1 = reader.ReadUInt32();
TargetFlags2 = reader.ReadUInt32();
}
Unk_HaveData2 = reader.ReadBoolean();
if (Unk_HaveData2)
{
Unk_Guid1 = reader.ReadPackedGuid();
Unk_UInt3 = reader.ReadUInt32();
Unk_Byte = reader.ReadByte();
if (Unk_Byte == 2)
Unk_Guid2 = reader.ReadPackedGuid();
}
}
示例5: Read
public override void Read(StreamHandler reader)
{
Unit = reader.ReadPackedGuid();
while (!reader.IsRead)
{
var update = new Aura();
update.Unit = Unit;
update.Read(reader);
this.Auras.Add(update);
}
}
示例6: ReadObjectCreateUpdate
private void ReadObjectCreateUpdate(StreamHandler Reader)
{
var guid = Reader.ReadPackedGuid();
var type = (ObjectTypeId)Reader.ReadByte();
WowObject obj;
switch (type)
{
case ObjectTypeId.Container:
obj = new WowContainer();
break;
case ObjectTypeId.Corpse:
obj = new WowCorpse();
break;
case ObjectTypeId.DynamicObject:
obj = new WowDynamicObject();
break;
case ObjectTypeId.GameObject:
obj = new WowGameObject();
break;
case ObjectTypeId.Item:
obj = new WowItem();
break;
case ObjectTypeId.Object:
default:
throw new Exception("Cannot instantiate an object with TypeId=" + type);
case ObjectTypeId.Player:
obj = new WowPlayer();
break;
case ObjectTypeId.Unit:
obj = new WowUnit();
break;
case ObjectTypeId.AreaTrigger:
obj = new WowAreaTrigger();
break;
}
obj.Guid = guid;
obj.MovementData = new MovementInfo(Reader);
obj.SetValues(ReadValues(Reader));
obj.ResetUpdatedFields();
if (!m_createdObjects.ContainsKey(guid))
m_createdObjects.Add(guid, obj);
else
Console.WriteLine("Error: Created object duplicate guid {0}", guid);
}
示例7: Read
public override void Read(StreamHandler reader)
{
this.Unit = reader.ReadPackedGuid();
}
示例8: ReadObjectDestroyUpdate
private void ReadObjectDestroyUpdate(StreamHandler Reader)
{
uint nObjects = Reader.ReadUInt32();
for (var i = 0; i < nObjects; ++i)
m_destroyedObjects.Add(Reader.ReadPackedGuid());
}
示例9: MonsterMove
public MonsterMove(StreamHandler Reader, bool LazyReading)
{
this.Unit = Reader.ReadPackedGuid();
this.Reader = Reader;
m_readers = new Action[]
{
ReadMovementData
};
if (!LazyReading)
EnsureRead();
}
示例10: Read
public void Read(StreamHandler Reader)
{
Slot = Reader.ReadByte();
Spell = Reader.ReadUInt32();
Caster = Unit;
if (Spell != 0)
{
Flags = (AuraFlags)Reader.ReadUInt16();
Level = Reader.ReadByte();
Charges = Reader.ReadByte();
if ((Flags & AuraFlags.NotCaster) == 0)
Caster = Reader.ReadPackedGuid();
if ((Flags & AuraFlags.Duration) != 0)
{
MaxDuration = Reader.ReadUInt32();
var currentDurationMs = Reader.ReadUInt32();
this.AppliedTime = (uint)Environment.TickCount - currentDurationMs;
}
if ((Flags & AuraFlags.BasePoints) != 0)
{
for (int i = 0; i < MaxEffects; ++i)
{
if ((Flags & (AuraFlags)(1 << i)) != 0)
BasePoints[i] = Reader.ReadInt32();
else
BasePoints[i] = 0;
}
}
else
Array.Clear(BasePoints, 0, MaxEffects);
}
}