您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ArenaTeamInfoType函数代码示例

51自学网 2021-06-01 19:47:27
  C++
这篇教程C++ ArenaTeamInfoType函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ArenaTeamInfoType函数的典型用法代码示例。如果您正苦于以下问题:C++ ArenaTeamInfoType函数的具体用法?C++ ArenaTeamInfoType怎么用?C++ ArenaTeamInfoType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ArenaTeamInfoType函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: while

bool ArenaTeam::DisbandNoSave(Player* player){    bool destroy = true;    for (MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)    {        Player *pl = sObjectMgr.GetPlayer(m_members.front().guid);        if (!pl)            continue;        if (!pl->IsBot())        {            destroy = false;            break;        }    }    if (destroy)    {        while (!m_members.empty())        {            for (MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)            {                if (itr->guid == m_members.front().guid)                {                    m_members.erase(itr);                    break;                }            }            if (Player *pl = sObjectMgr.GetPlayer(m_members.front().guid))            {                pl->GetSession()->SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, GetName(), "", 0);                pl->SetInArenaTeam(0, GetSlot(), ARENA_TYPE_NONE);                for(int i = 0; i < ARENA_TEAM_END; ++i)                    pl->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);            }        }        sObjectMgr.RemoveArenaTeam(m_TeamId);    }    else    {        player->GetSession()->SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, GetName(), "", 0);        player->SetInArenaTeam(0, GetSlot(), ARENA_TYPE_NONE);        for(int i = 0; i < ARENA_TEAM_END; ++i)            player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);    }    return destroy;}
开发者ID:Archives,项目名称:easy-mangos,代码行数:48,


示例2: GetName

