mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Core/Achievements: Fixed broken Achievement_Criteria.dbc structure
This commit is contained in:
@@ -2702,8 +2702,15 @@ bool AchievementMgr<T>::AdditionalRequirementsSatisfied(AchievementCriteriaEntry
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ADDITIONAL_CRITERIA_CONDITIONS; ++i)
|
||||
{
|
||||
uint32 const reqType = criteria->additionalConditionType[i];
|
||||
uint32 const reqValue = criteria->additionalConditionValue[i];
|
||||
uint32 reqType = criteria->additionalConditionType[i];
|
||||
|
||||
///@TODO Extract additionalConditionValue[2] column from an older dbc and store it in database
|
||||
/// This column is not present in 4.3.4 Achievement_Criteria.dbc
|
||||
/// so for now, just return as failed condition to prevent invalid memory access
|
||||
if (i == 2 && reqType)
|
||||
return false;
|
||||
|
||||
uint32 reqValue = criteria->additionalConditionValue[i];
|
||||
|
||||
switch (AchievementCriteriaAdditionalCondition(reqType))
|
||||
{
|
||||
|
||||
@@ -511,25 +511,27 @@ struct AchievementCriteriaEntry
|
||||
} raw;
|
||||
};
|
||||
|
||||
//uint32 unk; // 5
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 additionalRequirement_type;
|
||||
uint32 additionalRequirement_value;
|
||||
} additionalRequirements[MAX_CRITERIA_REQUIREMENTS];
|
||||
|
||||
char* name; // 9 m_description_lang
|
||||
uint32 completionFlag; // 10 m_flags
|
||||
uint32 timedCriteriaStartType; // 11 m_timer_start_event Only appears with timed achievements, seems to be the type of starting a timed Achievement, only type 1 and some of type 6 need manual starting
|
||||
char* name; // 10 m_description_lang
|
||||
uint32 completionFlag; // 11 m_flags
|
||||
uint32 timedCriteriaStartType; // 12 m_timer_start_event Only appears with timed achievements, seems to be the type of starting a timed Achievement, only type 1 and some of type 6 need manual starting
|
||||
// 1: ByEventId(?) (serverside IDs), 2: ByQuestId, 5: ByCastSpellId(?)
|
||||
// 6: BySpellIdTarget(some of these are unknown spells, some not, some maybe spells)
|
||||
// 7: ByKillNpcId, 9: ByUseItemId
|
||||
uint32 timedCriteriaMiscId; // 12 m_timer_asset_id Alway appears with timed events, used internally to start the achievement, store
|
||||
uint32 timeLimit; // 13 m_timer_time time limit in seconds
|
||||
uint32 showOrder; // 14 m_ui_order also used in achievement shift-links as index in state bitmask
|
||||
//uint32 unk1; // 15 only one value, still unknown
|
||||
//uint32 unk2; // 16 all zeros
|
||||
uint32 additionalConditionType[MAX_ADDITIONAL_CRITERIA_CONDITIONS]; // 17-19
|
||||
uint32 additionalConditionValue[MAX_ADDITIONAL_CRITERIA_CONDITIONS]; // 20-22
|
||||
uint32 timedCriteriaMiscId; // 13 m_timer_asset_id Alway appears with timed events, used internally to start the achievement, store
|
||||
uint32 timeLimit; // 14 m_timer_time time limit in seconds
|
||||
uint32 showOrder; // 15 m_ui_order also used in achievement shift-links as index in state bitmask
|
||||
//uint32 unk1; // 16 only one value, still unknown
|
||||
//uint32 unk2; // 17 all zeros
|
||||
uint32 additionalConditionType[MAX_ADDITIONAL_CRITERIA_CONDITIONS]; // 18-20
|
||||
uint32 additionalConditionValue[MAX_ADDITIONAL_CRITERIA_CONDITIONS - 1]; // 21-22 WTF one column was cut off here in 4.3.4
|
||||
};
|
||||
|
||||
struct AreaTableEntry
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
char const Achievementfmt[] = "niixsxiixixxii";
|
||||
const std::string CustomAchievementfmt = "pppaaaapapaapp";
|
||||
const std::string CustomAchievementIndex = "ID";
|
||||
char const AchievementCriteriafmt[] = "niiiiiiiisiiiiixxiiiiii";
|
||||
char const AchievementCriteriafmt[] = "niiiixiiiisiiiiixxiiiii";
|
||||
char const AreaTableEntryfmt[] = "iiinixxxxxisiiiiiffixxxxxx";
|
||||
char const AreaGroupEntryfmt[] = "niiiiiii";
|
||||
char const AreaPOIEntryfmt[] = "niiiiiiiiiiiffixixxixx";
|
||||
|
||||
Reference in New Issue
Block a user