这篇教程C++ ArenaTeamInfoType函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ArenaTeamInfoType函数的典型用法代码示例。如果您正苦于以下问题:C++ ArenaTeamInfoType函数的具体用法?C++ ArenaTeamInfoType怎么用?C++ ArenaTeamInfoType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ArenaTeamInfoType函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: whilebool 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: GetNamevoid 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: ArenaTeamInfoTypevoid 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: GetSlotvoid 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: GetNamevoid 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: GetNamevoid 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: GetSlotvoid 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函数代码示例 |