void ArenaTeam::DelMember(uint64 guid, bool cleanDb){    // Remove member from team    for (MemberList::iterator itr = Members.begin(); itr != Members.end(); ++itr)        if (itr->Guid == guid)        {            Members.erase(itr);            break;        }    // Inform player and remove arena team info from player data    if (Player* player = ObjectAccessor::FindPlayer(guid))    {        player->GetSession()->SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, GetName(), "", 0);        // delete all info regarding this team        for (uint32 i = 0; i < ARENA_TEAM_END; ++i)            player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);        sLog->outArena("Player: %s [GUID: %u] left arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId());    }    // Only used for single member deletion, for arena team disband we use a single query for more efficiency    if (cleanDb)    {        PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHARACTER_DELETE_ARENA_TEAM_MEMBER);        stmt->setUInt32(0, GetId());        stmt->setUInt32(1, GUID_LOPART(guid));        CharacterDatabase.Execute(stmt);    }}
开发者ID:Crash911,项目名称:RaptoredSkyFire,代码行数:29,


示例3: ArenaTeamInfoType

void ArenaTeam::DelMember(ObjectGuid guid, bool cleanDb){    // Remove member from team    for (MemberList::iterator itr = Members.begin(); itr != Members.end(); ++itr)        if (itr->Guid == guid)        {            Members.erase(itr);            break;        }    // Remove arena team info from player data    if (Player* player = ObjectAccessor::FindPlayer(guid))    {        // delete all info regarding this team        for (uint32 i = 0; i < ARENA_TEAM_END; ++i)            player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);        TC_LOG_DEBUG("bg.arena", "Player: %s [%s] left arena team type: %u [Id: %u, Name: %s].", player->GetName().c_str(), player->GetGUID().ToString().c_str(), GetType(), GetId(), GetName().c_str());    }    // Only used for single member deletion, for arena team disband we use a single query for more efficiency    if (cleanDb)    {        PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ARENA_TEAM_MEMBER);        stmt->setUInt32(0, GetId());        stmt->setUInt64(1, guid.GetCounter());        CharacterDatabase.Execute(stmt);    }}
开发者ID:Rastrian,项目名称:My-WoDCore-6.x.x,代码行数:28,


示例4: GetSlot

void ArenaTeam::DelMember(ObjectGuid guid, bool cleanDb){    Player* player = ObjectAccessor::FindConnectedPlayer(guid);    Group* group = (player && player->GetGroup()) ? player->GetGroup() : nullptr;    // Remove member from team    for (MemberList::iterator itr = Members.begin(); itr != Members.end(); ++itr)    {        // Remove queues of members        if (Player* playerMember = ObjectAccessor::FindConnectedPlayer(itr->Guid))        {            if (group && playerMember->GetGroup() && group->GetGUID() == playerMember->GetGroup()->GetGUID())            {                if (BattlegroundQueueTypeId bgQueue = BattlegroundMgr::BGQueueTypeId(BATTLEGROUND_AA, GetType()))                {                    GroupQueueInfo ginfo;                    BattlegroundQueue& queue = sBattlegroundMgr->GetBattlegroundQueue(bgQueue);                    if (queue.GetPlayerGroupInfoData(playerMember->GetGUID(), &ginfo))                        if (!ginfo.IsInvitedToBGInstanceGUID)                        {                            WorldPacket data;                            playerMember->RemoveBattlegroundQueueId(bgQueue);                            sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, nullptr, playerMember->GetBattlegroundQueueIndex(bgQueue), STATUS_NONE, 0, 0, 0, 0);                            queue.RemovePlayer(playerMember->GetGUID(), true);                            playerMember->GetSession()->SendPacket(&data);                        }                }            }        }        if (itr->Guid == guid)        {            Members.erase(itr);            sCharacterCache->UpdateCharacterArenaTeamId(guid, GetSlot(), 0);            break;        }    }    // Inform player and remove arena team info from player data    if (player)    {        player->GetSession()->SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, GetName(), "", 0);        // delete all info regarding this team        for (uint32 i = 0; i < ARENA_TEAM_END; ++i)            player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);        TC_LOG_DEBUG("bg.arena", "Player: %s [GUID: %u] left arena team type: %u [Id: %u, Name: %s].", player->GetName().c_str(), player->GetGUID().GetCounter(), GetType(), GetId(), GetName().c_str());    }    // Only used for single member deletion, for arena team disband we use a single query for more efficiency    if (cleanDb)    {        PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ARENA_TEAM_MEMBER);        stmt->setUInt32(0, GetId());        stmt->setUInt32(1, guid.GetCounter());        CharacterDatabase.Execute(stmt);    }}
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:57,


示例5: GetName

void ArenaTeam::DelMember(uint64 guid){    for (MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)        if (itr->guid == guid)        {            m_members.erase(itr);            break;        }    if (Player *player = sObjectMgr.GetPlayer(guid))    {        player->GetSession()->SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, GetName(), "", 0);        // delete all info regarding this team        for (uint32 i = 0; i < ARENA_TEAM_END; ++i)            player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);        sLog.outArena("Player: %s [GUID: %u] left arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId());    }    CharacterDatabase.PExecute("DELETE FROM arena_team_member WHERE arenateamid = '%u' AND guid = '%u'", GetId(), GUID_LOPART(guid));}
开发者ID:Ballwinkle,项目名称:SkyFireEMU,代码行数:19,


示例6: GetName

void ArenaTeam::DelMember(ObjectGuid guid){    for (MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)    {        if (itr->guid == guid)        {            m_members.erase(itr);            break;        }    }    if(Player *player = sObjectMgr.GetPlayer(guid))    {        player->GetSession()->SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, GetName(), "", 0);        // delete all info regarding this team        for(int i = 0; i < ARENA_TEAM_END; ++i)            player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);    }    CharacterDatabase.PExecute("DELETE FROM arena_team_member WHERE arenateamid = '%u' AND guid = '%u'", GetId(), guid.GetCounter());}
开发者ID:Archives,项目名称:easy-mangos,代码行数:21,


示例7: GetSlot

void ArenaTeam::DelMember(uint64 guid){    for (MemberList::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)        if (itr->guid == guid)        {            m_members.erase(itr);            break;        }    if (Player* player = sObjectMgr.GetPlayer(guid))    {        // remove from arena queue, if queued        for (uint8 i = 0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; ++i)        {            if (uint32 bgQueueType = player->GetBattlegroundQueueId(i))            {                Battleground* bg = sBattlegroundMgr.GetBattlegroundTemplate(bgQueueType);                if (!bg || !bg->isArena())                    break;                WorldPacket data;                sBattlegroundMgr.BuildBattlegroundStatusPacket(&data, bg, player->GetTeam(), player->GetBattlegroundQueueIndex(bgQueueType), STATUS_NONE, 0, 0);                player->GetSession()->SendPacket(&data);                sBattlegroundMgr.m_BattlegroundQueues[bgQueueType].RemovePlayer(player->GetGUID(), false);            }        }        player->SetInArenaTeam(0, GetSlot());        player->GetSession()->SendArenaTeamCommandResult(ERR_ARENA_TEAM_QUIT_S, GetName(), "", 0);        // delete all info regarding this team        for (uint32 i = 0; i < ARENA_TEAM_END; ++i)            player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);        sLog.outArena("Player: %s [GUID: %u] left arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId());    }    CharacterDatabase.PExecute("DELETE FROM arena_team_member WHERE arenateamid = '%u' AND guid = '%u'", GetId(), GUID_LOPART(guid));}
开发者ID:Phentora,项目名称:OregonCore,代码行数:37,



注:本文中的ArenaTeamInfoType函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ ArenaType函数代码示例
C++ Area函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。