Skip to content

Commit fe80fdf

Browse files
committed
Monster name fix
1 parent 527acea commit fe80fdf

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

BPSR_ACT_Plugin/src/BPSRPacketHandler.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,9 @@ private static void AddNameFromAttr(long id, RepeatedField<Attr> attrs)
7676
var data = attr.RawData?.ToByteArray();
7777
if (data != null && data.Length > 0)
7878
{
79-
// Interpret 1..4 bytes as little-endian integer
80-
int len = Math.Min(4, data.Length);
81-
for (int i = 0; i < len; i++)
82-
{
83-
monsterID |= (data[i] & 0xFF) << (8 * i);
84-
}
79+
monsterID = new CodedInputStream(data).ReadInt32();
80+
UILabelHelper.AddAssociation(id, UILabelHelper.GetMonsterName(monsterID));
8581
}
86-
UILabelHelper.AddAssociation(id, UILabelHelper.GetMonsterName(monsterID));
8782
break;
8883
case AttrType.AttrProfessionId:
8984
break;

readme.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ Part stockholm syndrome. But also, if you dig into it, ACT is more than just a D
1818

1919
# TODOs:
2020

21-
## Priority
22-
- Make monster names work better
23-
2421
## Req before being happy with personal use
2522
- Handle zones
2623
- Find a way to name encounters instead of them ending up as "Encounter" (because no allies?)

0 commit comments

Comments
 (0)