Documentation ¶
Index ¶
Constants ¶
View Source
const ( Amazon = 0x00 Sorceress = 0x01 Necromancer = 0x02 Paladin = 0x03 Barbarian = 0x04 Druid = 0x05 Assassin = 0x06 )
Mapper of the hex values of classes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attributes ¶
type Attributes struct { Strength uint64 `json:"strength"` Energy uint64 `json:"energy"` Dexterity uint64 `json:"dexterity"` Vitality uint64 `json:"vitality"` UnusedStats uint64 `json:"unused_stats"` UnusedSkillPoints uint64 `json:"unused_skill_points"` CurrentHP uint64 `json:"current_hp"` MaxHP uint64 `json:"max_hp"` CurrentMana uint64 `json:"current_mana"` MaxMana uint64 `json:"max_mana"` CurrentStamina uint64 `json:"current_stamina"` MaxStamina uint64 `json:"max_stamina"` Level uint64 `json:"level"` Experience uint64 `json:"experience"` Gold uint64 `json:"gold"` StashedGold uint64 `json:"stashed_gold"` }
Attributes are the different type of attributes a character can have.
type Character ¶
type Character struct { Header Header `json:"header"` Attributes Attributes `json:"attributes"` Skills []Skill `json:"skills"` Items []Item `json:"items"` CorpseItems []Item `json:"corpse_items"` MercItems []Item `json:"merc_items"` GolemItem *Item `json:"golem_item"` IsDead uint16 `json:"is_dead"` }
Character represents all the d2s character data.
func ParseFromContent ¶
ParseFromContent will read the character from a byte slice.
type Header ¶
type Header struct { Identifier uint32 `json:"identifier"` Version uint32 `json:"version"` FileSize uint32 `json:"filesize"` CheckSum uint32 `json:"checksum"` ActiveArms uint32 `json:"active_arms"` Name name `json:"name"` Status status `json:"status"` Progression progression `json:"progression"` Class class `json:"class"` Level byte `json:"level"` LastPlayed uint32 `json:"last_played"` AssignedSkills [16]uint32 `json:"assigned_skills"` LeftSkill uint32 `json:"left_skill"` RightSkill uint32 `json:"right_skill"` LeftSwapSkill uint32 `json:"left_swap_skill"` RightSwapSkill uint32 `json:"right_swap_skill"` CurrentDifficulty difficulty `json:"difficulty"` MapID uint32 `json:"map_id"` DeadMerc uint16 `json:"dead_merc"` MercID uint32 `json:"merc_id"` MercNameID uint16 `json:"merc_name_id"` MercType uint16 `json:"merc_type"` MercExp uint32 `json:"merc_experience"` QuestHeader [4]byte `json:"-"` QuestsNormal quests `json:"quests_normal"` QuestsNm quests `json:"quests_nm"` QuestsHell quests `json:"quests_hell"` WaypointHeader [2]byte `json:"-"` WaypointsNormal [24]byte `json:"-"` WaypointsNm [24]byte `json:"-"` WaypointsHell [24]byte `json:"-"` WaypointTrailer byte `json:"-"` NPCHeader [2]byte `json:"-"` NPCIntroNormal [5]byte `json:"-"` NPCIntroNm [5]byte `json:"-"` NPCIntroHell [5]byte `json:"-"` NPCReturnNorm [4]byte `json:"-"` NPCReturnNm [4]byte `json:"-"` NPCReturnHell [4]byte `json:"-"` StatHeader [2]byte `json:"-"` // contains filtered or unexported fields }
Header determines the header data of a d2s file.
type Item ¶
type Item struct { Identified uint64 `json:"identified"` Socketed uint64 `json:"socketed"` New uint64 `json:"new"` IsEar uint64 `json:"is_ear"` StarterItem uint64 `json:"starter_item"` SimpleItem uint64 `json:"simple_item"` Ethereal uint64 `json:"ethereal"` Personalized uint64 `json:"personalized"` PersonalizedName string `json:"personalized_name,omitempty"` GivenRuneword uint64 `json:"given_runeword"` Version uint64 `json:"version"` LocationID uint64 `json:"location_id"` EquippedID uint64 `json:"equipped_id,omitempty"` PositionX uint64 `json:"position_x"` PositionY uint64 `json:"position_y"` AltPositionID uint64 `json:"alt_position_id"` Type string `json:"type"` TypeID uint64 `json:"type_id"` TypeName string `json:"type_name"` NrOfItemsInSockets uint64 `json:"nr_of_items_in_sockets"` ID uint64 `json:"id"` Level uint64 `json:"level"` Quality uint64 `json:"quality"` MultiplePictures uint64 `json:"multiple_pictures"` PictureID uint64 `json:"picture_id"` ClassSpecific uint64 `json:"class_specific"` LowQualityID uint64 `json:"low_quality_id"` Timestamp uint64 `json:"timestamp"` EarAttributes earAttributes `json:"ear_attributes"` DefenseRating int64 `json:"defense_rating,omitempty"` MaxDurability uint64 `json:"max_durability,omitempty"` CurrentDurability uint64 `json:"current_durability,omitempty"` TotalNrOfSockets uint64 `json:"total_nr_of_sockets"` Quantity uint64 `json:"quantity,omitempty"` MagicPrefix uint64 `json:"magic_prefix,omitempty"` MagicPrefixName string `json:"magic_prefix_name,omitempty"` MagicSuffix uint64 `json:"magic_suffix,omitempty"` MagicSuffixName string `json:"magic_suffix_name,omitempty"` RunewordID uint64 `json:"runeword_id,omitempty"` RunewordName string `json:"runeword_name,omitempty"` RunewordAttributes []magicAttribute `json:"runeword_attributes"` SetID uint64 `json:"set_id,omitempty"` SetName string `json:"set_name,omitempty"` SetListCount uint64 `json:"set_list_count"` SetAttributes [][]magicAttribute `json:"set_attributes"` SetAttributesNumReq []uint `json:"set_attributes_num_req,omitempty"` SetAttributesIDsReq []uint64 `json:"set_attributes_ids_req,omitempty"` RareName string `json:"rare_name,omitempty"` RareName2 string `json:"rare_name2,omitempty"` MagicalNameIDs []uint64 `json:"magical_name_ids,omitempty"` UniqueID uint64 `json:"unique_id,omitempty"` UniqueName string `json:"unique_name,omitempty"` MagicAttributes []magicAttribute `json:"magic_attributes"` SocketedItems []Item `json:"socketed_items"` BaseDamage *weaponDamage `json:"base_damage,omitempty"` }
Item describes any type of item and all it's data.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.