mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10356] Drop unneeded groupFlag and rename it properly
(based on Schmoozerd's repo commit 1e8c842) Also drop `achievement_criteria_requirement` data use at start timed achivement: its will be checked at criteria update (and complete) case. So wrong criteria will started maybe (timer set but always fail - progress not updated. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
c7761a6db9
commit
3dd8c72a00
5 changed files with 11 additions and 18 deletions
|
|
@ -725,9 +725,6 @@ void AchievementMgr::StartTimedAchievementCriteria(AchievementCriteriaTypes type
|
|||
if (!achievementCriteria->IsExplicitlyStartedTimedCriteria())
|
||||
continue;
|
||||
|
||||
if (achievementCriteria->groupFlag & ACHIEVEMENT_CRITERIA_GROUP_NOT_IN_GROUP && GetPlayer()->GetGroup())
|
||||
continue;
|
||||
|
||||
AchievementEntry const *achievement = sAchievementStore.LookupEntry(achievementCriteria->referredAchievement);
|
||||
if (!achievement)
|
||||
continue;
|
||||
|
|
@ -740,9 +737,8 @@ void AchievementMgr::StartTimedAchievementCriteria(AchievementCriteriaTypes type
|
|||
if (IsCompletedCriteria(achievementCriteria,achievement))
|
||||
continue;
|
||||
|
||||
// if we have additional DB criteria, they must be met to start the criteria
|
||||
AchievementCriteriaRequirementSet const* data = sAchievementMgr.GetCriteriaRequirementSet(achievementCriteria);
|
||||
if (data && !data->Meets(GetPlayer(), NULL)) // TODO this might need more research, if this could be the player, or we also need to pass an unit
|
||||
// Only the Quest-Complete Timed Achievements need the groupcheck, so this check is only needed here
|
||||
if (achievementCriteria->requiredType == ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST && GetPlayer()->GetGroup())
|
||||
continue;
|
||||
|
||||
// do not start already failed timers
|
||||
|
|
@ -782,9 +778,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
|||
{
|
||||
AchievementCriteriaEntry const *achievementCriteria = (*i);
|
||||
|
||||
if (achievementCriteria->groupFlag & ACHIEVEMENT_CRITERIA_GROUP_NOT_IN_GROUP && GetPlayer()->GetGroup())
|
||||
continue;
|
||||
|
||||
AchievementEntry const *achievement = sAchievementStore.LookupEntry(achievementCriteria->referredAchievement);
|
||||
if (!achievement)
|
||||
continue;
|
||||
|
|
@ -1182,6 +1175,9 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
|||
break;
|
||||
}
|
||||
|
||||
// As the groupFlag had wrong meaning, only the Quest-Complete Timed Achievements need the groupcheck, so this check is only needed here
|
||||
if (achievementCriteria->timeLimit > 0 && GetPlayer()->GetGroup())
|
||||
continue;
|
||||
|
||||
change = 1;
|
||||
progressType = PROGRESS_HIGHEST;
|
||||
|
|
|
|||
|
|
@ -89,12 +89,6 @@ enum AchievementCriteriaCompletionFlags
|
|||
ACHIEVEMENT_CRITERIA_FLAG_MONEY_COUNTER = 0x00000020, // Displays counter as money
|
||||
};
|
||||
|
||||
enum AchievementCriteriaGroupFlags
|
||||
{
|
||||
// you mustn't be in a group while fulfilling this achievement
|
||||
ACHIEVEMENT_CRITERIA_GROUP_NOT_IN_GROUP = 2,
|
||||
};
|
||||
|
||||
enum AchievementCriteriaTypes
|
||||
{
|
||||
ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE = 0,
|
||||
|
|
|
|||
|
|
@ -492,7 +492,10 @@ struct AchievementCriteriaEntry
|
|||
char* name[16]; // 9-24
|
||||
//uint32 name_flags; // 25
|
||||
uint32 completionFlag; // 26
|
||||
uint32 groupFlag; // 27
|
||||
//uint32 timedCriteriaStartType; // 27 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; // 28 Alway appears with timed events, used internally to start the achievement, store
|
||||
uint32 timeLimit; // 29 time limit in seconds
|
||||
uint32 showOrder; // 30 show order, also used in achievement shift-links as index in state bitmask
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#define MANGOS_DBCSFRM_H
|
||||
|
||||
const char Achievementfmt[]="niixssssssssssssssssxxxxxxxxxxxxxxxxxxiixixxxxxxxxxxxxxxxxxxii";
|
||||
const char AchievementCriteriafmt[]="niiiiiiiissssssssssssssssxiiiii";
|
||||
const char AchievementCriteriafmt[]="niiiiiiiissssssssssssssssxixiii";
|
||||
const char AreaTableEntryfmt[]="iiinixxxxxissssssssssssssssxixxxxxxx";
|
||||
const char AreaGroupEntryfmt[]="niiiiiii";
|
||||
const char AreaTriggerEntryfmt[]="niffffffff";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10355"
|
||||
#define REVISION_NR "10356"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue