mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 00:53:46 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -704,29 +704,60 @@ void BattlefieldWG::OnGameObjectCreate(GameObject* go)
|
||||
void BattlefieldWG::HandleKill(Player* killer, Unit* victim)
|
||||
{
|
||||
if (killer == victim)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TeamId killerTeam = killer->GetTeamId();
|
||||
|
||||
// xinef: tower cannons also grant rank
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER || IsKeepNpc(victim->GetEntry()) || victim->GetEntry() == NPC_WINTERGRASP_TOWER_CANNON)
|
||||
{
|
||||
for (GuidUnorderedSet::const_iterator itr = m_PlayersInWar[killerTeam].begin(); itr != m_PlayersInWar[killerTeam].end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*itr))
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && victim->HasAura(SPELL_LIEUTENANT))
|
||||
{
|
||||
// Quest - Wintergrasp - PvP Kill - Horde/Alliance
|
||||
for (auto& playerGuid : m_PlayersInWar[killerTeam])
|
||||
{
|
||||
if (Player* player = ObjectAccessor::FindPlayer(playerGuid))
|
||||
{
|
||||
if (player->GetDistance2d(killer) < 40)
|
||||
{
|
||||
player->KilledMonsterCredit(killerTeam == TEAM_HORDE ? NPC_QUEST_PVP_KILL_ALLIANCE : NPC_QUEST_PVP_KILL_HORDE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& playerGuid : m_PlayersInWar[killerTeam])
|
||||
{
|
||||
if (Player* player = ObjectAccessor::FindPlayer(playerGuid))
|
||||
{
|
||||
if (player->GetDistance2d(killer) < 40)
|
||||
{
|
||||
PromotePlayer(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Xinef: Allow to Skin non-released corpse
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
victim->SetUnitFlag(UNIT_FLAG_SKINNABLE);
|
||||
}
|
||||
}
|
||||
else if (victim->IsVehicle() && !killer->IsFriendlyTo(victim))
|
||||
{
|
||||
// Quest - Wintergrasp - PvP Kill - Vehicle
|
||||
for (GuidUnorderedSet::const_iterator itr = m_PlayersInWar[killerTeam].begin(); itr != m_PlayersInWar[killerTeam].end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*itr))
|
||||
for (auto& playerGuid : m_PlayersInWar[killerTeam])
|
||||
{
|
||||
if (Player* player = ObjectAccessor::FindPlayer(playerGuid))
|
||||
{
|
||||
if (player->GetDistance2d(killer) < 40)
|
||||
{
|
||||
player->KilledMonsterCredit(NPC_QUEST_PVP_KILL_VEHICLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -218,6 +218,8 @@ enum WintergraspNpcs
|
||||
NPC_QUEST_SOUTHERN_TOWER_KILL = 35074,
|
||||
NPC_QUEST_VEHICLE_PROTECTED = 31284,
|
||||
NPC_QUEST_PVP_KILL_VEHICLE = 31093,
|
||||
NPC_QUEST_PVP_KILL_HORDE = 39019,
|
||||
NPC_QUEST_PVP_KILL_ALLIANCE = 31086,
|
||||
};
|
||||
|
||||
struct BfWGCoordGY
|
||||
|
||||
@@ -2259,8 +2259,12 @@ bool Player::HasQuestForItem(uint32 itemid, uint32 excludeQuestId /* 0 */, bool
|
||||
|
||||
// hide quest if player is in raid-group and quest is no raid quest
|
||||
if (GetGroup() && GetGroup()->isRaidGroup() && !qinfo->IsAllowedInRaid(GetMap()->GetDifficulty()))
|
||||
if (!InBattleground()) //there are two ways.. we can make every bg-quest a raidquest, or add this code here.. i don't know if this can be exploited by other quests, but i think all other quests depend on a specific area.. but keep this in mind, if something strange happens later
|
||||
{
|
||||
if (!InBattleground() && !GetGroup()->isBFGroup()) //there are two ways.. we can make every bg-quest a raidquest, or add this code here.. i don't know if this can be exploited by other quests, but i think all other quests depend on a specific area.. but keep this in mind, if something strange happens later
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// There should be no mixed ReqItem/ReqSource drop
|
||||
// This part for ReqItem drop
|
||||
|
||||
Reference in New Issue
Block a user