- Code: Select all
namespace DOL.GS.Ext
{
public static class ExtendedLiving
{
/// <summary>
/// Moves the living from one spot to another, possibly between regions.
/// </summary>
/// <param name="regionID">new regionid</param>
/// <param name="point">new position held by point</param>
/// <param name="heading">new heading</param>
/// <returns>true if moved</returns>
public static bool MoveTo(this GameLiving gLiving, ushort regionId, Point3D point, ushort heading)
{
if (regionId != gLiving.CurrentRegionID)
gLiving.CancelAllConcentrationEffects();
return gLiving.MoveTo(regionId, point.X, point.Y, point.Z, heading);
}
/// <summary>
/// Moves the living from one spot to another, only within the region it is already
/// within, and uses the existing heading.
/// </summary>
/// <param name="point">new position held by point</param>
/// <returns>true if moved</returns>
public static bool MoveTo(this GameLiving gLiving, Point3D point)
{
return gLiving.MoveTo(gLiving.CurrentRegionID, point.X, point.Y, point.Z, gLiving.Heading);
}
}
}
Use namespace its in (Or put it in your own) then just use it off any existing gameliving/npc/player/etc, figured it would also be a helpful way for those of us who can't help but want/need to modify core and can now do it without modification.