本文整理匯總了C#中WCell.RealmServer.Entities.Character.TeleportTo方法的典型用法代碼示例。如果您正苦於以下問題:C# Character.TeleportTo方法的具體用法?C# Character.TeleportTo怎麽用?C# Character.TeleportTo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WCell.RealmServer.Entities.Character
的用法示例。
在下文中一共展示了Character.TeleportTo方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Blastenheimer5000Used
private static bool Blastenheimer5000Used(GameObject go, Character user)
{
var cast = user.SpellCast;
cast.Start(CannonPrepId);
user.IncMechanicCount(SpellMechanic.Rooted);
switch (go.EntryId)
{
case (uint)Blastenheimer5000ElwynnId:
{
user.TeleportTo(ElwynnTelePosition, ElwynnTeleOrientation);
} break;
case (uint)Blastenheimer5000TerokkarId:
{
user.TeleportTo(TerokkarTelePosition, TerokkarTeleOrientation);
} break;
case (uint)Blastenheimer5000MulgoreId:
{
user.TeleportTo(MulgoreTelePosition, MulgoreTeleOrientation);
} break;
default:
{
user.DecMechanicCount(SpellMechanic.Rooted);
return false;
}
}
go.PlaySound(8476);
user.CallDelayed(2000, obj => FireCannon(user));
return true;
}
示例2: Blastenheimer5000Used
private static bool Blastenheimer5000Used(GameObject go, Character user)
{
var cast = user.SpellCast;
var target = go.GetNearbyGO(CannonTarget, 1000);
if(target != null)
{
var dist = go.GetDistance(target);
}
switch (go.EntryId)
{
case (uint)Blastenheimer5000ElwynnId:
{
cast.Start(CannonPrepId);
user.StandState = StandState.Sit;
user.IncMechanicCount(SpellMechanic.Rooted);
var facing = target != null ? go.GetAngleTowards(target) : ElwynnTeleOrientation;
user.TeleportTo(ElwynnTelePosition, facing);
} break;
case (uint)Blastenheimer5000TerokkarId:
{
cast.Start(CannonPrepId);
user.StandState = StandState.Sit;
user.IncMechanicCount(SpellMechanic.Rooted);
var facing = target != null ? go.GetAngleTowards(target) : TerokkarTeleOrientation;
user.TeleportTo(TerokkarTelePosition, facing);
} break;
case (uint)Blastenheimer5000MulgoreId:
{
cast.Start(CannonPrepMulgore);
user.StandState = StandState.Sit;
user.IncMechanicCount(SpellMechanic.Rooted);
var facing = target != null ? go.GetAngleTowards(target) : MulgoreTeleOrientation;
user.TeleportTo(MulgoreTelePosition, facing);
} break;
default:
{
user.DecMechanicCount(SpellMechanic.Rooted);
return false;
}
}
go.PlaySound(8476);
user.CallDelayed(2000, obj => FireCannon(user));
return true;
}
示例3: Teleport
private static void Teleport(GameObject go, Character chr)
{
if (go.Handler.CanBeUsedBy(chr))
{
// We need to enqueue a message when moving/removing/adding Objects in this method
var portal = (Portal)go;
chr.AddMessage(() => chr.TeleportTo(portal.Target));
}
}
示例4: TeleportInside
public void TeleportInside(Character chr, Vector3 pos)
{
chr.TeleportTo(this, ref pos);
chr.SendSystemMessage("Welcome to {0} #{1} (created at {2})", Name, InstanceId, m_creationTime.ToString());
}
示例5: OnUse
private static bool OnUse(GameObject go, Character chr)
{
var portal = (Portal)go;
chr.TeleportTo(portal.Target);
return true;
}
示例6: HandleTeleport
/// <summary>
/// Teleports into an instance
/// </summary>
/// <param name="chr"></param>
/// <param name="trigger"></param>
/// <returns></returns>
public static bool HandleTeleport(Character chr, AreaTrigger trigger)
{
var regionInfo = World.GetRegionTemplate(trigger.Template.TargetMap);
#if DEBUG
chr.SendSystemMessage("Target location: {0}", trigger.Template.TargetMap);
#endif
if (regionInfo.IsInstance)
{
if (regionInfo.Type == MapType.Normal)
{
InstanceMgr.LeaveInstance(chr, regionInfo, trigger.Template.TargetPos);
return true;
}
else
{
return InstanceMgr.EnterInstance(chr, regionInfo, trigger.Template.TargetPos);
}
}
else if (regionInfo.BGTemplate == null)
{
var rgn = World.GetRegion(regionInfo.Id);
if (rgn != null)
{
chr.TeleportTo(rgn, trigger.Template.TargetPos, trigger.Template.TargetOrientation);
return true;
}
else
{
ContentMgr.OnInvalidDBData("Invalid Region: " + rgn);
}
}
return true;
}
示例7: TryFly
/// <summary>
/// Sends the given Character on the given Path.
/// </summary>
/// <param name="chr">The Character to fly around.</param>
/// <param name="destinations">An array of destination TaxiNodes.</param>
/// <returns>Whether the client was sent on its way.</returns>
internal static bool TryFly(Character chr, NPC vendor, PathNode[] destinations)
{
var client = chr.Client;
if (vendor == null && chr.Role.IsStaff)
{
var dest = destinations.LastOrDefault();
if (dest != null)
{
chr.TeleportTo(dest);
return true;
}
return false;
}
if (vendor == null || !vendor.CheckVendorInteraction(chr))
{
TaxiHandler.SendActivateTaxiReply(client, TaxiActivateResponse.NotAvailable);
}
else if (PreFlightCheatChecks(client, destinations) &&
PreFlightValidPathCheck(client, destinations) &&
(client.ActiveCharacter.GodMode || PreFlightMoneyCheck(client)))
{
// All good, send an "All Good" reply to the client.
TaxiHandler.SendActivateTaxiReply(client, TaxiActivateResponse.Ok);
// PvP flag is auto-cleared when starting a taxi-flight
chr.UpdatePvPState(false, true);
FlyUnit(chr, true);
return true;
}
return false;
}
示例8: TeleportInside
public override void TeleportInside(Character chr)
{
var invite = chr.Battlegrounds.Invitation;
BattlegroundTeam team;
if (invite != null)
{
team = invite.Team;
}
else
{
// joins without invitiation
team = GetTeam(chr.FactionGroup.GetBattlegroundSide());
}
chr.TeleportTo(this, team.StartPosition, team.StartOrientation);
}