Расшифровка

Автор x3mal, 02 октября 2006, 15:37:08

0 Пользователи и 1 Гость просматривают эту тему.

x3mal

Есть нетипизированный файл и таблица переменных, вернее типов переменных в этом файле. Как и чем можно его привести в читабельный вид? Или дайте ссылку, где можно об этом почитать...

digger


x3mal

Файл в аттаче, а тут то, что в нем есть:

[int32]      Ammount of Characters in the Savefile
[-----]      foreach Character:
  [Character]      TheCharacter
[-----]

--------------------------------------------------------------------------------
[Character]
  [Mobile]   This
  [int32]      Version (1)
  [int64]      GameTime: Timespan (Ticks)
  [int64]      Created: DateTime = TimeSpan(Ticks - DateTime.Now.Ticks) OR TimeSpan.MaxValue
  [float]      BindingPointX
  [float]      BindingPointY
  [float]      BindingPointZ
  [uint16]   BindingPointMapId
  [int32]      BuyBackStamp
  [-----]      foreach BuyBack
     [byte]      1
     [string]   Classname
     [Item]      Item
     [int32]      Prize
     [int32]      Timestamp
  [byte]      0
  [int32]      BankSlotsAvaible
  [uint32]   BindingPointZoneId
  [int32]      FactionCount
  [-----]      for i=0;i<FactionCount;i++
     [byte]   ReputationStatus
  [int32]      Reststate
  [int32]      RestedXp
  [bool]      AtInn
  [int64]      LastLogout.Ticks
  [int32]      ReputationAdjustments.Counts
  [-----]      Foreach Adjustment
     [int32]      Key
     [int32]      Value
  [int32]      Actionbar.Count
  [-----]      foreach Action
     [-----]      ActionPart
        [int32]      Version (0)
        [byte]      Place
        [uint16]   Action
        [byte]      Type
        [byte]      Other
     [-----]      EndActionPart
  [uint32]   GuildID
  [uint32]   GuildRank
  [-----]      IfPetActions
     [bool]      true
     [-----]      for i=0;i<11;i++
        [int32]      petActions (if i = 10 -> Write: 11)
  [-----]      Else
     [bool]      false
  [-----]      IfSummon
     [bool]      true
     [Mobile]   Summon
  [-----]      else
     [bool]      false
  [-----]      IfCharm
     [bool]      true
     [uint64]   CharmGuid
  [-----]      else
     [bool]      false
  [float]      CorpseLocationX
  [float]      CorpseLocationY
  [float]      CorpseLocationZ
  [uint16]   CorpseMapId
  [uint64]   CorpseGuid
  [-----]      for i=0;i<32;i++
     [uint32]   Zone
  [-----]      IfMark != null
     [bool]      true
     [float]      Mark.X
     [float]      Mark.Y
     [float]      Mark.Z
     [uint16]   Mark.MapId
  [-----]      else
     [bool]      false
  [int32]      AmmoType
  [byte]      Race
  [byte]      Gender
  [byte]      Skin
  [byte]      Face
  [byte]      HairStyle
  [byte]      HairColour
  [byte]      facialHair
  [uint32]   Copper
  [-----]      foreach ActiveQuest
     [----]   If ActiveQuest != null
        [bool]      true
        [AQuest]   Quest
     [----]   else
        [bool]      false
  [int32]      QuestsDoneCount
  [-----]      foreach Questdone
     [int32]      ID
  [-----]      g=0;g<8;g++
     [uint32]   Taxifield
--------------------------------------------------------------------------------
[AQuest]
  [int32]   Version
  [int32]   DeliveryKeysCount
     [int32]   ID
     [int32]   Ammount
  [int32]   NPCObjKeysCount
     [int32]   ID
     [int32]   Ammount
  [int32]   AreasCount
     [int32]   AreaId
  [int32]   QuestId
  [bool]   Completed          
