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


C++ GetAchievementStore函数代码示例

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


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


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