aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.h2
-rwxr-xr-xsrc/server/game/Achievements/AchievementMgr.cpp5
-rwxr-xr-xsrc/server/game/DataStores/DBCEnums.h2
-rwxr-xr-xsrc/server/game/Maps/Map.h1
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp4
5 files changed, 10 insertions, 4 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
index e1de1fe091b..277edb7a337 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
@@ -182,7 +182,7 @@ struct ScriptedAI : public CreatureAI
Difficulty GetDifficulty() { return _difficulty; }
// return true for 25 man or 25 man heroic mode
- bool Is25ManRaid() { return _difficulty & 1; }
+ bool Is25ManRaid() { return _difficulty & RAID_DIFFICULTY_MASK_25MAN; }
template<class T> inline
const T& DUNGEON_MODE(const T& normal5, const T& heroic10)
diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp
index 4252176941d..3262af05f5f 100755
--- a/src/server/game/Achievements/AchievementMgr.cpp
+++ b/src/server/game/Achievements/AchievementMgr.cpp
@@ -334,7 +334,10 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un
case ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT:
return sScriptMgr->OnCriteriaCheck(this, const_cast<Player*>(source), const_cast<Unit*>(target));
case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY:
- return source->GetMap()->GetSpawnMode() == difficulty.difficulty;
+ if (source->GetMap()->IsRaid())
+ if (source->GetMap()->Is25ManRaid() != (difficulty.difficulty & RAID_DIFFICULTY_MASK_25MAN))
+ return false;
+ return source->GetMap()->GetSpawnMode() >= difficulty.difficulty;
case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT:
return source->GetMap()->GetPlayersCountExceptGMs() <= map_players.maxcount;
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM:
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h
index ac47b4a28f3..0a4c6b70b9f 100755
--- a/src/server/game/DataStores/DBCEnums.h
+++ b/src/server/game/DataStores/DBCEnums.h
@@ -278,6 +278,8 @@ enum Difficulty
RAID_DIFFICULTY_25MAN_HEROIC = 3,
};
+#define RAID_DIFFICULTY_MASK_25MAN 1 // since 25man difficulties are 1 and 3, we can check them like that
+
#define MAX_DUNGEON_DIFFICULTY 3
#define MAX_RAID_DIFFICULTY 4
#define MAX_DIFFICULTY 4
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index f430002fca6..c778fe6ea5c 100755
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -365,6 +365,7 @@ class Map : public GridRefManager<NGridType>
bool IsRaid() const { return i_mapEntry && i_mapEntry->IsRaid(); }
bool IsRaidOrHeroicDungeon() const { return IsRaid() || i_spawnMode > DUNGEON_DIFFICULTY_NORMAL; }
bool IsHeroic() const { return IsRaid() ? i_spawnMode >= RAID_DIFFICULTY_10MAN_HEROIC : i_spawnMode >= DUNGEON_DIFFICULTY_HEROIC; }
+ bool Is25ManRaid() const { return IsRaid() && i_spawnMode & RAID_DIFFICULTY_MASK_25MAN; } // since 25man difficulties are 1 and 3, we can check them like that
bool IsBattleground() const { return i_mapEntry && i_mapEntry->IsBattleground(); }
bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); }
bool IsBattlegroundOrArena() const { return i_mapEntry && i_mapEntry->IsBattlegroundOrArena(); }
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 986c1667f62..d1aee5b884e 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5856,7 +5856,7 @@ void Spell::EffectReputation(SpellEffIndex effIndex)
{
rep_change = int32((float)rep_change * repData->spell_rate);
}
-
+
// Bonus from spells that increase reputation gain
float bonus = rep_change * _player->GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN) / 100.0f; // 10%
rep_change += (int32)bonus;
@@ -6952,7 +6952,7 @@ void Spell::EffectCastButtons(SpellEffIndex effIndex)
if (!ab || ab->GetType() != ACTION_BUTTON_SPELL)
continue;
- //! Action button data is unverified when it's set so it can be "hacked"
+ //! Action button data is unverified when it's set so it can be "hacked"
//! to contain invalid spells, so filter here.
uint32 spell_id = ab->GetAction();
if (!spell_id)