本文整理汇总了C#中Zepheus.Zone.Game.ZoneCharacter.ChangeMap方法的典型用法代码示例。如果您正苦于以下问题:C# ZoneCharacter.ChangeMap方法的具体用法?C# ZoneCharacter.ChangeMap怎么用?C# ZoneCharacter.ChangeMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zepheus.Zone.Game.ZoneCharacter
的用法示例。
在下文中一共展示了ZoneCharacter.ChangeMap方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Movetoplayer
private void Movetoplayer(ZoneCharacter character, params string[] param)
{
string player = param[1];
ZoneClient playerc = ClientManager.Instance.GetClientByName(player);
character.ChangeMap(playerc.Character.MapID, playerc.Character.Position.X, character.Position.Y);
}
示例2: ChangeMap
private void ChangeMap(ZoneCharacter character, params string[] param)
{
ushort mapid = 0;
if (!ushort.TryParse(param[1], out mapid))
{
param[1] = param[1].ToLower();
var map = DataProvider.Instance.MapsByID.Values.ToList().Find(m => m.ShortName.ToLower() == param[1]);
if (map != null)
{
mapid = map.ID;
}
else
{
character.DropMessage("Map not found");
return;
}
}
else
{
if (!DataProvider.Instance.MapsByID.ContainsKey(mapid))
{
character.DropMessage("Map not found");
return;
}
}
if (param.Length > 2)
{
int x = int.Parse(param[2]);
int y = int.Parse(param[3]);
character.ChangeMap(mapid, x, y);
}
character.ChangeMap(mapid);
}
示例3: AnswerOnGateQuestion
private static void AnswerOnGateQuestion(ZoneCharacter character, byte answer)
{
NPC npc = (character.Question.Object as NPC);
MapInfo mi = null;
if (DataProvider.Instance.MapsByName.TryGetValue(npc.Gate.MapServer, out mi))
{
switch (answer)
{
case 0:
character.ChangeMap(mi.ID, npc.Gate.Coord_X, npc.Gate.Coord_Y);
break;
case 1: break;
default:
Log.WriteLine(LogLevel.Warn, "Invalid gate question response.");
break;
}
}
}