barrett777 / Heroes.ReplayParser

A C# library for parsing Heroes of the Storm replay files (.StormReplay)
MIT License
223 stars 95 forks source link

adding playerIndex to message #48

Closed wakuflair closed 7 years ago

wakuflair commented 7 years ago

Make the ReplayParser parse the player of the message correctly.

barrett777 commented 7 years ago

What are you wanting the player index for?

If 'MessageSender' is not pointing to the correct player, we should fix that directly

wakuflair commented 7 years ago

I'm developing a tool that can save the parsing result to a local db. Users can search replays with some conditions( like chat message ).

I saved the chat messages to a seperate database table. In order to know which player the message is belong to, it's convenice to have a player index field in Message , since the replay storing the players using an array.

I can also use the MessageSender property, but in that case I have to write a for-loop and compare the player name + BattleTag to locate the player.

Maybe there's an easy way, I'm glad to know.