Compare commits
2 Commits
4490994a6c
...
a60dfb2da3
Author | SHA1 | Date |
---|---|---|
Anna | a60dfb2da3 | |
Anna | 93c7524749 |
|
@ -0,0 +1 @@
|
|||
/site
|
|
@ -1,6 +1,6 @@
|
|||
using Dalamud.Configuration;
|
||||
|
||||
namespace PlayerMap;
|
||||
namespace MegaMappingway;
|
||||
|
||||
[Serializable]
|
||||
public class Configuration : IPluginConfiguration {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace PlayerMap;
|
||||
namespace MegaMappingway;
|
||||
|
||||
internal static class ListExt {
|
||||
public static void Shuffle<T>(this IList<T> list) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlayerMap", "PlayerMap.csproj", "{3F5E5BFF-B5B9-416C-BAD6-5F154B8A7A35}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MegaMappingway", "MegaMappingway.csproj", "{3F5E5BFF-B5B9-416C-BAD6-5F154B8A7A35}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
@ -1,7 +1,8 @@
|
|||
name: Player Map
|
||||
name: MegaMappingway Uploader
|
||||
author: Anna
|
||||
punchline: Crowdsourced location maps
|
||||
punchline: Contribute to crowdsourced, anonymous, live player maps
|
||||
description: |-
|
||||
Use this plugin to upload player data to the crowdsourced location maps at
|
||||
https://map.anna.lgbt/. It uploads the players around you every five seconds.
|
||||
https://map.anna.lgbt/. It uploads the players around you every five seconds
|
||||
by default, but the frequency is configurable
|
||||
repo_url: https://map.anna.lgbt/
|
|
@ -1,4 +1,4 @@
|
|||
namespace PlayerMap;
|
||||
namespace MegaMappingway;
|
||||
|
||||
internal class OnDispose : IDisposable {
|
||||
private Action Action { get; }
|
||||
|
|
|
@ -10,7 +10,7 @@ using Dalamud.Plugin;
|
|||
using Dalamud.Plugin.Services;
|
||||
using MessagePack;
|
||||
|
||||
namespace PlayerMap;
|
||||
namespace MegaMappingway;
|
||||
|
||||
public class Plugin : IDalamudPlugin {
|
||||
[PluginService]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using ImGuiNET;
|
||||
|
||||
namespace PlayerMap;
|
||||
namespace MegaMappingway;
|
||||
|
||||
internal class PluginUi : IDisposable {
|
||||
private Plugin Plugin { get; }
|
||||
|
|
|
@ -201,22 +201,23 @@ async fn upload(
|
|||
sqlx::query!(
|
||||
// language=sqlite
|
||||
"
|
||||
insert into players (hash, world, timestamp, territory, current_world, x, y, z, w, customize, level, job, free_company, current_hp,
|
||||
insert into players (hash, world, timestamp, territory, current_world, x, y, z, w, customize, level, job, free_company,
|
||||
current_hp,
|
||||
max_hp)
|
||||
values (?, ?, current_timestamp, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
on conflict (hash) do update set timestamp = current_timestamp,
|
||||
territory = ?,
|
||||
current_world = ?,
|
||||
x = ?,
|
||||
y = ?,
|
||||
z = ?,
|
||||
w = ?,
|
||||
customize = ?,
|
||||
level = ?,
|
||||
job = ?,
|
||||
free_company = ?,
|
||||
current_hp = ?,
|
||||
max_hp = ?
|
||||
territory = ?,
|
||||
current_world = ?,
|
||||
x = ?,
|
||||
y = ?,
|
||||
z = ?,
|
||||
w = ?,
|
||||
customize = ?,
|
||||
level = ?,
|
||||
job = ?,
|
||||
free_company = ?,
|
||||
current_hp = ?,
|
||||
max_hp = ?
|
||||
",
|
||||
player.hash,
|
||||
player.world,
|
||||
|
@ -297,10 +298,10 @@ struct AnonymousPlayerInfo {
|
|||
w: f64,
|
||||
gender: u8,
|
||||
race: u8,
|
||||
level: i64,
|
||||
job: i64,
|
||||
level: u8,
|
||||
job: u8,
|
||||
hp_percent: f64,
|
||||
age: i64,
|
||||
age: i8,
|
||||
territory_unique_id: u64,
|
||||
}
|
||||
|
||||
|
@ -316,10 +317,10 @@ impl AnonymousPlayerInfo {
|
|||
w: value.w,
|
||||
gender: customize.gender,
|
||||
race: customize.race,
|
||||
level: value.level,
|
||||
job: value.job,
|
||||
level: value.level as u8,
|
||||
job: value.job as u8,
|
||||
hp_percent: value.current_hp as f64 / value.max_hp as f64,
|
||||
age: value.age,
|
||||
age: value.age as i8,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue