Core/OutdoorPvP: Pass GossipMenuItems to CanTalkTo hook by reference

This commit is contained in:
Shauren
2011-05-26 23:33:05 +02:00
parent a644206f88
commit 00f6164a68
6 changed files with 9 additions and 9 deletions

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);

View File

@@ -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: