当前位置: 首页>>代码示例>>C++>>正文


C++ OutdoorPvPWG::isWarForTeamFull方法代码示例

本文整理汇总了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;
   }
开发者ID:Boneseye,项目名称:Rebirth---WoW,代码行数:21,代码来源:wintergrasp.cpp

示例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;
   }
开发者ID:Boneseye,项目名称:Rebirth---WoW,代码行数:39,代码来源:wintergrasp.cpp


注:本文中的OutdoorPvPWG::isWarForTeamFull方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。