本文整理汇总了C++中Slayer::getHighestSkillDomain方法的典型用法代码示例。如果您正苦于以下问题:C++ Slayer::getHighestSkillDomain方法的具体用法?C++ Slayer::getHighestSkillDomain怎么用?C++ Slayer::getHighestSkillDomain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Slayer
的用法示例。
在下文中一共展示了Slayer::getHighestSkillDomain方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: giveMemberReward
void giveMemberReward(PlayerCreature* pPC, uint type )
{
Exp_t exp = ExpRewardTable[pPC->getRace()][pPC->getLevel()];
Gold_t gold = GoldRewardTable[pPC->getRace()][type];
pPC->increaseGoldEx(gold);
GCModifyInformation gcMI;
gcMI.addLongData(MODIFY_GOLD, pPC->getGold());
if (pPC->isSlayer() )
{
Slayer* pSlayer = dynamic_cast<Slayer*>(pPC);
increaseDomainExp(pSlayer, pSlayer->getHighestSkillDomain(), exp, gcMI);
pSlayer->getPlayer()->sendPacket(&gcMI);
}
else if (pPC->isVampire() )
{
Vampire* pVampire = dynamic_cast<Vampire*>(pPC);
increaseVampExp(pVampire, exp, gcMI);
pVampire->getPlayer()->sendPacket(&gcMI);
}
else if (pPC->isOusters() )
{
GCModifyInformation gcMI;
Ousters* pOusters = dynamic_cast<Ousters*>(pPC);
increaseOustersExp(pOusters, exp, gcMI);
}
}
示例2: checkCondition
GQuestElement::ResultType GQuestGiveDomainExpElement::checkCondition(PlayerCreature* pPC ) const
{
if (!pPC->isSlayer() ) return FAIL;
GCModifyInformation gcMI;
Slayer* pSlayer = dynamic_cast<Slayer*>(pPC);
increaseDomainExp(pSlayer, pSlayer->getHighestSkillDomain(), m_Amount, gcMI);
pSlayer->getPlayer()->sendPacket(&gcMI);
GCSystemMessage gcSM;
gcSM.setMessage("도메인 경험치를 획득했습니다.");
pSlayer->getPlayer()->sendPacket(&gcSM);
return OK;
}
示例3: checkCondition
GQuestElement::ResultType GQuestAdvanceClassElement::checkCondition(PlayerCreature* pPC ) const
{
if (pPC->getLevel() != 150 ) return FAIL;
Exp_t advExp = 0;
if (pPC->isSlayer() )
{
Slayer* pSlayer = dynamic_cast<Slayer*>(pPC);
SkillDomainType_t domain = pSlayer->getHighestSkillDomain();
DomainInfo* pDomainInfo = g_pSkillDomainInfoManager->getDomainInfo((SkillDomain)domain, pPC->getLevel());
if (pDomainInfo == NULL ) return FAIL;
Exp_t goalExp = pDomainInfo->getGoalExp();
Exp_t currentExp = goalExp - pSlayer->getGoalExp(domain);
advExp = (Exp_t)(currentExp * 0.0688933574);
}
else if (pPC->isVampire() )
{
Vampire* pVampire = dynamic_cast<Vampire*>(pPC);
VampEXPInfo* pExpInfo = g_pVampEXPInfoManager->getVampEXPInfo(pVampire->getLevel());
if (pExpInfo == NULL ) return FAIL;
Exp_t goalExp = pExpInfo->getGoalExp();
Exp_t currentExp = goalExp - pVampire->getGoalExp();
advExp = currentExp / 100;
}
else if (pPC->isOusters() )
{
Ousters* pOusters = dynamic_cast<Ousters*>(pPC);
OustersEXPInfo* pExpInfo = g_pOustersEXPInfoManager->getOustersEXPInfo(pOusters->getLevel());
if (pExpInfo == NULL ) return FAIL;
Exp_t goalExp = pExpInfo->getGoalExp();
Exp_t currentExp = goalExp - pOusters->getGoalExp();
advExp = currentExp / 100;
}
advExp = min((int)advExp, 18496191);
// ÇϵåÄÚµù -_-
pPC->increaseAdvancementClassExp(advExp, false);
return OK;
}