本文整理汇总了C++中OutdoorPvPWG::isWarForTeamFull方法的典型用法代码示例。如果您正苦于以下问题:C++ OutdoorPvPWG::isWarForTeamFull方法的具体用法?C++ OutdoorPvPWG::isWarForTeamFull怎么用?C++ OutdoorPvPWG::isWarForTeamFull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutdoorPvPWG
的用法示例。
在下文中一共展示了OutdoorPvPWG::isWarForTeamFull方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnGossipSelect
bool OnGossipSelect(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 /*uiAction*/)
{
pPlayer->CLOSE_GOSSIP_MENU();
OutdoorPvPWG *BfWG = (OutdoorPvPWG*)sOutdoorPvPMgr->GetOutdoorPvPToZoneId(4197);
if (BfWG && pPlayer->getLevel() > sWorld->getIntConfig(CONFIG_CONFIG_OUTDOORPVP_WINTERGRASP_MINLEVEL))
{
if(BfWG->isWarTime())
{ if(!BfWG->isWarForTeamFull(pPlayer))
BfWG->InvitePlayerToWar(pPlayer);
}
else
{
uint32 uiTime=BfWG->GetTimer();
if(uiTime<15*MINUTE)
BfWG->InvitePlayerToQueue(pPlayer);
}
}
return true;
}
示例2: OnGossipHello
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
OutdoorPvPWG *BfWG = (OutdoorPvPWG*)sOutdoorPvPMgr->GetOutdoorPvPToZoneId(4197);
if (BfWG && pPlayer->getLevel() > sWorld->getIntConfig(CONFIG_CONFIG_OUTDOORPVP_WINTERGRASP_MINLEVEL))
{
if(BfWG->isWarTime())
{
if (!BfWG->isWarForTeamFull(pPlayer))
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,sObjectMgr->GetTrinityStringForDBCLocale(WG_NPCQUEUE_TEXTOPTION_JOIN), GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
pPlayer->SEND_GOSSIP_MENU(BfWG->getDefenderTeam()?WG_NPCQUEUE_TEXT_H_WAR:WG_NPCQUEUE_TEXT_A_WAR, pCreature->GetGUID());
}
else
{
pPlayer->SEND_GOSSIP_MENU(BfWG->getDefenderTeam()?WG_NPCQUEUE_TEXT_H_NOWAR:WG_NPCQUEUE_TEXT_A_NOWAR, pCreature->GetGUID());
}
}
else
{
uint32 uiTime=BfWG->GetTimer();
pPlayer->SendUpdateWorldState(4354,time(NULL)+uiTime);
if(uiTime<15*MINUTE)
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,sObjectMgr->GetTrinityStringForDBCLocale(WG_NPCQUEUE_TEXTOPTION_JOIN), GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
pPlayer->SEND_GOSSIP_MENU(BfWG->getDefenderTeam()?WG_NPCQUEUE_TEXT_H_QUEUE:WG_NPCQUEUE_TEXT_A_QUEUE, pCreature->GetGUID());
}
else
{
pPlayer->SEND_GOSSIP_MENU(BfWG->getDefenderTeam()?WG_NPCQUEUE_TEXT_H_NOWAR:WG_NPCQUEUE_TEXT_A_NOWAR, pCreature->GetGUID());
}
}
}
return true;
}