mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
[svn] Fixed a crash in OutdoorPvP*::BuffTeam().
--HG-- branch : trunk
This commit is contained in:
@@ -840,9 +840,9 @@ void OutdoorPvPEP::BuffTeams()
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
{
|
||||
for(int i = 0; i < 4; ++i)
|
||||
plr->RemoveAurasDueToSpell(EP_AllianceBuffs[i]);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(EP_AllianceBuffs[i]);
|
||||
if(m_AllianceTowersControlled && m_AllianceTowersControlled < 5)
|
||||
plr->CastSpell(plr,EP_AllianceBuffs[m_AllianceTowersControlled-1],true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,EP_AllianceBuffs[m_AllianceTowersControlled-1],true);
|
||||
}
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
@@ -850,9 +850,9 @@ void OutdoorPvPEP::BuffTeams()
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
{
|
||||
for(int i = 0; i < 4; ++i)
|
||||
plr->RemoveAurasDueToSpell(EP_HordeBuffs[i]);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(EP_HordeBuffs[i]);
|
||||
if(m_HordeTowersControlled && m_HordeTowersControlled < 5)
|
||||
plr->CastSpell(plr,EP_HordeBuffs[m_HordeTowersControlled-1],true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,EP_HordeBuffs[m_HordeTowersControlled-1],true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,12 +317,12 @@ void OutdoorPvPHP::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->CastSpell(plr,AllianceBuff,true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,AllianceBuff,true);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(HordeBuff);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(HordeBuff);
|
||||
}
|
||||
}
|
||||
else if(team == HORDE)
|
||||
@@ -330,12 +330,12 @@ void OutdoorPvPHP::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->CastSpell(plr,HordeBuff,true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,HordeBuff,true);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(AllianceBuff);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(AllianceBuff);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -343,12 +343,12 @@ void OutdoorPvPHP::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(AllianceBuff);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(AllianceBuff);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(HordeBuff);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(HordeBuff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,12 +72,12 @@ void OutdoorPvPNA::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->CastSpell(plr,NA_CAPTURE_BUFF,true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,NA_CAPTURE_BUFF,true);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(NA_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(NA_CAPTURE_BUFF);
|
||||
}
|
||||
}
|
||||
else if(team == HORDE)
|
||||
@@ -85,12 +85,12 @@ void OutdoorPvPNA::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->CastSpell(plr,NA_CAPTURE_BUFF,true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,NA_CAPTURE_BUFF,true);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(NA_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(NA_CAPTURE_BUFF);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -98,12 +98,12 @@ void OutdoorPvPNA::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(NA_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(NA_CAPTURE_BUFF);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(NA_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(NA_CAPTURE_BUFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,12 +70,12 @@ void OutdoorPvPSI::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->CastSpell(plr,SI_CENARION_FAVOR,true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,SI_CENARION_FAVOR,true);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR);
|
||||
}
|
||||
}
|
||||
else if(team == HORDE)
|
||||
@@ -83,12 +83,12 @@ void OutdoorPvPSI::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->CastSpell(plr,SI_CENARION_FAVOR,true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,SI_CENARION_FAVOR,true);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -96,12 +96,12 @@ void OutdoorPvPSI::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(SI_CENARION_FAVOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,12 +122,12 @@ void OutdoorPvPTF::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->CastSpell(plr,TF_CAPTURE_BUFF,true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,TF_CAPTURE_BUFF,true);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(TF_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(TF_CAPTURE_BUFF);
|
||||
}
|
||||
}
|
||||
else if(team == HORDE)
|
||||
@@ -135,12 +135,12 @@ void OutdoorPvPTF::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->CastSpell(plr,TF_CAPTURE_BUFF,true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,TF_CAPTURE_BUFF,true);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(TF_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(TF_CAPTURE_BUFF);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -148,12 +148,12 @@ void OutdoorPvPTF::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(TF_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(TF_CAPTURE_BUFF);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(TF_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(TF_CAPTURE_BUFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,12 +213,12 @@ void OutdoorPvPZM::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->CastSpell(plr,ZM_CAPTURE_BUFF,true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,ZM_CAPTURE_BUFF,true);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(ZM_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(ZM_CAPTURE_BUFF);
|
||||
}
|
||||
}
|
||||
else if(team == HORDE)
|
||||
@@ -226,12 +226,12 @@ void OutdoorPvPZM::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->CastSpell(plr,ZM_CAPTURE_BUFF,true);
|
||||
if(plr->IsInWorld()) plr->CastSpell(plr,ZM_CAPTURE_BUFF,true);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(ZM_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(ZM_CAPTURE_BUFF);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -239,12 +239,12 @@ void OutdoorPvPZM::BuffTeam(uint32 team)
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[0].begin(); itr != m_PlayerGuids[0].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(ZM_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(ZM_CAPTURE_BUFF);
|
||||
}
|
||||
for(std::set<uint64>::iterator itr = m_PlayerGuids[1].begin(); itr != m_PlayerGuids[1].end(); ++itr)
|
||||
{
|
||||
if(Player * plr = objmgr.GetPlayer(*itr))
|
||||
plr->RemoveAurasDueToSpell(ZM_CAPTURE_BUFF);
|
||||
if(plr->IsInWorld()) plr->RemoveAurasDueToSpell(ZM_CAPTURE_BUFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user