本文整理汇总了C++中CCard::GetdwCritRate方法的典型用法代码示例。如果您正苦于以下问题:C++ CCard::GetdwCritRate方法的具体用法?C++ CCard::GetdwCritRate怎么用?C++ CCard::GetdwCritRate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCard
的用法示例。
在下文中一共展示了CCard::GetdwCritRate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Init
int CFBoss::Init(uint32_t index, uint16_t level)
{
STC_CONF_FRIEND_BOSS *pConf = CConfFriendBoss::Find(index);
if (pConf == NULL)
{
IME_ERROR("can not find data in friend boss csv index [%u]", index);
return -1;
}
m_strUserName = pConf->strName;
m_vecline.resize(MAX_CARD_CAPACITY);
SBossCard temp;
uint32_t initid = 1;
m_masterid = 0;
if (pConf->dwMasterCardIndex != 0)
{
if (level == 0)
level = 1;
CCard Card;
if (Card.CreateCard(pConf->dwMasterCardIndex, level, initid++))
{
IME_ERROR("create card fail index %u", pConf->dwMasterCardIndex);
return -1;
}
temp.dwObjId = Card.GetdwObjId();
temp.dwIndex = Card.GetdwIndex();
temp.byAttribute = Card.GetbyAttribute();
temp.dwAttack = pConf->dwMasterAttackBase + (level - 1) * pConf->dwMasterAttackGrow;
temp.dwDefence = pConf->dwMasterDefenceBase + (level - 1) * pConf->dwMasterDefenceGrow;
temp.dwHealth = pConf->dwMasterHealthBase + (level - 1) * pConf->dwMasterHealthGrow;
temp.dwHealthMax = pConf->dwMasterHealthBase + (level - 1) * pConf->dwMasterHealthGrow;
temp.dwCritRate = Card.GetdwCritRate();
temp.dwBigSkill = pConf->dwMasterSkillIndex;
temp.dwBigSkillLv = pConf->wMasterSkillLevel;
temp.dwCardLv = level;
temp.byCardType = E_ITEM_MASTER_CARD;
if (pConf->byRare == E_CR_AWAKE || pConf->byRare == E_CR_NORMAL)
{
temp.byRare = pConf->byRare;
}
else
{
temp.byRare = E_CR_NORMAL;
}
temp.byBreakCount = pConf->byBreakCount;
//
IME_DEBUG("init fellower card objid %u index %u attribute %u attack %u defence %u health %u critrate %u BigSkill %u BigSkillLv %u cardlv %u cardtype %u", temp.dwObjId, temp.dwIndex, temp.byAttribute, temp.dwAttack, temp.dwDefence, temp.dwHealth, temp.dwCritRate, temp.dwBigSkill, temp.dwBigSkillLv, temp.dwCardLv, temp.byCardType);
m_vec.push_back(temp);
m_masterid = temp.dwObjId;
}
SBossCard tmp2;
m_vec.resize(MAX_CARD_CAPACITY + 1, tmp2);
if (m_vec.size() > MAX_CARD_CAPACITY + 1)
{
IME_ERROR("boss card number %u bigger than max card capacity", m_vec.size());
return -1;
}
return 0;
}