本文整理汇总了C#中WCell.RealmServer.Global.Map.AddObjectLater方法的典型用法代码示例。如果您正苦于以下问题:C# Map.AddObjectLater方法的具体用法?C# Map.AddObjectLater怎么用?C# Map.AddObjectLater使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WCell.RealmServer.Global.Map
的用法示例。
在下文中一共展示了Map.AddObjectLater方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DynamicObject
public DynamicObject(Unit creator, SpellId spellId, float radius, Map map, Vector3 pos)
{
if (creator == null)
throw new ArgumentNullException("creator", "creator must not be null");
Master = creator;
EntityId = EntityId.GetDynamicObjectId(++lastId);
Type |= ObjectTypes.DynamicObject;
SetEntityId(DynamicObjectFields.CASTER, creator.EntityId);
SpellId = spellId;
Radius = radius;
Bytes = 0x01EEEEEE;
ScaleX = 1;
m_position = pos;
map.AddObjectLater(this);
}
示例2: SpawnCorpse
/// <summary>
/// Spawns and returns a new Corpse at the given location
/// </summary>
/// <param name="bones"></param>
/// <param name="lootable"></param>
/// <returns></returns>
public Corpse SpawnCorpse(bool bones, bool lootable, Map map, Vector3 pos, float o)
{
var corpse = new Corpse(this, pos, o, DisplayId, Facial, Skin,
HairStyle, HairColor, FacialHair, GuildId, Gender, Race,
bones ? CorpseFlags.Bones : CorpseFlags.None, lootable ? CorpseDynamicFlags.PlayerLootable : CorpseDynamicFlags.None);
for (var i = EquipmentSlot.Head; i <= EquipmentSlot.Tabard; i++)
{
var item = m_inventory[(int)i];
if (item != null)
{
corpse.SetItem(i, item.Template);
}
}
corpse.Position = pos;
map.AddObjectLater(corpse);
return corpse;
}