summaryrefslogtreecommitdiff
path: root/src/server/game/Battlefield/Battlefield.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Battlefield/Battlefield.cpp')
-rw-r--r--src/server/game/Battlefield/Battlefield.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp
index f74aebff2f..9ad1a9c9a4 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -458,7 +458,7 @@ void Battlefield::BroadcastPacketToZone(WorldPacket const* data) const
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
for (GuidUnorderedSet::const_iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(*itr))
- player->GetSession()->SendPacket(data);
+ player->SendDirectMessage(data);
}
void Battlefield::BroadcastPacketToQueue(WorldPacket const* data) const
@@ -466,7 +466,7 @@ void Battlefield::BroadcastPacketToQueue(WorldPacket const* data) const
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
for (GuidUnorderedSet::const_iterator itr = m_PlayersInQueue[team].begin(); itr != m_PlayersInQueue[team].end(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(*itr))
- player->GetSession()->SendPacket(data);
+ player->SendDirectMessage(data);
}
void Battlefield::BroadcastPacketToWar(WorldPacket const* data) const
@@ -474,7 +474,7 @@ void Battlefield::BroadcastPacketToWar(WorldPacket const* data) const
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
for (GuidUnorderedSet::const_iterator itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr)
if (Player* player = ObjectAccessor::FindPlayer(*itr))
- player->GetSession()->SendPacket(data);
+ player->SendDirectMessage(data);
}
void Battlefield::SendWarning(uint8 id, WorldObject const* target /*= nullptr*/)
@@ -663,7 +663,7 @@ void Battlefield::SendAreaSpiritHealerQueryOpcode(Player* player, const ObjectGu
data << guid << time;
ASSERT(player);
- player->GetSession()->SendPacket(&data);
+ player->SendDirectMessage(&data);
}
// ----------------------
@@ -855,7 +855,7 @@ GameObject* Battlefield::SpawnGameObject(uint32 entry, float x, float y, float z
return go;
}
-Creature* Battlefield::GetCreature(ObjectGuid const guid)
+Creature* Battlefield::GetCreature(ObjectGuid const& guid)
{
if (!m_Map)
return nullptr;
@@ -863,7 +863,7 @@ Creature* Battlefield::GetCreature(ObjectGuid const guid)
return m_Map->GetCreature(guid);
}
-GameObject* Battlefield::GetGameObject(ObjectGuid const guid)
+GameObject* Battlefield::GetGameObject(ObjectGuid const& guid)
{
if (!m_Map)
return nullptr;