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


C++ QuestLogEntry::Complete方法代码示例

本文整理汇总了C++中QuestLogEntry::Complete方法的典型用法代码示例。如果您正苦于以下问题:C++ QuestLogEntry::Complete方法的具体用法?C++ QuestLogEntry::Complete怎么用?C++ QuestLogEntry::Complete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QuestLogEntry的用法示例。


在下文中一共展示了QuestLogEntry::Complete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GossipSelectOption

        void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char* Code)
        {
            if(!pObject->IsCreature())
                return;
            Creature* pCreature = static_cast<Creature*>(pObject);

            GossipMenu* Menu;
            switch(IntId)
            {
                case 0: // Return to start
                    GossipHello(pCreature, plr);
                    break;

                case 1: //Horde
                    {
                        objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4715, plr);
                        Menu->SendTo(plr);

                        QuestLogEntry* qle = plr->GetQuestLogForEntry(6002);
                        if(qle == NULL)
                            return;

                        if(qle->CanBeFinished())
                            return;

                        qle->Complete();
                        qle->SendQuestComplete();
                        qle->UpdatePlayerFields();

                        pCreature->Emote(EMOTE_ONESHOT_WAVE);
                        pCreature->Despawn(240000, 0);
                    }
                    break;

                case 2: //Ally
                    {
                        objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4715, plr);
                        Menu->SendTo(plr);

                        QuestLogEntry* qle = plr->GetQuestLogForEntry(6001);
                        if(qle == NULL)
                            return;

                        if(qle->CanBeFinished())
                            return;

                        qle->Complete();
                        qle->SendQuestComplete();
                        qle->UpdatePlayerFields();

                        pCreature->Emote(EMOTE_ONESHOT_WAVE);
                        pCreature->Despawn(240000, 0);
                    }
                    break;

            }
        }
开发者ID:Nupper,项目名称:AscEmu,代码行数:57,代码来源:Quest_Druid.cpp

示例2: OnSelectOption

        void OnSelectOption(Object* pObject, Player* Plr, uint32 Id, const char* Code)
        {
            switch(Id)
            {
                case 0:  Arcemu::Gossip::Menu::SendQuickMenu(Plr->GetGUID(), 2714, Plr, 1, Arcemu::Gossip::ICON_CHAT, RaggedJohn_GOSSIP_0); break;
                case 1:  Arcemu::Gossip::Menu::SendQuickMenu(Plr->GetGUID(), 2715, Plr, 2, Arcemu::Gossip::ICON_CHAT, RaggedJohn_GOSSIP_1); break;
                case 2:  Arcemu::Gossip::Menu::SendQuickMenu(Plr->GetGUID(), 2716, Plr, 3, Arcemu::Gossip::ICON_CHAT, RaggedJohn_GOSSIP_2); break;
                case 3:  Arcemu::Gossip::Menu::SendQuickMenu(Plr->GetGUID(), 2717, Plr, 4, Arcemu::Gossip::ICON_CHAT, RaggedJphn_GOSSIP_3); break;
                case 4:  Arcemu::Gossip::Menu::SendQuickMenu(Plr->GetGUID(), 2718, Plr, 5, Arcemu::Gossip::ICON_CHAT, RaggedJohn_GOSSIP_4); break;
                case 5:  Arcemu::Gossip::Menu::SendQuickMenu(Plr->GetGUID(), 2719, Plr, 6, Arcemu::Gossip::ICON_CHAT, RaggedJohn_GOSSIP_5); break;
                case 6:  Arcemu::Gossip::Menu::SendQuickMenu(Plr->GetGUID(), 2720, Plr, 7, Arcemu::Gossip::ICON_CHAT, RaggedJohn_GOSSIP_6); break;
                case 7:  Arcemu::Gossip::Menu::SendQuickMenu(Plr->GetGUID(), 2721, Plr, 8, Arcemu::Gossip::ICON_CHAT, RaggedJohn_GOSSIP_7); break;
                case 8:  Arcemu::Gossip::Menu::SendQuickMenu(Plr->GetGUID(), 2722, Plr, 9, Arcemu::Gossip::ICON_CHAT, RaggedJohn_GOSSIP_8); break;
                case 9:  Arcemu::Gossip::Menu::SendQuickMenu(Plr->GetGUID(), 2723, Plr, 10, Arcemu::Gossip::ICON_CHAT, RaggedJohn_GOSSIP_9); break;
                case 10: Arcemu::Gossip::Menu::SendQuickMenu(Plr->GetGUID(), 2725, Plr, 11, Arcemu::Gossip::ICON_CHAT, RaggedJohn_GOSSIP_10); break;
                case 11:
                {
                    QuestLogEntry* pQuest = Plr->GetQuestLogForEntry(4224);
                    if(!pQuest)
                        return;

                    pQuest->Complete();
                    pQuest->SendQuestComplete();
                    pQuest->UpdatePlayerFields();
                    Arcemu::Gossip::Menu::Complete(Plr);
                }
            }
        }
开发者ID:lev1976g,项目名称:easywow,代码行数:28,代码来源:Quest_BurningSteppes.cpp

示例3: OnSelectOption

 void OnSelectOption(Object* pObject, Player* plr, uint32 Id, const char* Code)
 {
     switch(Id)
     {
         case 0: Arcemu::Gossip::Menu::SendQuickMenu(pObject->GetGUID(), 3759, plr, 1, Arcemu::Gossip::ICON_CHAT, "What do you do here?"); break;
         case 1: Arcemu::Gossip::Menu::SendQuickMenu(pObject->GetGUID(), 3760, plr, 2, Arcemu::Gossip::ICON_CHAT, "I can help you"); break;
         case 2: Arcemu::Gossip::Menu::SendQuickMenu(pObject->GetGUID(), 3761, plr, 3, Arcemu::Gossip::ICON_CHAT, "What deal?"); break;
         case 3: Arcemu::Gossip::Menu::SendQuickMenu(pObject->GetGUID(), 3762, plr, 4, Arcemu::Gossip::ICON_CHAT, "Then what happened?"); break;
         case 4: Arcemu::Gossip::Menu::SendQuickMenu(pObject->GetGUID(), 3763, plr, 5, Arcemu::Gossip::ICON_CHAT, "He is not safe, i'll make sure of that."); break;
         case 5:
         {
             QuestLogEntry* pQuest = plr->GetQuestLogForEntry(5126);
             if (pQuest)
             {
                 pQuest->Complete();
                 pQuest->UpdatePlayerFields();
                 pQuest->SendQuestComplete();
             }
             plr->Gossip_Complete();
         }break;
     }
 }
开发者ID:lev1976g,项目名称:easywow,代码行数:22,代码来源:Quest_Winterspring.cpp


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