kalilistic / Kapture

Track your loot.
MIT License
4 stars 7 forks source link

Track difference between Loot Master assign and rools #27

Open Blazewardog opened 2 years ago

Blazewardog commented 2 years ago

I'm using the custom HTTP end point to run a loot tracker for my static. I decided to try and separate greed rolls vs the assigned ones as we don't count greed towards our loot distribution.

I thought I could determine this via LootEventType or Roll being non-zeor or LootMessageType but all 3 are the same across both loot events. I've settled on parsing the message for "claims" to mean loot master and "obtains" for rolls, but I think they really should be separate LootEventTypes.

Example loot messages below (with player names redacted)

{"Timestamp":1643259383414,"LootMessage":{"XivChatType":4158,"LogKind":62,"LogKindName":"LootNotice","LootMessageType":4158,"LootMessageTypeName":"OtherPlayerObtainLoot","Message":"obtains an Asphodelos hand gear coffer.","MessageParts":["","Ultros obtains an ","","Asphodelos hand gear coffer","."],"ItemId":35737,"ItemName":"Asphodelos Hand Gear Coffer","IsHq":false},"LootEventType":9,"LootEventTypeName":"Obtain","IsLocalPlayer":false,"PlayerName":"","World":"Ultros","PlayerDisplayName":"","Roll":0,"TerritoryTypeId":1007,"ContentId":807,"LootEventId":"c373d358-c020-46ec-8095-ec638e934d4b","ItemName":"Asphodelos Hand Gear Coffer"}
{"Timestamp":1643259328016,"LootMessage":{"XivChatType":4158,"LogKind":62,"LogKindName":"LootNotice","LootMessageType":4158,"LootMessageTypeName":"OtherPlayerObtainLoot","Message":"claims the Asphodelos leg gear coffer.","MessageParts":["","Famfrit claims the ","","Asphodelos leg gear coffer","."],"ItemId":35738,"ItemName":"Asphodelos Leg Gear Coffer","IsHq":false},"LootEventType":9,"LootEventTypeName":"Obtain","IsLocalPlayer":false,"PlayerName":"","World":"Famfrit","PlayerDisplayName":"","Roll":0,"TerritoryTypeId":1007,"ContentId":807,"LootEventId":"502217bd-c2d1-4573-96f3-e05ed73c3b95","ItemName":"Asphodelos Leg Gear Coffer"}