本文整理汇总了C++中EventPlayerDroppedFlag函数的典型用法代码示例。如果您正苦于以下问题:C++ EventPlayerDroppedFlag函数的具体用法?C++ EventPlayerDroppedFlag怎么用?C++ EventPlayerDroppedFlag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了EventPlayerDroppedFlag函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: TC_LOG_ERROR
void BattlegroundWS::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/)
{
// sometimes flag aura not removed :(
if (IsAllianceFlagPickedup() && m_FlagKeepers[TEAM_ALLIANCE] == guid)
{
if (!player)
{
TC_LOG_ERROR("bg.battleground", "BattlegroundWS: Removing offline player who has the FLAG!!");
SetAllianceFlagPicker(0);
RespawnFlag(ALLIANCE, false);
}
else
EventPlayerDroppedFlag(player);
}
if (IsHordeFlagPickedup() && m_FlagKeepers[TEAM_HORDE] == guid)
{
if (!player)
{
TC_LOG_ERROR("bg.battleground", "BattlegroundWS: Removing offline player who has the FLAG!!");
SetHordeFlagPicker(0);
RespawnFlag(HORDE, false);
}
else
EventPlayerDroppedFlag(player);
}
}
开发者ID:3306665,项目名称:trinitycore,代码行数:26,代码来源:BattlegroundWS.cpp
示例2: ClearAllianceFlagCarrier
void BattleGroundWS::RemovePlayer(Player* plr, ObjectGuid guid)
{
// sometimes flag aura not removed :(
if (IsAllianceFlagPickedUp() && m_flagCarrierAlliance == guid)
{
if (!plr)
{
sLog.outError("BattleGroundWS: Removing offline player who has the FLAG!!");
ClearAllianceFlagCarrier();
RespawnFlag(ALLIANCE, false);
}
else
EventPlayerDroppedFlag(plr);
}
if (IsHordeFlagPickedUp() && m_flagCarrierHorde == guid)
{
if (!plr)
{
sLog.outError("BattleGroundWS: Removing offline player who has the FLAG!!");
ClearHordeFlagCarrier();
RespawnFlag(HORDE, false);
}
else
EventPlayerDroppedFlag(plr);
}
}
开发者ID:LabGod,项目名称:server,代码行数:26,代码来源:BattleGroundWS.cpp
示例3: EventPlayerDroppedFlag
void BattlegroundEY::RemovePlayer(Player* plr, uint64 guid, uint32 /*team*/)
{
// sometimes flag aura not removed :(
for(int j = EY_POINTS_MAX; j >= 0; --j)
{
for(size_t i = 0; i < m_PlayersNearPoint[j].size(); ++i)
if(m_PlayersNearPoint[j][i] == guid)
{
m_PlayersNearPoint[j].erase(m_PlayersNearPoint[j].begin() + i);
break;
}
}
if(IsFlagPickedup())
{
if(m_FlagKeeper == guid)
{
if(plr)
EventPlayerDroppedFlag(plr);
else
{
SetFlagPicker(0);
RespawnFlag(true);
}
}
}
}
开发者ID:Darkelmo,项目名称:MythCore,代码行数:26,代码来源:BattlegroundEY.cpp
示例4: EventPlayerDroppedFlag
void BattleGroundBG::HandleKillPlayer(Player* player, Player* killer)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
BattleGround::HandleKillPlayer(player, killer);
EventPlayerDroppedFlag(player);
}
开发者ID:Jojo2323,项目名称:mangos3,代码行数:8,代码来源:BattleGroundBG.cpp
示例5: EventPlayerDroppedFlag
void BattleGroundEY::RemovePlayer(Player* plr, ObjectGuid guid)
{
// sometimes flag aura not removed :(
if (IsFlagPickedUp())
{
if (m_flagCarrier == guid)
{
if (plr)
EventPlayerDroppedFlag(plr);
else
{
ClearFlagCarrier();
RespawnFlag();
}
}
}
}
开发者ID:mangosfour,项目名称:server,代码行数:17,代码来源:BattleGroundEY.cpp
示例6: while
void BattlegroundEY::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/)
{
if (!player)
return;
for (uint8 i = 0; i < EY_POINTS_MAX; ++i)
{
if (!m_PlayersNearPoint[i].empty())
{
uint8 j = 0;
while (j < m_PlayersNearPoint[i].size())
{
Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[i][j]);
if (!player)
{
++j;
continue;
}
if (player->GetGUID() == guid)
{
m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j);
break;
}
else ++j;
}
}
}
if (IsFlagPickedup())
{
if (m_FlagKeeper == guid)
{
if (player)
EventPlayerDroppedFlag(player);
else
{
SetFlagPicker(0);
RespawnFlag(true);
}
}
}
}
开发者ID:Expery,项目名称:Core,代码行数:43,代码来源:BattlegroundEY.cpp
示例7: EventPlayerDroppedFlag
void BattleGroundAC::RemovePlayer(Player *plr, ObjectGuid guid)
{
// sometimes flag aura not removed :(
for (int j = BG_AC_NODES_MAX; j >= 0; --j)
{
for(size_t i = 0; i < m_PlayersNearPoint[j].size(); ++i)
if (m_PlayersNearPoint[j][i] == guid)
m_PlayersNearPoint[j].erase(m_PlayersNearPoint[j].begin() + i);
}
if (IsFlagPickedup())
{
if (m_FlagKeeper == guid)
{
if (plr)
EventPlayerDroppedFlag(plr);
else
{
ClearFlagPicker();
RespawnFlag(true);
}
}
}
}
开发者ID:hodobaj,项目名称:DTD-Edition,代码行数:23,代码来源:BattleGroundAC.cpp
注:本文中的EventPlayerDroppedFlag函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论