mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/OutdoorPvP: Pass GossipMenuItems to CanTalkTo hook by reference
This commit is contained in:
@@ -511,7 +511,7 @@ bool OutdoorPvP::HandleGossipOption(Player * plr, uint64 guid, uint32 id)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OutdoorPvP::CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso)
|
||||
bool OutdoorPvP::CanTalkTo(Player* plr, Creature* c, GossipMenuItems const& gso)
|
||||
{
|
||||
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
||||
if (itr->second->CanTalkTo(plr, c, gso))
|
||||
@@ -534,7 +534,7 @@ bool OPvPCapturePoint::HandleGossipOption(Player * /*plr*/, uint64 /*guid*/, uin
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OPvPCapturePoint::CanTalkTo(Player * /*plr*/, Creature * /*c*/, GossipMenuItems /*gso*/)
|
||||
bool OPvPCapturePoint::CanTalkTo(Player* /*plr*/, Creature* /*c*/, GossipMenuItems const& /*gso*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ class OPvPCapturePoint
|
||||
|
||||
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid);
|
||||
|
||||
virtual bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
||||
virtual bool CanTalkTo(Player* plr, Creature* c, GossipMenuItems const& gso);
|
||||
|
||||
virtual bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||
|
||||
@@ -245,7 +245,7 @@ class OutdoorPvP : public ZoneScript
|
||||
|
||||
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid);
|
||||
|
||||
virtual bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
||||
virtual bool CanTalkTo(Player* plr, Creature* c, GossipMenuItems const& gso);
|
||||
|
||||
void TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2 = 0);
|
||||
|
||||
|
||||
@@ -202,11 +202,11 @@ void OutdoorPvPMgr::HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid
|
||||
}
|
||||
}
|
||||
|
||||
bool OutdoorPvPMgr::CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso)
|
||||
bool OutdoorPvPMgr::CanTalkTo(Player* player, Creature* creature, GossipMenuItems const& gso)
|
||||
{
|
||||
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->CanTalkTo(plr, c, gso))
|
||||
if ((*itr)->CanTalkTo(player, creature, gso))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -75,7 +75,7 @@ class OutdoorPvPMgr
|
||||
|
||||
void HandleGossipOption(Player * player, uint64 guid, uint32 gossipid);
|
||||
|
||||
bool CanTalkTo(Player * player, Creature * creature, GossipMenuItems gso);
|
||||
bool CanTalkTo(Player* player, Creature* creature, GossipMenuItems const& gso);
|
||||
|
||||
void HandleDropFlag(Player * plr, uint32 spellId);
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ void OPvPCapturePointZM_GraveYard::SetBeaconState(uint32 controlling_faction)
|
||||
UpdateTowerState();
|
||||
}
|
||||
|
||||
bool OPvPCapturePointZM_GraveYard::CanTalkTo(Player * plr, Creature * c, GossipMenuItems /*gso*/)
|
||||
bool OPvPCapturePointZM_GraveYard::CanTalkTo(Player * plr, Creature * c, GossipMenuItems const& /*gso*/)
|
||||
{
|
||||
uint64 guid = c->GetGUID();
|
||||
std::map<uint64, uint32>::iterator itr = m_CreatureTypes.find(guid);
|
||||
|
||||
@@ -223,7 +223,7 @@ class OPvPCapturePointZM_GraveYard : public OPvPCapturePoint
|
||||
|
||||
bool HandleDropFlag(Player * plr, uint32 spellId);
|
||||
|
||||
bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems gso);
|
||||
bool CanTalkTo(Player * plr, Creature * c, GossipMenuItems const& gso);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user