Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new <see cref="MapRevivalRegion"/> instance from an <see cref="RgnRegion3"/> element.
 /// </summary>
 /// <param name="region"><see cref="RgnRegion3"/> instance.</param>
 /// <param name="revivalMapId">Revival map id.</param>
 /// <returns>New <see cref="MapRevivalRegion"/> instance.</returns>
 public static IMapRevivalRegion FromRgnElement(RgnRegion3 region, int revivalMapId)
 => new MapRevivalRegion(region.Left, region.Top, region.Right - region.Left, region.Bottom - region.Top,
                         revivalMapId, region.Key, region.Position.Clone(), region.ChaoKey, region.TargetKey);
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new <see cref="MapTriggerRegion"/> instance from a <see cref="RgnRegion3"/> element.
 /// </summary>
 /// <param name="region"><see cref="RgnRegion3"/> element.</param>
 /// <returns>New <see cref="MapTriggerRegion"/> instance.</returns>
 public static IMapTriggerRegion FromRgnElement(RgnRegion3 region)
 => new MapTriggerRegion(region.Left, region.Top, region.Right - region.Left, region.Bottom - region.Top,
                         region.TeleportWorldId, region.TeleportPosition);