fix(Core/Battlegrounds): Fixed Alterac Valley quests. (#10754)

This commit is contained in:
UltraNix
2022-02-22 07:36:20 +01:00
committed by GitHub
parent 33b0183440
commit ccc9bb6679
2 changed files with 18 additions and 5 deletions

View File

@@ -145,9 +145,17 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
DelCreature(AV_CPLACE_TRIGGER18);
}
else if (entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_N_4] || entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_A_4] || entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_H_4])
{
ChangeMineOwner(AV_NORTH_MINE, killer->GetTeamId());
UpdatePlayerScore(killer, SCORE_MINES_CAPTURED, 1);
killer->KilledMonsterCredit(BG_AV_QUEST_CREDIT_MINE);
}
else if (entry == BG_AV_CreatureInfo[AV_NPC_S_MINE_N_4] || entry == BG_AV_CreatureInfo[AV_NPC_S_MINE_A_4] || entry == BG_AV_CreatureInfo[AV_NPC_S_MINE_H_4])
{
ChangeMineOwner(AV_SOUTH_MINE, killer->GetTeamId());
UpdatePlayerScore(killer, SCORE_MINES_CAPTURED, 1);
killer->KilledMonsterCredit(BG_AV_QUEST_CREDIT_MINE);
}
}
void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
@@ -1080,6 +1088,8 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
//update the statistic for the assaulting player
UpdatePlayerScore(player, (IsTower(node)) ? SCORE_TOWERS_ASSAULTED : SCORE_GRAVEYARDS_ASSAULTED, 1);
PlaySoundToAll((teamId == TEAM_ALLIANCE) ? AV_SOUND_ALLIANCE_ASSAULTS : AV_SOUND_HORDE_ASSAULTS);
player->KilledMonsterCredit((IsTower(node)) ? BG_AV_QUEST_CREDIT_TOWER : BG_AV_QUEST_CREDIT_GRAVEYARD);
}
void BattlegroundAV::FillInitialWorldStates(WorldPacket& data)

View File

@@ -111,11 +111,14 @@ enum BG_AV_Sounds
enum BG_AV_OTHER_VALUES
{
AV_STATICCPLACE_MAX = 123,
AV_NORTH_MINE = 0,
AV_SOUTH_MINE = 1,
AV_MINE_TICK_TIMER = 45000,
AV_MINE_RECLAIM_TIMER = 1200000 //TODO: get the right value.. this is currently 20 minutes
AV_STATICCPLACE_MAX = 123,
AV_NORTH_MINE = 0,
AV_SOUTH_MINE = 1,
AV_MINE_TICK_TIMER = 45000,
AV_MINE_RECLAIM_TIMER = 1200000, //TODO: get the right value.. this is currently 20 minutes
BG_AV_QUEST_CREDIT_MINE = 13796,
BG_AV_QUEST_CREDIT_TOWER = 13778,
BG_AV_QUEST_CREDIT_GRAVEYARD = 13756
};
enum BG_AV_ObjectIds