Set dwPacketNumber when State changed
Merge pull request #4 from Liryna/master

Set dwPacketNumber when State changed