@@ -331,9 +331,9 @@ public ObjectInstance ReadObjectInstance(ushort id = 0)
331331 return objectInstance ;
332332 }
333333
334- if ( _client . VersionNumber < 19000000 )
334+ if ( _client . VersionNumber < 11900000 )
335335 {
336- ReadByte ( ) ; // mark
336+ objectInstance . Mark = ReadByte ( ) ;
337337 }
338338
339339 if ( objectType . Flags . Liquidcontainer || objectType . Flags . Liquidpool || objectType . Flags . Cumulative )
@@ -414,6 +414,10 @@ public Creature ReadCreatureInstance(int id = -1, Position position = null)
414414 creature . SpeechCategory = ReadByte ( ) ;
415415 creature . Mark = ReadByte ( ) ;
416416 creature . InspectionState = ReadByte ( ) ;
417+ if ( _client . VersionNumber < 11900000 )
418+ {
419+ creature . PvpHelpers = ReadUInt16 ( ) ;
420+ }
417421 creature . IsUnpassable = ReadBool ( ) ;
418422 }
419423 break ;
@@ -443,6 +447,10 @@ public Creature ReadCreatureInstance(int id = -1, Position position = null)
443447 creature . SpeechCategory = ReadByte ( ) ;
444448 creature . Mark = ReadByte ( ) ;
445449 creature . InspectionState = ReadByte ( ) ;
450+ if ( _client . VersionNumber < 11900000 )
451+ {
452+ creature . PvpHelpers = ReadUInt16 ( ) ;
453+ }
446454 creature . IsUnpassable = ReadBool ( ) ;
447455 }
448456 break ;
@@ -580,6 +588,7 @@ public void ReadDailyReward()
580588
581589 public int ReadField ( int x , int y , int z , List < ( Field , Position ) > fields )
582590 {
591+ var hasSetEnvironmentalEffect = false ;
583592 var thingsCount = 0 ;
584593 var numberOfTilesToSkip = 0 ;
585594 var mapPosition = new Position ( x , y , z ) ;
@@ -594,6 +603,15 @@ public int ReadField(int x, int y, int z, List<(Field, Position)> fields)
594603 break ;
595604 }
596605
606+ if ( ! hasSetEnvironmentalEffect )
607+ {
608+ hasSetEnvironmentalEffect = true ;
609+ if ( _client . VersionNumber < 11900000 )
610+ {
611+ continue ;
612+ }
613+ }
614+
597615 if ( thingId == ( int ) CreatureInstanceType . UnknownCreature ||
598616 thingId == ( int ) CreatureInstanceType . OutdatedCreature ||
599617 thingId == ( int ) CreatureInstanceType . Creature )
@@ -897,6 +915,11 @@ public void Write(ObjectInstance value)
897915 return ;
898916 }
899917
918+ if ( _client . VersionNumber < 11900000 )
919+ {
920+ Write ( value . Mark ) ;
921+ }
922+
900923 if ( value . Type . Flags . Liquidcontainer || value . Type . Flags . Liquidpool || value . Type . Flags . Cumulative )
901924 {
902925 Write ( ( byte ) value . Data ) ;
@@ -961,6 +984,10 @@ public void Write(Creature value, CreatureInstanceType type)
961984 Write ( value . SpeechCategory ) ;
962985 Write ( value . Mark ) ;
963986 Write ( value . InspectionState ) ;
987+ if ( _client . VersionNumber < 11900000 )
988+ {
989+ Write ( value . PvpHelpers ) ;
990+ }
964991 Write ( value . IsUnpassable ) ;
965992 }
966993 break ;
@@ -995,6 +1022,10 @@ public void Write(Creature value, CreatureInstanceType type)
9951022 Write ( value . SpeechCategory ) ;
9961023 Write ( value . Mark ) ;
9971024 Write ( value . InspectionState ) ;
1025+ if ( _client . VersionNumber < 11900000 )
1026+ {
1027+ Write ( value . PvpHelpers ) ;
1028+ }
9981029 Write ( value . IsUnpassable ) ;
9991030 }
10001031 break ;
0 commit comments