本文整理汇总了C++中GetTalentSpellPos函数的典型用法代码示例。如果您正苦于以下问题:C++ GetTalentSpellPos函数的具体用法?C++ GetTalentSpellPos怎么用?C++ GetTalentSpellPos使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetTalentSpellPos函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetTalentSpellCost
uint32 GetTalentSpellCost(uint32 spellId)
{
if(TalentSpellPos const* pos = GetTalentSpellPos(spellId))
return pos->rank+1;
return 0;
}
开发者ID:ZajicekDuracel,项目名称:mangos,代码行数:7,代码来源:DBCStores.cpp
示例2: GetTalentSpellPos
int AiFactory::GetPlayerSpecTab(Player* player)
{
int c0 = 0, c1 = 0, c2 = 0;
PlayerTalentMap& talentMap = player->GetTalentMap(0);
for (PlayerTalentMap::iterator i = talentMap.begin(); i != talentMap.end(); ++i)
{
uint32 spellId = i->first;
TalentSpellPos const* talentPos = GetTalentSpellPos(spellId);
if(!talentPos)
continue;
TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentPos->talent_id);
if (!talentInfo)
continue;
uint32 const* talentTabIds = GetTalentTabPages(player->getClass());
if (talentInfo->TalentTab == talentTabIds[0]) c0++;
if (talentInfo->TalentTab == talentTabIds[1]) c1++;
if (talentInfo->TalentTab == talentTabIds[2]) c2++;
}
if (c0 >= c1 && c0 >= c2)
return 0;
if (c1 >= c0 && c1 >= c2)
return 1;
return 2;
}
开发者ID:beyourself,项目名称:LordPsyanBots,代码行数:29,代码来源:AiFactory.cpp
示例3: SpellCheck
bool CharacterDatabaseCleaner::SpellCheck(uint32 spell_id) {
return sSpellStore.LookupEntry(spell_id) && !GetTalentSpellPos(spell_id);
}
开发者ID:Bootz,项目名称:DeepshjirRepack,代码行数:3,代码来源:CharacterDatabaseCleaner.cpp
示例4: GetTalentSpellCost
uint32 GetTalentSpellCost(uint32 spellId)
{
return GetTalentSpellCost(GetTalentSpellPos(spellId));
}
开发者ID:51kfa,项目名称:mangos-classic,代码行数:4,代码来源:DBCStores.cpp
示例5: SpellCheck
bool CharacterDatabaseCleaner::SpellCheck(uint32 spell_id)
{
return sSpellMgr->GetSpellInfo(spell_id) && !GetTalentSpellPos(spell_id);
}
开发者ID:Exodius,项目名称:Atlantiss,代码行数:4,代码来源:CharacterDatabaseCleaner.cpp
示例6: LearnSpellsForNewLevel
void LearnSpellsForNewLevel(Player* player, uint8 level)
{
if (level == player->getLevel() + 1)
return;
uint32 family;
switch(player->getClass())
{
case CLASS_ROGUE:
family = SPELLFAMILY_ROGUE;
break;
case CLASS_DEATH_KNIGHT:
family = SPELLFAMILY_DEATHKNIGHT;
break;
case CLASS_WARRIOR:
family = SPELLFAMILY_WARRIOR;
break;
case CLASS_PRIEST:
family = SPELLFAMILY_PRIEST;
break;
case CLASS_MAGE:
family = SPELLFAMILY_MAGE;
break;
case CLASS_PALADIN:
family = SPELLFAMILY_PALADIN;
break;
case CLASS_HUNTER:
family = SPELLFAMILY_HUNTER;
break;
case CLASS_DRUID:
family = SPELLFAMILY_DRUID;
break;
case CLASS_SHAMAN:
family = SPELLFAMILY_SHAMAN;
break;
case CLASS_WARLOCK:
family = SPELLFAMILY_WARLOCK;
break;
}
for (uint32 i = 0; i < sSpellMgr->GetSpellInfoStoreSize(); ++i)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(i);
if (!spellInfo)
continue;
if (spellInfo->SpellFamilyName != family)
continue;
if (IsIgnoredSpell(spellInfo->Id))
continue;
if (spellInfo->PowerType == POWER_FOCUS)
continue;
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, spellInfo->Id, player))
continue;
if ((spellInfo->AttributesEx7 & SPELL_ATTR7_ALLIANCE_ONLY && player->GetTeam() != ALLIANCE) || (spellInfo->AttributesEx7 & SPELL_ATTR7_HORDE_ONLY && player->GetTeam() != HORDE))
continue;
if (spellInfo->BaseLevel != level && sSpellMgr->IsSpellValid(spellInfo, player))
continue;
bool valid = false;
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellInfo->Id);
for (SkillLineAbilityMap::const_iterator itr = bounds.first; itr != bounds.second; ++itr)
{
if (itr->second->spellId == spellInfo->Id && itr->second->racemask == 0 && itr->second->learnOnGetSkill == 0)
{
valid = true;
SpellInfo const* prevSpell = spellInfo->GetPrevRankSpell();
if (prevSpell && !player->HasSpell(prevSpell->Id))
{
valid = false;
break;
}
if (GetTalentSpellPos(itr->second->spellId))
if (!prevSpell || !player->HasSpell(prevSpell->Id) || spellInfo->GetRank() == 1)
valid = false;
break;
}
}
if (valid)
player->learnSpell(spellInfo->Id, false);
}
LearnSpellsForNewLevel(player, ++level);
}
开发者ID:redlaine,项目名称:DG-Core,代码行数:82,代码来源:mod_LearnSpellsOnLevelUp.cpp
注:本文中的GetTalentSpellPos函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论