• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetAchievementStore函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetAchievementStore函数的典型用法代码示例。如果您正苦于以下问题:C++ GetAchievementStore函数的具体用法?C++ GetAchievementStore怎么用?C++ GetAchievementStore使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: JustDied

    void JustDied(Unit* pKiller)
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_LOKEN, DONE);

        if (!m_bIsRegularMode)
        {
            if (m_bIsAchievInTime)
            {
                AchievementEntry const *AchievTimelyDeath = GetAchievementStore()->LookupEntry(ACHIEV_TIMELY_DEATH);
                if (AchievTimelyDeath)
                {
                    Map* pMap = m_creature->GetMap();
                    if (pMap && pMap->IsDungeon())
                    {
                        Map::PlayerList const &players = pMap->GetPlayers();
                        for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
                            itr->getSource()->CompletedAchievement(AchievTimelyDeath);
                    }
                }
            }
        }
    }
开发者ID:xXNembiXx,项目名称:ScriptDev2_333,代码行数:25,代码来源:boss_loken.cpp


示例2: JustDied

        void JustDied(Unit* /*killer*/)
        {
            DoScriptText(SAY_DEATH, me);

            if (pInstance)
            {
                /*if (IsHeroic() && !bMoreThanTwoIntenseCold)
                    pInstance->DoCompleteAchievement(ACHIEV_INTENSE_COLD);*/
                if (IsHeroic())
                {
                    AchievementEntry const *achievIntenseCold = GetAchievementStore()->LookupEntry(ACHIEV_INTENSE_COLD);
                    if (achievIntenseCold)
                    {
                        Map::PlayerList const &players = pInstance->instance->GetPlayers();
                        for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
                        {
                            if (lMoreThanTwoIntenseCold.find(itr->getSource()->GetGUID()) != lMoreThanTwoIntenseCold.end())
                                continue;
                            else
                                itr->getSource()->CompletedAchievement(achievIntenseCold);
                        }
                    }
                }
                pInstance->SetData(DATA_KERISTRASZA_EVENT, DONE);
            }
        }
开发者ID:Jekls,项目名称:trinity,代码行数:26,代码来源:boss_keristrasza.cpp


示例3: HandleAchievementAddCommand

    static bool HandleAchievementAddCommand(ChatHandler* handler, const char *args)
    {
        if (!*args)
            return false;

        uint32 achievementId = atoi((char*)args);
        if (!achievementId)
        {
            if (char* cId = handler->extractKeyFromLink((char*)args, "Hachievement"))
                achievementId = atoi(cId);
            if (!achievementId)
                return false;
        }

        Player* target = handler->getSelectedPlayer();
        if (!target)
        {
            handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
            handler->SetSentErrorMessage(true);
            return false;
        }

        if (AchievementEntry const* pAE = GetAchievementStore()->LookupEntry(achievementId))
            target->CompletedAchievement(pAE);

        return true;
    }
开发者ID:wuhongyi1977,项目名称:StrawberryCore,代码行数:27,代码来源:cs_achievement.cpp


示例4: OnGossipHello

    bool OnGossipHello(Player* pPlayer, Creature* pCreature)
    {
        const AchievementEntry * achiCrusader = GetAchievementStore()->LookupEntry(pPlayer->GetTeam() == TEAM_HORDE ? ACHI_CRUSADER_H : ACHI_CRUSADER_A);
        if (pPlayer->HasTitle(TITLE_CRUSADER) || pPlayer->GetAchievementMgr().HasAchieved(achiCrusader))
            pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);

        pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
        return true;
    }
开发者ID:AlexTheBest,项目名称:ACore,代码行数:9,代码来源:icecrown.cpp


示例5: OnQuestReward

    bool OnQuestReward(Player* pPlayer, Creature* /*pCreature*/, Quest const* pQuest, uint32 /*opt*/)
    {
        if(pQuest->GetQuestId() == 11023 && IsHolidayActive(HOLIDAY_FEAST_OF_WINTER_VEIL) && pPlayer->HasAura(62061))
        {
            if(AchievementEntry const* pAchievement = GetAchievementStore()->LookupEntry(1282))
                pPlayer->CompletedAchievement(pAchievement);
        }

        return true;
    }
开发者ID:Darkelmo,项目名称:MythCore,代码行数:10,代码来源:blades_edge_mountains.cpp


示例6: GetAchievementStore

