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


C++ CharSectionsMap类代码示例

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


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

示例1: GetCharSectionEntry

CharSectionsEntry const* GetCharSectionEntry(uint8 race, CharSectionType genType, uint8 gender, uint8 type, uint8 color)
{
    std::pair<CharSectionsMap::const_iterator, CharSectionsMap::const_iterator> eqr = sCharSectionMap.equal_range(uint32(genType) | uint32(gender << 8) | uint32(race << 16));
    for (CharSectionsMap::const_iterator itr = eqr.first; itr != eqr.second; ++itr)
    {
        if (itr->second->Type == type && itr->second->Color == color)
            return itr->second;
    }

    return NULL;
}
开发者ID:Aravu,项目名称:Talador-Project,代码行数:11,代码来源:DBCStores.cpp

示例2: LoadDBCStores

void LoadDBCStores(const std::string& dataPath)
{
    uint32 oldMSTime = getMSTime();

    std::string dbcPath = dataPath+"dbc/";

    StoreProblemList bad_dbc_files;
    uint32 availableDbcLocales = 0xFFFFFFFF;

    LoadDBC(availableDbcLocales, bad_dbc_files, sAreaStore,                   dbcPath, "AreaTable.dbc");

    // must be after sAreaStore loading
    for (uint32 i = 0; i < sAreaStore.GetNumRows(); ++i)           // areaflag numbered from 0
    {
        if (AreaTableEntry const* area = sAreaStore.LookupEntry(i))
        {
            // fill AreaId->DBC records
            sAreaFlagByAreaID.insert(AreaFlagByAreaID::value_type(uint16(area->ID), area->exploreFlag));

            // fill MapId->DBC records (skip sub zones and continents)
            if (area->zone == 0 && area->mapid != 0 && area->mapid != 1 && area->mapid != 530 && area->mapid != 571)
                sAreaFlagByMapID.insert(AreaFlagByMapID::value_type(area->mapid, area->exploreFlag));
        }
    }

    LoadDBC(availableDbcLocales, bad_dbc_files, sAchievementStore,            dbcPath, "Achievement.dbc", &CustomAchievementfmt, &CustomAchievementIndex);
    LoadDBC(availableDbcLocales, bad_dbc_files, sAchievementCriteriaStore,    dbcPath, "Achievement_Criteria.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sAreaTriggerStore,            dbcPath, "AreaTrigger.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sAreaGroupStore,              dbcPath, "AreaGroup.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sAreaPOIStore,                dbcPath, "AreaPOI.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sAuctionHouseStore,           dbcPath, "AuctionHouse.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sBankBagSlotPricesStore,      dbcPath, "BankBagSlotPrices.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sBannedAddOnsStore,           dbcPath, "BannedAddOns.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sBattlemasterListStore,       dbcPath, "BattlemasterList.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sBarberShopStyleStore,        dbcPath, "BarberShopStyle.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sCharStartOutfitStore,        dbcPath, "CharStartOutfit.dbc");
    for (uint32 i = 0; i < sCharStartOutfitStore.GetNumRows(); ++i)
        if (CharStartOutfitEntry const* outfit = sCharStartOutfitStore.LookupEntry(i))
            sCharStartOutfitMap[outfit->Race | (outfit->Class << 8) | (outfit->Gender << 16)] = outfit;

    LoadDBC(availableDbcLocales, bad_dbc_files, sCharSectionsStore,           dbcPath, "CharSections.dbc");
    for (uint32 i = 0; i < sCharSectionsStore.GetNumRows(); ++i)
        if (CharSectionsEntry const* entry = sCharSectionsStore.LookupEntry(i))
            if (entry->Race && ((1 << (entry->Race - 1)) & RACEMASK_ALL_PLAYABLE) != 0) //ignore Nonplayable races
                sCharSectionMap.insert({ entry->GenType | (entry->Gender << 8) | (entry->Race << 16), entry });

    LoadDBC(availableDbcLocales, bad_dbc_files, sCharTitlesStore,             dbcPath, "CharTitles.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sChatChannelsStore,           dbcPath, "ChatChannels.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sChrClassesStore,             dbcPath, "ChrClasses.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sChrRacesStore,               dbcPath, "ChrRaces.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sCinematicSequencesStore,     dbcPath, "CinematicSequences.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureDisplayInfoStore,    dbcPath, "CreatureDisplayInfo.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureDisplayInfoExtraStore, dbcPath, "CreatureDisplayInfoExtra.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureFamilyStore,         dbcPath, "CreatureFamily.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureModelDataStore,      dbcPath, "CreatureModelData.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureSpellDataStore,      dbcPath, "CreatureSpellData.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureTypeStore,           dbcPath, "CreatureType.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sCurrencyTypesStore,          dbcPath, "CurrencyTypes.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sDestructibleModelDataStore,  dbcPath, "DestructibleModelData.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sDungeonEncounterStore,       dbcPath, "DungeonEncounter.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sDurabilityCostsStore,        dbcPath, "DurabilityCosts.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sDurabilityQualityStore,      dbcPath, "DurabilityQuality.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesStore,                 dbcPath, "Emotes.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sEmotesTextStore,             dbcPath, "EmotesText.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sFactionStore,                dbcPath, "Faction.dbc");
    for (uint32 i=0; i<sFactionStore.GetNumRows(); ++i)
    {
        FactionEntry const* faction = sFactionStore.LookupEntry(i);
        if (faction && faction->team)
        {
            SimpleFactionsList &flist = sFactionTeamMap[faction->team];
            flist.push_back(i);
        }
    }

    LoadDBC(availableDbcLocales, bad_dbc_files, sFactionTemplateStore,        dbcPath, "FactionTemplate.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sGameObjectDisplayInfoStore,  dbcPath, "GameObjectDisplayInfo.dbc");
    for (uint32 i = 0; i < sGameObjectDisplayInfoStore.GetNumRows(); ++i)
    {
        if (GameObjectDisplayInfoEntry const* info = sGameObjectDisplayInfoStore.LookupEntry(i))
        {
            if (info->maxX < info->minX)
                std::swap(*(float*)(&info->maxX), *(float*)(&info->minX));
            if (info->maxY < info->minY)
                std::swap(*(float*)(&info->maxY), *(float*)(&info->minY));
            if (info->maxZ < info->minZ)
                std::swap(*(float*)(&info->maxZ), *(float*)(&info->minZ));
        }
    }

    LoadDBC(availableDbcLocales, bad_dbc_files, sGemPropertiesStore,          dbcPath, "GemProperties.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sGlyphPropertiesStore,        dbcPath, "GlyphProperties.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sGlyphSlotStore,              dbcPath, "GlyphSlot.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sGtBarberShopCostBaseStore,   dbcPath, "gtBarberShopCostBase.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sGtCombatRatingsStore,        dbcPath, "gtCombatRatings.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToMeleeCritBaseStore, dbcPath, "gtChanceToMeleeCritBase.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToMeleeCritStore,    dbcPath, "gtChanceToMeleeCrit.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToSpellCritBaseStore, dbcPath, "gtChanceToSpellCritBase.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sGtChanceToSpellCritStore,    dbcPath, "gtChanceToSpellCrit.dbc");
    LoadDBC(availableDbcLocales, bad_dbc_files, sGtNPCManaCostScalerStore,    dbcPath, "gtNPCManaCostScaler.dbc");
//.........这里部分代码省略.........
开发者ID:Aravu,项目名称:Talador-Project,代码行数:101,代码来源:DBCStores.cpp

示例3: LoadDBCStores

void LoadDBCStores(const std::string& dataPath)
{
    uint32 oldMSTime = getMSTime();

    std::string dbcPath = dataPath+"dbc/";

    StoreProblemList bad_dbc_files;
    uint32 availableDbcLocales = 0xFFFFFFFF;

#define LOAD_DBC(store, file) LoadDBC(availableDbcLocales, bad_dbc_files, store, dbcPath, file)

    LOAD_DBC(sAchievementStore, "Achievement.dbc"/*, &CustomAchievementfmt, &CustomAchievementIndex*/);//20201
    LOAD_DBC(sAnimKitStore, "AnimKit.dbc");//20201
    LOAD_DBC(sAreaStore, "AreaTable.dbc");//20201
    LOAD_DBC(sAreaTriggerStore, "AreaTrigger.dbc");//20201
    LOAD_DBC(sArmorLocationStore, "ArmorLocation.dbc");//20201
    LOAD_DBC(sBankBagSlotPricesStore, "BankBagSlotPrices.dbc");//20201
    LOAD_DBC(sBannedAddOnsStore, "BannedAddOns.dbc");//20201
    LOAD_DBC(sBattlemasterListStore, "BattlemasterList.dbc");//20201
    LOAD_DBC(sCharSectionsStore, "CharSections.dbc");//20201
    LOAD_DBC(sCharTitlesStore, "CharTitles.dbc");//20201
    LOAD_DBC(sChatChannelsStore, "ChatChannels.dbc");//20201
    LOAD_DBC(sChrClassesStore, "ChrClasses.dbc");//20201
    LOAD_DBC(sChrRacesStore, "ChrRaces.dbc");//20201
    LOAD_DBC(sChrSpecializationStore, "ChrSpecialization.dbc");//20201
    LOAD_DBC(sCreatureDisplayInfoExtraStore, "CreatureDisplayInfoExtra.dbc");//20201
    LOAD_DBC(sCreatureFamilyStore, "CreatureFamily.dbc");//20201
    LOAD_DBC(sCreatureModelDataStore, "CreatureModelData.dbc");//20201
    LOAD_DBC(sCriteriaStore, "Criteria.dbc");//20201
    LOAD_DBC(sCriteriaTreeStore, "CriteriaTree.dbc");//20201
    LOAD_DBC(sDifficultyStore, "Difficulty.dbc");//20201
    LOAD_DBC(sDungeonEncounterStore, "DungeonEncounter.dbc");//20201
    LOAD_DBC(sDurabilityCostsStore, "DurabilityCosts.dbc");//20201
    LOAD_DBC(sEmotesStore, "Emotes.dbc");//20201
    LOAD_DBC(sEmotesTextStore, "EmotesText.dbc");//20201
    LOAD_DBC(sFactionStore, "Faction.dbc");//20201
    LOAD_DBC(sFactionTemplateStore, "FactionTemplate.dbc");//20201
    LOAD_DBC(sGameObjectDisplayInfoStore, "GameObjectDisplayInfo.dbc");//20201
    LOAD_DBC(sGemPropertiesStore, "GemProperties.dbc");//20201
    LOAD_DBC(sGlyphPropertiesStore, "GlyphProperties.dbc");//20201
    LOAD_DBC(sGuildColorBackgroundStore, "GuildColorBackground.dbc");//20201
    LOAD_DBC(sGuildColorBorderStore, "GuildColorBorder.dbc"); //20201
    LOAD_DBC(sGuildColorEmblemStore, "GuildColorEmblem.dbc");//20201
    LOAD_DBC(sItemArmorQualityStore, "ItemArmorQuality.dbc");//20201
    LOAD_DBC(sItemArmorShieldStore, "ItemArmorShield.dbc");//20201
    LOAD_DBC(sItemArmorTotalStore, "ItemArmorTotal.dbc");//20201
    LOAD_DBC(sItemBagFamilyStore, "ItemBagFamily.dbc");//20201
    LOAD_DBC(sItemDamageAmmoStore, "ItemDamageAmmo.dbc");//20201
    LOAD_DBC(sItemDamageOneHandCasterStore, "ItemDamageOneHandCaster.dbc");//20201
    LOAD_DBC(sItemDamageOneHandStore, "ItemDamageOneHand.dbc");//20201
    LOAD_DBC(sItemDamageRangedStore, "ItemDamageRanged.dbc");//20201
    LOAD_DBC(sItemDamageThrownStore, "ItemDamageThrown.dbc");//20201
    LOAD_DBC(sItemDamageTwoHandCasterStore, "ItemDamageTwoHandCaster.dbc");//20201
    LOAD_DBC(sItemDamageTwoHandStore, "ItemDamageTwoHand.dbc");//20201
    LOAD_DBC(sItemDamageWandStore, "ItemDamageWand.dbc");//20201
    LOAD_DBC(sItemSetSpellStore, "ItemSetSpell.dbc");//20201
    LOAD_DBC(sItemSetStore, "ItemSet.dbc");//20201
    LOAD_DBC(sLFGDungeonStore, "LfgDungeons.dbc");//20201
    LOAD_DBC(sLightStore, "Light.dbc"); //20201
    LOAD_DBC(sLiquidTypeStore, "LiquidType.dbc");//20201
    LOAD_DBC(sLockStore, "Lock.dbc");//20201
    LOAD_DBC(sMapDifficultyStore, "MapDifficulty.dbc");//20201
    LOAD_DBC(sMapStore, "Map.dbc");//20201
    LOAD_DBC(sModifierTreeStore, "ModifierTree.dbc");//20201
    LOAD_DBC(sMovieStore, "Movie.dbc");//20201
    LOAD_DBC(sPhaseStore, "Phase.dbc"); // 20201
    LOAD_DBC(sPowerDisplayStore, "PowerDisplay.dbc");//20201
    LOAD_DBC(sPvPDifficultyStore, "PvpDifficulty.dbc");//20201
    LOAD_DBC(sQuestFactionRewardStore, "QuestFactionReward.dbc");//20201
    LOAD_DBC(sRandomPropertiesPointsStore, "RandPropPoints.dbc");//20201
    LOAD_DBC(sSkillLineAbilityStore, "SkillLineAbility.dbc");//20201
    LOAD_DBC(sSkillLineStore, "SkillLine.dbc");//20201
    LOAD_DBC(sSkillRaceClassInfoStore, "SkillRaceClassInfo.dbc");//20201
    LOAD_DBC(sSpellAuraOptionsStore, "SpellAuraOptions.dbc");//20201
    LOAD_DBC(sSpellCategoriesStore, "SpellCategories.dbc");//20201
    LOAD_DBC(sSpellCategoryStore, "SpellCategory.dbc");//20201
    LOAD_DBC(sSpellCooldownsStore, "SpellCooldowns.dbc");//20201
    LOAD_DBC(sSpellEffectScalingStore, "SpellEffectScaling.dbc");//20201
    LOAD_DBC(sSpellEffectStore, "SpellEffect.dbc"/*, &CustomSpellEffectEntryfmt, &CustomSpellEffectEntryIndex*/);//20201
    LOAD_DBC(sSpellEquippedItemsStore, "SpellEquippedItems.dbc");//20201
    LOAD_DBC(sSpellFocusObjectStore, "SpellFocusObject.dbc");//20201
    LOAD_DBC(sSpellInterruptsStore, "SpellInterrupts.dbc");//20201
    LOAD_DBC(sSpellItemEnchantmentStore, "SpellItemEnchantment.dbc");//20201
    LOAD_DBC(sSpellLevelsStore, "SpellLevels.dbc");//20201
    LOAD_DBC(sSpellScalingStore, "SpellScaling.dbc");//20201
    LOAD_DBC(sSpellShapeshiftFormStore, "SpellShapeshiftForm.dbc");//20201
    LOAD_DBC(sSpellShapeshiftStore, "SpellShapeshift.dbc");//20201
    LOAD_DBC(sSpellStore, "Spell.dbc"/*, &CustomSpellEntryfmt, &CustomSpellEntryIndex*/);//20201
    LOAD_DBC(sSpellTargetRestrictionsStore, "SpellTargetRestrictions.dbc");//20201
    LOAD_DBC(sSummonPropertiesStore, "SummonProperties.dbc");//20201
    LOAD_DBC(sTalentStore, "Talent.dbc");//20201
    LOAD_DBC(sVehicleSeatStore, "VehicleSeat.dbc");//20201
    LOAD_DBC(sVehicleStore, "Vehicle.dbc");//20201
    LOAD_DBC(sWMOAreaTableStore, "WMOAreaTable.dbc");//20201
    LOAD_DBC(sWorldMapAreaStore, "WorldMapArea.dbc");//20201
    LOAD_DBC(sWorldSafeLocsStore, "WorldSafeLocs.dbc"); // 20201

#undef LOAD_DBC

    // must be after sAreaStore loading
//.........这里部分代码省略.........
开发者ID:gearsofdeath,项目名称:DeathCore_6.x-1,代码行数:101,代码来源:DBCStores.cpp


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