1- using WowPacketParser . Enums ;
1+ using System ;
2+ using WowPacketParser . Enums ;
23using WowPacketParser . Misc ;
34using WowPacketParser . Parsing ;
45using WowPacketParser . Store ;
@@ -557,15 +558,29 @@ public static void HandleDisplayPlayerChoice(Packet packet)
557558 packet . ReadByte ( "NumRerolls" ) ;
558559 long ? duration = null ;
559560 if ( ClientVersion . AddedInVersion ( ClientVersionBuild . V9_2_0_42423 ) )
560- duration = packet . ReadInt64 ( "Duration" ) ;
561+ {
562+ var expireTimeUtc = packet . ReadTime64 ( "ExpireTime" ) ;
563+ if ( expireTimeUtc != DateTime . UnixEpoch )
564+ {
565+ duration = ( long ) Math . Round ( ( expireTimeUtc - TimeZoneInfo . ConvertTimeToUtc ( packet . Time , TimeZoneInfo . Local ) ) . TotalSeconds , MidpointRounding . AwayFromZero ) ;
566+ packet . AddValue ( "Duration" , duration ) ;
567+ }
568+ }
561569 packet . ResetBitReader ( ) ;
562570 var questionLength = packet . ReadBits ( 8 ) ;
563571 var pendingChoiceTextLength = 0u ;
564572 if ( ClientVersion . AddedInVersion ( ClientVersionBuild . V9_2_0_42423 ) )
565573 pendingChoiceTextLength = packet . ReadBits ( 8 ) ;
566- packet . ReadBit ( "InfiniteRange" ) ;
574+ var infiniteRange = packet . ReadBit ( "InfiniteRange" ) ;
567575 var hideWarboardHeader = packet . ReadBit ( "HideWarboardHeader" ) ;
568576 var keepOpenAfterChoice = packet . ReadBit ( "KeepOpenAfterChoice" ) ;
577+ byte showChoicesAsList = 0 ;
578+ byte forceDontShowChoicesAsList = 0 ;
579+ if ( ClientVersion . AddedInVersion ( ClientVersionBuild . V11_1_5_60392 ) )
580+ {
581+ showChoicesAsList = packet . ReadBit ( "ShowChoicesAsList" ) ;
582+ forceDontShowChoicesAsList = packet . ReadBit ( "ForceDontShowChoicesAsList" ) ;
583+ }
569584
570585 for ( var i = 0u ; i < responseCount ; ++ i )
571586 ReadPlayerChoiceResponse ( packet , choiceId , i , "PlayerChoiceResponse" , i ) ;
@@ -584,8 +599,11 @@ public static void HandleDisplayPlayerChoice(Packet packet)
584599 Duration = duration ,
585600 Question = question ,
586601 PendingChoiceText = pendingChoiceText ,
602+ InfiniteRange = infiniteRange ,
587603 HideWarboardHeader = hideWarboardHeader ,
588- KeepOpenAfterChoice = keepOpenAfterChoice
604+ KeepOpenAfterChoice = keepOpenAfterChoice ,
605+ ShowChoicesAsList = showChoicesAsList ,
606+ ForceDontShowChoicesAsList = forceDontShowChoicesAsList
589607 } , packet . TimeSpan ) ;
590608
591609 if ( ClientLocale . PacketLocale != LocaleConstant . enUS )
@@ -611,7 +629,7 @@ public static void ReadPlayerChoiceResponseMawPower(Packet packet, params object
611629 packet . ReadInt32 ( "Rarity" , indexes ) ;
612630 packet . ReadUInt32 ( "RarityColor" , indexes ) ;
613631 }
614- packet . ReadInt32 ( "Unused901_2 " , indexes ) ;
632+ packet . ReadInt32 ( "BorderUiTextureAtlasMemberID " , indexes ) ;
615633 packet . ReadInt32 ( "SpellID" , indexes ) ;
616634 packet . ReadInt32 ( "MaxStacks" , indexes ) ;
617635 if ( ClientVersion . AddedInVersion ( ClientVersionBuild . V9_2_0_42423 ) )
0 commit comments