fix: teleport to Limsa for world transfer if necessary
This commit is contained in:
parent
35f17a694c
commit
05b751ed91
|
@ -30,5 +30,14 @@ namespace RoleplayersToolbox.Tools.Housing {
|
||||||
public static TerritoryType CityState(this HousingArea area, DataManager data) {
|
public static TerritoryType CityState(this HousingArea area, DataManager data) {
|
||||||
return data.GetExcelSheet<TerritoryType>().GetRow(area.CityStateTerritoryType());
|
return data.GetExcelSheet<TerritoryType>().GetRow(area.CityStateTerritoryType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool CanWorldTravel(this HousingArea area) {
|
||||||
|
return area switch {
|
||||||
|
HousingArea.Mist => true,
|
||||||
|
HousingArea.LavenderBeds => true,
|
||||||
|
HousingArea.Goblet => true,
|
||||||
|
_ => false,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,9 +172,14 @@ namespace RoleplayersToolbox.Tools.Housing {
|
||||||
if (this.Destination?.Area != null) {
|
if (this.Destination?.Area != null) {
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
||||||
var name = this.Destination.Area.Value.CityState(this.Plugin.Interface.Data).PlaceName.Value.Name;
|
var destArea = this.Destination.Area.Value;
|
||||||
|
if (!destArea.CanWorldTravel() && this.Destination?.World != null && this.Destination?.World != this.Plugin.Interface.ClientState.LocalPlayer?.CurrentWorld?.GameData) {
|
||||||
|
destArea = HousingArea.Mist;
|
||||||
|
}
|
||||||
|
|
||||||
|
var name = destArea.CityState(this.Plugin.Interface.Data).PlaceName.Value.Name;
|
||||||
if (ImGui.Button($"Teleport to {name}")) {
|
if (ImGui.Button($"Teleport to {name}")) {
|
||||||
this.Teleport.TeleportToHousingArea(this.Destination.Area.Value);
|
this.Teleport.TeleportToHousingArea(destArea);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue