D2Data and Quest data (#9)
This commit is contained in:
51
pkg/data/quest/quest.go
Normal file
51
pkg/data/quest/quest.go
Normal file
@@ -0,0 +1,51 @@
|
||||
package quest
|
||||
|
||||
type Quest int16
|
||||
type Status int16
|
||||
type States []Status
|
||||
|
||||
func (s States) Completed() bool {
|
||||
return s.HasStatus(StatusUpdateQuestLogCompleted)
|
||||
}
|
||||
|
||||
func (s States) HasStatus(st Status) bool {
|
||||
for _, state := range s {
|
||||
if state == st {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
const (
|
||||
Act1DenOfEvil Quest = iota
|
||||
Act1SistersBurialGrounds
|
||||
Act1ToolsOfTheTrade
|
||||
Act1TheSearchForCain
|
||||
Act1TheForgottenTower
|
||||
Act1SistersToTheSlaughter
|
||||
Act2RadamentsLair
|
||||
Act2TheHoradricStaff
|
||||
Act2TaintedSun
|
||||
Act2ArcaneSanctuary
|
||||
Act2TheSummoner
|
||||
Act2TheSevenTombs
|
||||
Act3LamEsensTome
|
||||
Act3KhalimsWill
|
||||
Act3BladeOfTheOldReligion
|
||||
Act3TheGoldenBird
|
||||
Act3TheBlackenedTemple
|
||||
Act3TheGuardian
|
||||
Act4TheFallenAngel
|
||||
Act4HellForge
|
||||
Act4TerrorsEnd
|
||||
Act5SiegeOnHarrogath
|
||||
Act5RescueOnMountArreat
|
||||
Act5PrisonOfIce
|
||||
Act5BetrayalOfHarrogath
|
||||
Act5RiteOfPassage
|
||||
Act5EveOfDestruction
|
||||
)
|
||||
|
||||
type Quests map[Quest]States
|
||||
Reference in New Issue
Block a user