// Complete Achievement for all players in instance
void InstanceScript::DoCompleteAchievement(uint32 achievement)
{
    AchievementEntry const* pAE = GetAchievementStore()->LookupEntry(achievement);
    Map::PlayerList const &PlayerList = instance->GetPlayers();

    if(!pAE)
        return;

    if(!PlayerList.isEmpty()) {
        for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
            if(Player* pPlayer = i->getSource())
                pPlayer->CompletedAchievement(pAE);
    }
}
开发者ID:Desch,项目名称:MythCore,代码行数:15,代码来源:InstanceScript.cpp


示例7: GetAchievementStore

// Complete Achievement for all players in instance
void InstanceScript::DoCompleteAchievement(uint32 achievement)
{
    AchievementEntry const* pAE = GetAchievementStore()->LookupEntry(achievement);
    Map::PlayerList const &PlayerList = instance->GetPlayers();

    if (!pAE)
    {
        sLog->outError("TSCR: DoCompleteAchievement called for not existing achievement %u", achievement);
        return;
    }

    if (!PlayerList.isEmpty())
        for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
            if (Player *pPlayer = i->getSource())
                pPlayer->CompletedAchievement(pAE);
}
开发者ID:ProjectStarGate,项目名称:StarGateEmu-Projekt,代码行数:17,代码来源:InstanceScript.cpp


示例8: JustDied

    void JustDied(Unit* killer)
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (pInstance)
            pInstance->SetData(DATA_MAIDEN_OF_GRIEF_EVENT, DONE);

        AchievementEntry const *AchievGoodGrief = GetAchievementStore()->LookupEntry(ACHIEVEMENT_GOOD_GRIEF);
        Map* pMap = m_creature->GetMap();

        if (IsHeroic() && AchievTimer < 60000 && pMap && pMap->IsDungeon() && AchievGoodGrief)
        {
            Map::PlayerList const &players = pMap->GetPlayers();
                    for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
                        itr->getSource()->CompletedAchievement(AchievGoodGrief);
        }
    }
开发者ID:Ickybad,项目名称:diamondcore2,代码行数:17,代码来源:boss_maiden_of_grief.cpp


示例9: GetAchievementStore

// *****************************************************
// *******************Reward System*********************
// *****************************************************
void BattlefieldWG::DoCompleteOrIncrementAchievement(uint32 achievement, Player *player, uint8 /*incrementNumber */ )
{
    AchievementEntry const* AE = GetAchievementStore()->LookupEntry(achievement);

    switch (achievement)
    {
        case ACHIEVEMENTS_WIN_WG_100:
            {
                // player->GetAchievementMgr().UpdateAchievementCriteria();
            }
        default:
            {
                if (player)
                    player->CompletedAchievement(AE);
            }
            break;
    }
}
开发者ID:Gosa1979,项目名称:ArkCORE2,代码行数:21,代码来源:BattlefieldWG.cpp


示例10: JustDied

        void JustDied(Unit* /*killer*/)
        {
            DoScriptText(SAY_DEATH, me);

            AchievementEntry const *achievSnakes = GetAchievementStore()->LookupEntry(ACHIEV_SNAKES);
            if (achievSnakes && IsHeroic())
            {
                for (std::set<uint64>::const_iterator itr = lUnWrappedPlayers.begin(); itr != lUnWrappedPlayers.end(); ++itr)
                {
                    Player* temp = Unit::GetPlayer(*me, *itr);
                    if (temp && temp->isAlive() && (temp->GetDistance2d(me) < 100))
                        temp->CompletedAchievement(achievSnakes);
                }
            } 
     
            if (pInstance)
                pInstance->SetData(DATA_SLAD_RAN_EVENT, DONE);
        }
开发者ID:St3ve,项目名称:TrinityCore,代码行数:18,代码来源:boss_slad_ran.cpp


示例11: JustDied

        void JustDied(Unit* /*killer*/)
        {
            DoScriptText(SAY_DEATH, me);

            if (pInstance)
            {
                AchievementEntry const *achievIntenseCold = GetAchievementStore()->LookupEntry(ACHIEV_INTENSE_COLD);
                if (achievIntenseCold && IsHeroic())
                {
                    for (std::set<uint64>::const_iterator itr = lIntenseColdPlayers.begin(); itr != lIntenseColdPlayers.end(); ++itr)
                    {
                        Player* temp = Unit::GetPlayer(*me, *itr);
                        if (temp && temp->isAlive() && (temp->GetDistance2d(me) < 50))
                            temp->CompletedAchievement(achievIntenseCold);
                    }
                }

                pInstance->SetData(DATA_KERISTRASZA_EVENT, DONE);
            }
        }
