Files
better-genshin-impact/BetterGenshinImpact/GameTask/AutoTrackPath/Model/GiWorldPosition.cs
秋云 62da52d5d8 feat: add configurable HP restoration options at Statue of the Seven (#1223)
* feat: add configurable HP restoration options at Statue of the Seven

* fix: Create GiTpPosition as subclass of GiWorldPosition

* fix: Update teleport point selection logic in ViewModel

* fix: Change log info
2025-03-01 22:04:16 +08:00

47 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace BetterGenshinImpact.GameTask.AutoTrackPath.Model;
/// <summary>
/// 原神世界坐标
/// https://github.com/babalae/better-genshin-impact/issues/318
/// </summary>
public class GiWorldPosition
{
/// <summary>
/// 坐标描述和
/// </summary>
public string? Description { get; set; }
/// <summary>
/// 坐标 x,y,z 三个值,分别代表纵向、高度、横向,采用原神实际的坐标系
/// 由于这个坐标系和一般的坐标系不同所以为了方便理解设这3个值为a,b,c
/// ▲
/// │a
/// ◄───┼────
/// c │
///
/// 值的缩放等级和1024区块坐标系的缩放一致
/// </summary>
public decimal[] Position { get; set; } = new decimal[3];
public double X => (double)Position[2]; // c
public double Y => (double)Position[0]; // a
}
public class GiTpPosition: GiWorldPosition
{
/// <summary>
/// 基本属性
/// </summary>
public required string Id { get; set; } // tp id
public string? Name { get; set; } // tp 名称
public string? Type { get; set; } // tp 类型
public string? Country { get; set; } // 所在国家
public string? Area { get; set; } // 所在区域
// 实际传送的坐标
public decimal[] TranPosition { get; set; } = new decimal[3];
public double TranX => (double)TranPosition[2];
public double TranY => (double)TranPosition[0];
}