本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
}
}
示例4: EventPlayerDroppedFlag
void BattleGroundBG::HandleKillPlayer(Player* player, Player* killer)
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
BattleGround::HandleKillPlayer(player, killer);
EventPlayerDroppedFlag(player);
}
示例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();
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}