本文整理汇总了C#中WCell.RealmServer.Global.Map类的典型用法代码示例。如果您正苦于以下问题:C# Map类的具体用法?C# Map怎么用?C# Map使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Map类属于WCell.RealmServer.Global命名空间,在下文中一共展示了Map类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetOrCreateEditor
public static MapEditor GetOrCreateEditor(Map map)
{
MapEditor editor;
if (!EditorsByMap.TryGetValue(map, out editor))
{
EditorsByMap.Add(map, editor = new MapEditor(map));
}
return editor;
}
示例2: StartEditing
public static MapEditor StartEditing(Map map, Character chr = null)
{
var editor = GetOrCreateEditor(map);
if (chr != null)
{
editor.Join(chr);
}
return editor;
}
示例3: GetOrCreate
public static ObjectReference GetOrCreate(Map rgn, EntityId id)
{
var caster = rgn.GetObject(id);
if (caster != null)
{
return caster.SharedReference;
}
return new ObjectReference(id, 1);
}
示例4: Create
/// <summary>
/// Creates a new GameObject with the given parameters
/// </summary>
public static GameObject Create(GOEntryId id, Map map, GOSpawnEntry spawnEntry = null, GOSpawnPoint spawnPoint = null)
{
var entry = GOMgr.GetEntry(id);
if (entry != null)
{
return Create(entry, map, spawnEntry, spawnPoint);
}
return null;
}
示例5: Zone
public Zone(Map rgn, ZoneTemplate template)
{
Map = rgn;
Template = template;
if (template.WorldStates != null)
{
WorldStates = new WorldStateCollection(this, template.WorldStates);
}
CreateChatChannels();
}
示例6: Ticket
public Ticket(Character chr, string message, TicketType type)
{
m_owner = chr;
m_ownerName = chr.Name;
m_charId = chr.EntityId.Low;
m_Message = message;
m_Map = chr.Map;
Position = chr.Position;
Phase = chr.Phase;
m_Timestamp = DateTime.Now;
m_Type = type;
}
示例7: GetRemoveObjectTask
public static IMessage GetRemoveObjectTask(WorldObject obj, Map rgn)
{
var moveTask = new Message2<WorldObject, Map>();
moveTask.Parameter1 = obj;
moveTask.Parameter2 = rgn;
moveTask.Callback = ((worldObj, objRgn) =>
{
objRgn.RemoveObjectNow(worldObj);
});
return moveTask;
}
示例8: GetInitializeCharacterTask
public static IMessage GetInitializeCharacterTask(Character chr, Map rgn)
{
var initTask = new Message2<Character, Map>();
initTask.Parameter1 = chr;
initTask.Parameter2 = rgn;
initTask.Callback = ((initChr, initRgn) =>
{
initRgn.AddObjectNow(chr);
//Map.s_log.Debug("Owner added to the map");
//Map.s_log.Debug("Owner initialized");
});
return initTask;
}
示例9: 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);
}
示例10: TeleportNode
public TeleportNode(string defaultName, Map rgn, Vector3 pos)
{
DefaultName = defaultName;
Map = rgn;
Position = pos;
}
示例11: TeleportTo
public void TeleportTo(Map map, bool wait)
{
TeleportTo(map, ref m_position, 3f, wait);
}
示例12: SetCharacterEntry
/// <summary>
/// Sets the entry position of the character.
/// </summary>
public void SetCharacterEntry(Map map, ref Vector3 pos, float orientation)
{
m_EntryMap = map;
_entryPosition = pos;
_entryOrientation = orientation;
}
示例13: SpawnAt
public NPC SpawnAt(Map map, Vector3 pos, bool hugGround = false)
{
var npc = Create(map.DifficultyIndex);
if (hugGround && InhabitType == InhabitType.Ground)
{
pos.Z = map.Terrain.GetGroundHeightUnderneath(pos);
}
map.AddObject(npc, pos);
return npc;
}
示例14: OnOwnerLogout
internal void OnOwnerLogout()
{
TicketMgr.Instance.lck.EnterWriteLock();
try
{
Position = m_owner.Position;
m_Map = m_owner.Map;
Phase = m_owner.Phase;
m_owner = null;
var handler = m_handler;
if (handler != null)
{
handler.SendMessage("Owner of the Ticket you are handling went -{0}-.", ChatUtility.Colorize("offline", Color.Red));
}
}
finally
{
TicketMgr.Instance.lck.ExitWriteLock();
}
}
示例15: TeleportBack
/// <summary>
/// Returns the character to their original location prior to entering the Battleground.
/// </summary>
public void TeleportBack()
{
if (m_EntryMap == null || m_EntryMap.IsDisposed || _entryPosition.X == 0)
{
_chr.TeleportToBindLocation();
}
else
{
_chr.TeleportTo(m_EntryMap, ref _entryPosition, _entryOrientation);
}
m_EntryMap = null;
}