本文整理汇总了C++中Battlefield::InvitePlayerToQueue方法的典型用法代码示例。如果您正苦于以下问题:C++ Battlefield::InvitePlayerToQueue方法的具体用法?C++ Battlefield::InvitePlayerToQueue怎么用?C++ Battlefield::InvitePlayerToQueue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Battlefield
的用法示例。
在下文中一共展示了Battlefield::InvitePlayerToQueue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnGossipSelect
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/) override
{
CloseGossipMenuFor(player);
Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
if (!wintergrasp)
return true;
if (wintergrasp->IsWarTime())
wintergrasp->InvitePlayerToWar(player);
else
{
uint32 timer = wintergrasp->GetTimer() / 1000;
if (timer < 15 * MINUTE)
wintergrasp->InvitePlayerToQueue(player);
}
return true;
}
示例2: OnGossipSelect
bool npc_wg_queue::OnGossipSelect(Player* pPlayer, Creature* /*pCreature*/, uint32 /*sender*/, uint32 /*action*/)
{
pPlayer->CLOSE_GOSSIP_MENU();
Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG);
if (!wintergrasp)
return true;
if (wintergrasp->IsWarTime())
wintergrasp->InvitePlayerToWar(pPlayer);
else
{
uint32 timer = wintergrasp->GetTimer() / 1000;
if (timer < 15 * MINUTE)
wintergrasp->InvitePlayerToQueue(pPlayer);
}
return true;
}
示例3: OnGossipSelect
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/)
{
player->CLOSE_GOSSIP_MENU();
Battlefield* BfTB = sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_TB);
if (BfTB)
{
if (BfTB->IsWarTime()){
BfTB->InvitePlayerToWar(player);
}
else
{
uint32 uiTime = BfTB->GetTimer()/1000;
if (uiTime < 15 * MINUTE)
BfTB->InvitePlayerToQueue(player);
}
}
return true;
}