本文整理汇总了C#中WCell.RealmServer.Global.Map类的典型用法代码示例。如果您正苦于以下问题:C# Map类的具体用法?C# Map怎么用?C# Map使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Map类属于WCell.RealmServer.Global命名空间,在下文中一共展示了Map类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:ebakkedahl,项目名称:WCell,代码行数:9,代码来源:MapEditorMgr.cs
示例2: StartEditing
public static MapEditor StartEditing(Map map, Character chr = null)
{
var editor = GetOrCreateEditor(map);
if (chr != null)
{
editor.Join(chr);
}
return editor;
}
开发者ID:ebakkedahl,项目名称:WCell,代码行数:9,代码来源:MapEditorMgr.cs
示例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);
}
开发者ID:Zerant,项目名称:WCell,代码行数:9,代码来源:ObjectReference.cs
示例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;
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:12,代码来源:GameObject.cs
示例5: Zone
public Zone(Map rgn, ZoneTemplate template)
{
Map = rgn;
Template = template;
if (template.WorldStates != null)
{
WorldStates = new WorldStateCollection(this, template.WorldStates);
}
CreateChatChannels();
}
开发者ID:remixod,项目名称:netServer,代码行数:11,代码来源:Zone.cs
示例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;
}
开发者ID:ebakkedahl,项目名称:WCell,代码行数:14,代码来源:Ticket.cs
示例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;
}
开发者ID:remixod,项目名称:netServer,代码行数:14,代码来源:Map.Tasks.cs
示例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;
}
开发者ID:remixod,项目名称:netServer,代码行数:17,代码来源:Map.Tasks.cs
示例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);
}
开发者ID:ebakkedahl,项目名称:WCell,代码行数:17,代码来源:DynamicObject.cs
示例10: TeleportNode
public TeleportNode(string defaultName, Map rgn, Vector3 pos)
{
DefaultName = defaultName;
Map = rgn;
Position = pos;
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:6,代码来源:TeleportNode.cs
示例11: TeleportTo
public void TeleportTo(Map map, bool wait)
{
TeleportTo(map, ref m_position, 3f, wait);
}
开发者ID:MeaNone,项目名称:WCell,代码行数:4,代码来源:TestCharacter.cs
示例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;
}
开发者ID:remixod,项目名称:netServer,代码行数:9,代码来源:BattlegroundInfo.cs
示例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;
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:10,代码来源:NPCEntry.cs
示例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();
}
}
开发者ID:ebakkedahl,项目名称:WCell,代码行数:21,代码来源:Ticket.cs
示例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;
}
开发者ID:remixod,项目名称:netServer,代码行数:16,代码来源:BattlegroundInfo.cs
示例16: Duel
/// <summary>
/// Creates a new duel between the 2 parties.
/// </summary>
/// <param name="challenger"></param>
/// <param name="rival"></param>
/// <param name="startDelay"></param>
/// <param name="cancelDelay"></param>
internal Duel(Character challenger, Character rival, int startDelay, int cancelDelay)
{
m_challenger = challenger;
m_rival = rival;
m_Map = challenger.Map;
m_startDelay = startDelay;
m_cancelDelay = cancelDelay;
m_challenger.Duel = this;
m_challenger.DuelOpponent = rival;
m_rival.Duel = this;
m_rival.DuelOpponent = challenger;
Initialize();
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:23,代码来源:Duel.cs
示例17: SetCaster
private void SetCaster(ObjectReference caster, Map map, uint phase, Vector3 sourceLoc)
{
CasterReference = caster;
if (caster == null)
{
throw new ArgumentNullException("caster");
}
CasterObject = caster.Object;
CasterUnit = caster.UnitMaster;
Map = map;
Phase = phase;
SourceLoc = sourceLoc;
}
开发者ID:primax,项目名称:WCell,代码行数:13,代码来源:SpellCast.cs
示例18: LoadDefaultMaps
public static void LoadDefaultMaps()
{
foreach (var rgnInfo in s_MapTemplates)
{
if (rgnInfo != null && rgnInfo.Type == MapType.Normal)
{
var map = new Map(rgnInfo);
if (map.Id == MapId.Outland)
{
map.XpCalculator = XpGenerator.CalcOutlandXp;
}
else if (map.Id == MapId.Northrend)
{
map.XpCalculator = XpGenerator.CalcNorthrendXp;
}
else
{
map.XpCalculator = XpGenerator.CalcDefaultXp;
}
map.InitMap();
AddMap(map);
}
}
}
开发者ID:ebakkedahl,项目名称:WCell,代码行数:26,代码来源:World.cs
示例19: ObtainPooledCast
public static SpellCast ObtainPooledCast(ObjectReference caster, Map map, uint phase, ref Vector3 sourceLoc)
{
var cast = SpellCastPool.Obtain();
cast.SetCaster(caster, map, phase, sourceLoc);
return cast;
}
开发者ID:primax,项目名称:WCell,代码行数:6,代码来源:SpellCast.cs
示例20: GetClosestTemplate
/// <summary>
/// Returns the GOTemplate of this entry that is closest to the given location
/// </summary>
public GOSpawnEntry GetClosestTemplate(Map rgn, Vector3 pos)
{
return SpawnEntries.GetClosestEntry(new WorldLocationStruct(rgn, pos));
}
开发者ID:MeaNone,项目名称:WCell,代码行数:7,代码来源:GOEntry.cs
注:本文中的WCell.RealmServer.Global.Map类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论