mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[9543] Really call ACHIEVEMENT_CRITERIA_TYPE_WIN_BG
Also make more wide set achievement type criterias expected requirement in DB table. Original patch in achievement call part provided BudIcePenguin. Prepared to mangos sources by Burned@ru-mangos.ru
This commit is contained in:
parent
531b3b669e
commit
b47520a500
3 changed files with 4 additions and 3 deletions
|
|
@ -784,7 +784,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
||||||
if (achievementCriteria->win_bg.bgMapID != GetPlayer()->GetMapId())
|
if (achievementCriteria->win_bg.bgMapID != GetPlayer()->GetMapId())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (achievementCriteria->win_bg.additionalRequirement1_type)
|
if (achievementCriteria->win_bg.additionalRequirement1_type || achievementCriteria->win_bg.additionalRequirement2_type)
|
||||||
{
|
{
|
||||||
// those requirements couldn't be found in the dbc
|
// those requirements couldn't be found in the dbc
|
||||||
AchievementCriteriaRequirementSet const* data = sAchievementMgr.GetCriteriaRequirementSet(achievementCriteria);
|
AchievementCriteriaRequirementSet const* data = sAchievementMgr.GetCriteriaRequirementSet(achievementCriteria);
|
||||||
|
|
@ -2021,7 +2021,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaRequirements()
|
||||||
switch(criteria->requiredType)
|
switch(criteria->requiredType)
|
||||||
{
|
{
|
||||||
case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG:
|
case ACHIEVEMENT_CRITERIA_TYPE_WIN_BG:
|
||||||
if(!criteria->win_bg.additionalRequirement1_type)
|
if(!criteria->win_bg.additionalRequirement1_type && !criteria->win_bg.additionalRequirement2_type)
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE:
|
case ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE:
|
||||||
|
|
|
||||||
|
|
@ -797,6 +797,7 @@ void BattleGround::EndBattleGround(uint32 winner)
|
||||||
{
|
{
|
||||||
RewardMark(plr,ITEM_WINNER_COUNT);
|
RewardMark(plr,ITEM_WINNER_COUNT);
|
||||||
RewardQuestComplete(plr);
|
RewardQuestComplete(plr);
|
||||||
|
plr->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
RewardMark(plr,ITEM_LOSER_COUNT);
|
RewardMark(plr,ITEM_LOSER_COUNT);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9542"
|
#define REVISION_NR "9543"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue