61{
64
65 if (!t.TryConsumeTo(achievementId))
66 return false;
67
69
70 if (!(val.Achievement && t.TryConsumeTo(val.CharacterId) && t.TryConsumeTo(val.IsFinished) && t.TryConsumeTo(val.Month) && t.TryConsumeTo(val.Day)))
71 return false;
72
73 if ((12 < val.Month) || (31 < val.Day))
74 return false;
75
77
78 if (!t.TryConsumeTo(year))
79 return false;
80
81 if (val.IsFinished)
82 {
83 if (year < 0)
84 return false;
85 val.Year =
static_cast<uint8>(year);
86 }
87 else
88 val.Year = 0;
89
90 return (t.TryConsumeTo(val.Criteria[0]) && t.TryConsumeTo(val.Criteria[1]) && t.TryConsumeTo(val.Criteria[2]) && t.TryConsumeTo(val.Criteria[3]) && t.IsEmpty());
91}
std::uint8_t uint8
Definition: Define.h:109
std::uint32_t uint32
Definition: Define.h:107
std::int8_t int8
Definition: Define.h:105
#define sAchievementMgr
Definition: AchievementMgr.h:452
Definition: HyperlinkTags.cpp:28