Ejemplo n.º 1
0
Group* ArenaMap::GetGroupForTeam(uint32 team) const
{
    // Teams in arena's are in the same group
    PlayerList const& players = GetPlayers();
    for (MapRefManager::iterator itr = players.begin(); itr != players.end(); ++itr)
        if (Player* player = itr->getSource())
            if (player->GetBGTeam() == team)
                return player->GetGroup();
}
Ejemplo n.º 2
0
void InstanceData::LogPossibleCheaters(const char* cheatName)
{
    std::string playerlist="";
    Map::PlayerList players = instance->GetPlayers();
    if (Player* pPlayer = players.getFirst()->getSource())
    {
        for (MapRefManager::iterator itr = players.begin(); itr != players.end(); ++itr)
        {
            playerlist += itr->getSource()->GetName();
            playerlist += " ";
        }
        sLog.outLog(LOG_CHEAT,"Possible cheaters(%s): %s",cheatName,playerlist.c_str());
    
        sWorld.SendGMText(LANG_POSSIBLE_CHEAT, cheatName, pPlayer->GetName(),playerlist.c_str());
    }
}