Skip to content

Commit

Permalink
hitbox radius
Browse files Browse the repository at this point in the history
  • Loading branch information
Jukkales committed Sep 9, 2024
1 parent 85cda26 commit b431db6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion NecroLens/Model/DataCollector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace NecroLens.Model;

public class DataCollector
{
public uint Version => 1;
public uint Version => 2;

public string? Sender { get; set; }

Expand All @@ -18,6 +18,7 @@ public class MobData
public uint NameId { get; set; }
public int ContentId { get; set; }
public int Floor { get; set; }
public float? HitboxRadius { get; set; }
public Collection<float>? MoveTimes { get; set; }
public Collection<float>? AggroDistances { get; set; }
}
Expand Down
4 changes: 3 additions & 1 deletion NecroLens/Model/FloorDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public void TrackFloorObjects(ESPObject espObj, int currentContentId)

obj.ContentId = currentContentId;
obj.Floor = CurrentFloor;
obj.HitboxRadius = espObj.GameObject.HitboxRadius;
FloorObjects[espObj.GameObject.EntityId] = obj;
}

Expand Down Expand Up @@ -199,6 +200,7 @@ public void DumpFloorObjects(int currentContentId)
NameId = keyValuePair.Value.NameId,
ContentId = currentContentId,
Floor = CurrentFloor,
HitboxRadius = keyValuePair.Value.HitboxRadius,
MoveTimes = [], // TODO
AggroDistances = [] // TODO
};
Expand All @@ -225,7 +227,7 @@ public void DumpFloorObjects(int currentContentId)
using var client = new HttpClient();
try
{
await client.PostAsync("https://necrolens.jusrv.de/api/import",
await client.PostAsync("https://necrolens.jusrv.de/api/import2",
new StringContent(json, Encoding.UTF8, "application/json"));
}
catch (Exception e)
Expand Down
1 change: 1 addition & 0 deletions NecroLens/Model/FloorObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ public class FloorObject
public string? Name { get; set; }
public int ContentId { get; set; }
public int Floor { get; set; }
public float? HitboxRadius { get; set; }
}

0 comments on commit b431db6

Please sign in to comment.