开发者ID:Expecto,项目名称:chaoscore,代码行数:20,代码来源:boss_keristrasza.cpp


示例12: JustDied

    void JustDied(Unit* killer)
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (pInstance)
        {
            pInstance->SetData(DATA_PRINCE_TALDARAM_EVENT, DONE);

            //The Party's Over achievement:
            AchievementEntry const *AchievThePartyIsOver = GetAchievementStore()->LookupEntry(ACHIEVEMENT_THE_PARTY_IS_OVER);
            Map* pMap = m_creature->GetMap();
            if (pMap && pMap->IsDungeon() && HeroicMode && AchievThePartyIsOver)
            {
                Map::PlayerList const &players = pMap->GetPlayers();
                if (players.getSize() < 5)
                    for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
                        itr->getSource()->CompletedAchievement(AchievThePartyIsOver);
            }
        }
    }
开发者ID:LordVoldemort,项目名称:Shindorei,代码行数:20,代码来源:boss_prince_taldaram.cpp


示例13: JustDied

    void JustDied(Unit* pKiller)
    {
        DoScriptText(SAY_DEATH, m_creature);

        if(m_pInstance)
			m_pInstance->SetData(TYPE_HEIGAN, DONE);

        if (!m_bIsPlayerDeath)
        {
            AchievementEntry const *AchievSafetyDance = GetAchievementStore()->LookupEntry(m_bIsRegularMode ? ACHIEV_SAFETY_DANCE : H_ACHIEV_SAFETY_DANCE);
            if (AchievSafetyDance)
            {
                Map* pMap = m_creature->GetMap();
                if (pMap && pMap->IsDungeon())
                {
                    Map::PlayerList const &players = pMap->GetPlayers();
                    for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
                        itr->getSource()->CompletedAchievement(AchievSafetyDance);
                }
            }
        }
    }
开发者ID:xXNembiXx,项目名称:scriptdev2_335,代码行数:22,代码来源:boss_heigan.cpp


示例14: JustDied

        void JustDied(Unit* /*killer*/)
        {
            DoScriptText(SAY_DEATH, me);

            if (IsHeroic() && !ShatterFrostTomb)
            {
                AchievementEntry const *AchievOnTheRocks = GetAchievementStore()->LookupEntry(ACHIEVEMENT_ON_THE_ROCKS);
                if (AchievOnTheRocks)
                {
                    Map* pMap = me->GetMap();
                    if (pMap && pMap->IsDungeon())
                    {
                        Map::PlayerList const &players = pMap->GetPlayers();
                        for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
                            itr->getSource()->CompletedAchievement(AchievOnTheRocks);
                    }
                }
            }

            if (pInstance)
                pInstance->SetData(DATA_PRINCEKELESETH_EVENT, DONE);
        }
开发者ID:ALive-WoW,项目名称:RC2,代码行数:22,代码来源:boss_keleseth.cpp


示例15: JustDied

    void JustDied(Unit* killer)
    {
        DoScriptText(SAY_SLAY_3,m_creature);

        if (HeroicMode && !DeadAhnkaharGuardian)
        {
            AchievementEntry const *AchievRespectYourElders = GetAchievementStore()->LookupEntry(ACHIEVEMENT_RESPECT_YOUR_ELDERS);
            if (AchievRespectYourElders)
            {
                Map* pMap = m_creature->GetMap();
                if (pMap && pMap->IsDungeon())
                {
                    Map::PlayerList const &players = pMap->GetPlayers();
                    for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
                        itr->getSource()->CompletedAchievement(AchievRespectYourElders);
                }            
            }        
        }

        if (pInstance)
            pInstance->SetData(DATA_ELDER_NADOX_EVENT, DONE);
    }
开发者ID:pfchrono,项目名称:mangos-mods,代码行数:22,代码来源:boss_elder_nadox.cpp


