Skip to content

Messages EndClientTurn

clanner edited this page Feb 24, 2015 · 5 revisions

EndClientTurn

type description
dword subtick - 1/60 seconds since login
dword checksum
dword nr of commands

followed by a list of commands. Note: the checksum must be correct for the command list to be executed.

  • I have not completely figured it out, it seems to be the byte or dword sum of most of the current, and historic game state.

the checksum

calculated by LogicGameObjectManager::getChecksum

  • homeavatar.getChecksum
  • visitoravatar.getChecksum
    • score + exppoints+explevel + diamonds + freediamonds
    • global ids of resources + units + spells + allianceunits + unitupgrades + spellupgrades + ?
  • the total number of objects in your game ( buildings, characters, projectiles, obstacles, traps, allianceportals, deco's, spells )
  • then for each building some checksum: LogicBuilding::getChecksum
    • sum of LogicComponent::getChecksum for component 5(ResourceProduction) and 6(ResourceStorage)
      • LogicResourceProductionComponent::getChecksum : sum of
        • remainingseconds
        • dw18, dw14, dw10

commands

type desc
dword command id, see Protocol Commands
... payload

the length of the payload is dependent on the command id.