aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaintime <vova.ru29999@gmail.com>2015-08-15 19:50:30 +0200
committerjoschiwald <joschiwald.trinity@gmail.com>2015-08-15 19:50:30 +0200
commit79cd2f9bb9e4cc214150ec36a85817bafad814d6 (patch)
tree379cace10fb650f3a55f1f7ae8c45eb77f5c5574 /src
parente1b534e40f4e7a5fc94298c09d4d72bf77adb350 (diff)
Core/Achievement: Fix Save The Day
Closes #15202 Closes #15211
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
index 5c4b1025e8e..f94639efaf4 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp
@@ -882,7 +882,10 @@ bool BattlegroundWS::CheckAchievementCriteriaMeet(uint32 criteriaId, Player cons
switch (criteriaId)
{
case BG_CRITERIA_CHECK_SAVE_THE_DAY:
- return GetFlagState(player->GetTeam()) == BG_WS_FLAG_STATE_ON_BASE;
+ if (target)
+ if (Player const* playerTarget = target->ToPlayer())
+ return GetFlagState(playerTarget->GetTeam()) == BG_WS_FLAG_STATE_ON_BASE;
+ return false;
}
return Battleground::CheckAchievementCriteriaMeet(criteriaId, player, target, miscValue);