--------------------------------------------------------------------------------      
[Mobile]
  [int32]      Version (0)
  [uint64]   SpawnerLink OR 0
  [bool]      summonedBy
  [bool]      CharmedBy
  [string]   Name
  [int32]      Class
  [int32]      Talent
  [int32]      Level
  [int32]      Model
  [uint32]   Experience
  [uint32]   GuildID
  [uint32]   PetLevel
  [uint32]   PetCreatureFamily
  [uint32]   PetDisplayId
  [float]      Speed
  [float]      Size
  [int32]      Faction
  [int32]      BaseStr
  [int32]      BaseAgility
  [int32]      BaseStamina
  [int32]      BaseIq
  [int32]      BaseSpirit
  [int32]      BaseStr
  [int32]      BaseAgility
  [int32]      BaseStamina
  [int32]      BaseIq
  [int32]      BaseSpirit
  [float]      walkSpeed
  [float]      runSpeed
  [float]      swimSpeed
  [float]      swimBackSpeed
  [float]      hitPoints
  [float]      mana
  [float]      energy
  [float]      rage
  [float]      focus
  [int32]      BaseHitPoints
  [int32]      BaseMana
  [int32]      BaseEnergy
  [int32]      BaseRage
  [int32]      BaseFocus
  [int32]      Block
  [int32]      Armor
  [int32]      resistHoly
  [int32]      resistFire
  [int32]      resistNature
  [int32]      resistFrost
  [int32]      resistShadow
  [int32]      resistArcane
  [bool]      freeze
  [int32]      Skill Count
  [-----]      foreach Skill:
     [uint16]   SkillId
     [string]   ClassName
     [int32]      Version (0)
     [uint16]   current
     [uint16]   max
     [uint16]   rank
  [-----]
  [int32]      KnownAbilities Count
  [-----]      foreach Ability
     [int32]      Spell
     [int32]      Place
  [int32]      Talent Count
  [-----]      foreach Talent
     [int32]      Spell
     [int32]      Place
  [int32]      MaxItemCount
  [-----]      for i=0;i<MaxItemCount;i++
     [-----]      If Item
        [bool]      true
        [string]   Classname
        [Item]      Item
     [-----]      else
        [bool]      false
  [bool]      MovementChange
  [int32]      ManaType
  [byte]      Professions
  [int32]      StandState
  [Object]   This      
--------------------------------------------------------------------------------
[Object]
  [int32]      Version
  [uint64]   Guid
  [float]      X
  [float]      Y
  [float]      Z
  [float]      Orientation
  [uint16]   MapId
  [int32]      ZoneId
--------------------------------------------------------------------------------          
[Item]
  [int32]      Version (0)
  [uint64]   Guid
  [int32]      MaxCount
  [int32]      EnchantTimer = 0
  [bool]      SoulBound
  [int32]      RandomProperty
  [int32]      PermanentEnchant
--------------------------------------------------------------------------------

x3mal

Ну хотябы дайте ссылку, где можно почитать об этом...
Нашел в справочнике по Дельфию, процедуру, которая читает данные из нетипизированных файлов... но нужно задавать количество байтов, занимаемое каждой переменной... может кто-нить подскажет, сколько байт в int32, например...

Igornv

В тексте  1 буква(или цифра) - 1 байт
int32 - 5 байт
Но даже в час смерти не стану другим
И никто не поставит мне крест
Я буду свободным, но трижды чужим
Для пустых и холодных небес
Я не стану никогда рабом иллюзий!

x3mal

#5
сори, файл в аттаче битый был...

x3mal

ЦитироватьВ тексте  1 буква(или цифра) - 1 байт
int32 - 5 байт
спс! если не сложно, можешь написать для других типов??
uint32
int64
uint64
float
bool
Насчет строк, я так понял, что сначала идет кол-во символов, а потом аски код этих символов. И каждое из них в 1 байт, я правильно понял?

ScaN

Цитата: Igornv от 04 октября 2006, 22:33:36В тексте  1 буква(или цифра) - 1 байт
int32 - 5 байт


Хм.... А почему тогда он 32 называется? Должен же тогда 40 быть.