Documentation ¶
Index ¶
- func WrapWeaponType(key string) string
- type Artifact
- type ArtifactStat
- type ArtifactType
- type CharacterData
- type Costume
- type FightProp
- type ItemType
- type Material
- type NameCard
- type Pair
- type ProfilePicture
- type RawArtifactData
- type RawArtifactMainData
- type RawAvatarInfo
- type RawEquipData
- type RawFetterInfo
- type RawFlatData
- type RawGenshinUser
- type RawMaterial
- type RawPlayerInfo
- type RawProfilePicture
- type RawShowAvatarInfo
- type RawSubData
- type RawWeaponData
- type ShowCaseCharacter
- type User
- type UserCharacter
- type Weapon
- type WeaponStat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapWeaponType ¶
Types ¶
type Artifact ¶
type Artifact struct { ArtifactType ArtifactType Level int MainStats ArtifactStat SubStats []ArtifactStat SetNameHash string IconKey string }
type ArtifactStat ¶
type ArtifactType ¶
type ArtifactType int
const ( FLOWER ArtifactType = iota FEATHER SANDS GOBLET CIRCLET )
func TypeFromId ¶
func TypeFromId(identifier string) ArtifactType
type CharacterData ¶
type CharacterData struct { Element string `json:"Element"` TalentsImageKeys []string `json:"Consts"` SkillOrder []int `json:"SkillOrder"` Skills map[int]string `json:"Skills"` NameHash int `json:"NameTextMapHash"` SideIconKey string `json:"SideIconName"` WeaponType string RawWeaponType string `json:"WeaponType"` Costumes map[int]Costume `json:"Costumes"` }
func (*CharacterData) GetHash ¶
func (c *CharacterData) GetHash() string
func (*CharacterData) GetSideIconKey ¶
func (c *CharacterData) GetSideIconKey() string
Returns the icon of the character when looking at the camera This is a key, and should be parsed with EnkaNetworkApi#GetGenshinIcon
This is no longer needed after 4.1
func (*CharacterData) Name ¶
func (c *CharacterData) Name() string
type Material ¶
type Material struct { Id int Name string NameHash localization.HashInt Description string DescriptionHash localization.HashInt IconKey string Pictures []string ItemType ItemType // Only avaible for ITEM_MATERIAL // Because I'm lazy it might be present for others // be sure to check ItemType MaterialType string Stars int }
type ProfilePicture ¶ added in v0.1.2
type RawArtifactData ¶
type RawArtifactMainData ¶
type RawAvatarInfo ¶
type RawAvatarInfo struct { AvatarId int `json:"avatarId"` PropMap map[string]interface{} `json:"propMap"` TalentIdList []int `json:"talentIdList"` FightPropMap map[string]float64 `json:"fightPropMap"` SkillDepotId int `json:"skillDepotId"` InherentProudSkillList []int `json:"inherentProudSkillList"` EquipList []RawEquipData `json:"equipList"` FetterInfo RawFetterInfo `json:"fetterInfo"` }
type RawEquipData ¶
type RawEquipData struct { ItemId int64 `json:"itemId"` // Empty if weapon ArtifactData *RawArtifactData `json:"reliquary,omitempty"` // Empty if artifact WeaponData *RawWeaponData `json:"weapon,omitempty"` Flat RawFlatData `json:"flat"` }
type RawFetterInfo ¶
type RawFetterInfo struct {
ExpLevel int `json:"expLevel"`
}
type RawFlatData ¶
type RawFlatData struct { NameTextMapHash string `json:"nameTextMapHash"` SetNameTextMapHash string `json:"setNameTextMapHash"` RankLevel int `json:"rankLevel"` WeaponStats []RawSubData `json:"weaponStats"` ArtifactMainData RawArtifactMainData `json:"artifactMainData"` ReliquarySubStats []RawSubData `json:"reliquarySubStats"` Icon string `json:"icon"` EquipType string `json:"equipType"` }
type RawGenshinUser ¶
type RawGenshinUser struct { PlayerInfo RawPlayerInfo `json:"playerInfo"` AvatarInfoList []RawAvatarInfo `json:"avatarInfoList"` Ttl int `json:"ttl"` Uid string `json:"uid"` }
func (*RawGenshinUser) GetTtl ¶
func (user *RawGenshinUser) GetTtl() int
type RawMaterial ¶
type RawMaterial struct { Id int `json:"id"` NameHash int `json:"nameTextMapHash"` DescriptionHash int `json:"descTextMapHash"` IconKey string `json:"icon"` Pictures []string `json:"picPath"` ItemType string `json:"itemType"` MaterialType string `json:"materialType,omitempty"` Stars int `json:"rankLevel,omitempty"` }
func (RawMaterial) ToMaterial ¶
func (r RawMaterial) ToMaterial() Material
type RawPlayerInfo ¶
type RawPlayerInfo struct { Nickname string `json:"nickname"` Level int `json:"level"` Signature *string `json:"signature"` WorldLevel int `json:"worldLevel"` NameCardId int `json:"nameCardId"` FinishedAchievementsCount int `json:"finishedAchievementNum"` TowerFloorIndex int `json:"towerFloorIndex"` TowerLevelIndex int `json:"towerLevelIndex"` ShowAvatarInfoList []RawShowAvatarInfo `json:"showAvatarInfoList"` ShowNameCardIdList []int `json:"showNameCardIdList"` ProfilePicture RawProfilePicture `json:"profilePicture"` }
type RawProfilePicture ¶
type RawProfilePicture struct { AvatarId int `json:"avatarId,omitempty"` Id int `json:"id,omitempty"` // Fallback if above are empty CostumeId int `json:"costume_id,omitempty"` }
As of version 4.1, HoYo is not storing an avatar ID anymore, but rather a profile picture ID. Both fields will continue to exist, as some people MAY not have migrated yet (changed their avatar after 4.1).
type RawShowAvatarInfo ¶
type RawSubData ¶
type RawWeaponData ¶
type ShowCaseCharacter ¶
type User ¶
type User struct { NickName string Signature string Level int WorldLevel int NameCardId int CompletedAchievements int TowerFloorIndex int TowerLevelIndex int ShowCasedCharacters []ShowCaseCharacter // Ids of the users NameCards, use EnkaNetworkApi#GetNameCardName to get the name NameCardsId []int ProfilePicture RawProfilePicture Characters []UserCharacter }
func UserFromRaw ¶
func UserFromRaw(rawUser *RawGenshinUser) *User
type UserCharacter ¶
type Weapon ¶
type WeaponStat ¶
Click to show internal directories.
Click to hide internal directories.