示例16: JustDied

    void JustDied(Unit* killer)
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (pInstance)
        {
            pInstance->SetData(DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, DONE);
            //Achievement: Watch him die
            AchievementEntry const *AchievWatchHimDie = GetAchievementStore()->LookupEntry(ACHIEVEMENT_WATCH_HIM_DIE);
            Map* pMap = m_creature->GetMap();
            Creature *pAdd1, *pAdd2, *pAdd3;
            if ((pAdd1 = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_WATCHER_GASHRA))) && pAdd1->isAlive() &&
                (pAdd2 = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_WATCHER_SILTHIK))) && pAdd2->isAlive() &&
                (pAdd3 = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_WATCHER_NARJIL))) && pAdd3->isAlive() &&
                RegularMode && pMap && pMap->IsDungeon() && AchievWatchHimDie)
            {
                Map::PlayerList const &players = pMap->GetPlayers();
                for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
                    itr->getSource()->CompletedAchievement(AchievWatchHimDie);
            }
        }
    }
开发者ID:Sanzzes,项目名称:wopc-core,代码行数:22,代码来源:boss_krikthir_the_gatewatcher.cpp


示例17: JustDied

    void JustDied(Unit* killer)
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (!m_bIsRegularMode && AchievementProgress == 2)
        {
            AchievementEntry const *AchievSplitPersonality = GetAchievementStore()->LookupEntry(ACHIEV_SPLIT_PERSONALITY);
            if (AchievSplitPersonality)
            {
                Map* pMap = m_creature->GetMap();
                if (pMap && pMap->IsDungeon())
                {
                    Map::PlayerList const &players = pMap->GetPlayers();
                    for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
                        itr->getSource()->CompletedAchievement(AchievSplitPersonality);
                }
            }
        }

        if (m_pInstance)
            m_pInstance->SetData(DATA_MAGUS_TELESTRA_EVENT, DONE);
    }
开发者ID:Infinity-MaNGOS-Project-FallenAngelX,项目名称:infinity_mangos,代码行数:22,代码来源:boss_telestra.cpp


示例18: JustDied

    void JustDied(Unit* pKiller)
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_PATCHWERK, DONE);

		if (m_bIsAchievInTime)
		{
			AchievementEntry const *AchievMakeQuick = GetAchievementStore()->LookupEntry(m_bIsRegularMode ? ACHIEV_MAKE_QUICK : H_ACHIEV_MAKE_QUICK);
			if (AchievMakeQuick)
			{
				Map* pMap = m_creature->GetMap();
				if (pMap && pMap->IsDungeon())
				{
					Map::PlayerList const &players = pMap->GetPlayers();
					for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
						itr->getSource()->CompletedAchievement(AchievMakeQuick);
				}
			}
		}
    }
开发者ID:xXNembiXx,项目名称:ScriptDev2_333,代码行数:22,代码来源:boss_patchwerk.cpp


示例19: JustDied

    void JustDied(Unit* killer)
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (!RegularMode && !MoreThanTwoIntenseCold)
        {
            AchievementEntry const *AchievIntenseCold = GetAchievementStore()->LookupEntry(ACHIEVEMENT_INTENSE_COLD);
            if (AchievIntenseCold)
            {
                Map* pMap = m_creature->GetMap();
                if (pMap && pMap->IsDungeon())
                {
                    Map::PlayerList const &players = pMap->GetPlayers();
                    for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
                        itr->getSource()->CompletedAchievement(AchievIntenseCold);
                }
            }
        }

        if (pInstance)
            pInstance->SetData(DATA_KERISTRASZA_EVENT, DONE);
    }
开发者ID:Sanzzes,项目名称:wopc-core,代码行数:22,代码来源:boss_keristrasza.cpp


示例20: JustDied

        void JustDied(Unit* /*pKiller*/)
        {
            DoScriptText(SAY_DEATH, me);
            DespawnGolem();

            if (m_pInstance)
                m_pInstance->SetData(TYPE_VOLKHAN, DONE);

            if (IsHeroic() && GolemsShattered < 5)
            {
                AchievementEntry const *AchievShatterResistant = GetAchievementStore()->LookupEntry(ACHIEVEMENT_SHATTER_RESISTANT);
                if (AchievShatterResistant)
                {
                    Map* pMap = me->GetMap();
                    if (pMap && pMap->IsDungeon())
                    {
                        Map::PlayerList const &players = pMap->GetPlayers();
                        for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
                            itr->getSource()->CompletedAchievement(AchievShatterResistant);
                    }
                }
            }
        }
开发者ID:wuhongyi1977,项目名称:StrawberryCore,代码行数:23,代码来源:boss_volkhan.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetAction函数代码示例发布时间:2022-05-30
下一篇:
C++ GetAccountId函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap