本文整理汇总了C++中CChar::IsSkillBase方法的典型用法代码示例。如果您正苦于以下问题:C++ CChar::IsSkillBase方法的具体用法?C++ CChar::IsSkillBase怎么用?C++ CChar::IsSkillBase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChar
的用法示例。
在下文中一共展示了CChar::IsSkillBase方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ImportWSC
//.........这里部分代码省略.........
pChar->SetHue( static_cast<HUE_TYPE>( ATOI(pArg) ));
continue;
}
else if ( s.IsKey("DIR" ))
{
pChar->m_dirFace = static_cast<DIR_TYPE>(ATOI(pArg));
if ( pChar->m_dirFace < 0 || pChar->m_dirFace >= DIR_QTY )
pChar->m_dirFace = DIR_SE;
continue;
}
else if ( s.IsKey("XBODY" ))
{
pChar->m_prev_id = static_cast<CREID_TYPE>(ATOI(pArg));
continue;
}
else if ( s.IsKey("XSKIN" ))
{
pChar->m_prev_Hue = static_cast<HUE_TYPE>( ATOI(pArg) );
continue;
}
else if ( s.IsKey("FONT" ))
{
pChar->m_fonttype = static_cast<FONT_TYPE>(ATOI(pArg));
continue;
}
else if ( s.IsKey("KARMA" ))
{
pChar->Stat_SetBase(STAT_KARMA, (short)(ATOI(pArg)));
continue;
}
else if ( s.IsKey("FAME" ))
{
pChar->Stat_SetBase(STAT_FAME, (short)(ATOI(pArg)));
continue;
}
else if ( s.IsKey("TITLE" ))
{
pChar->m_sTitle = pArg;
continue;
}
else if ( s.IsKey("STRENGTH" ))
{
pChar->Stat_SetBase(STAT_STR, (short)(ATOI(pArg)));
}
else if ( s.IsKey("DEXTERITY" ))
{
pChar->Stat_SetBase(STAT_DEX, (short)(ATOI(pArg)));
}
else if ( s.IsKey("INTELLIGENCE" ))
{
pChar->Stat_SetBase(STAT_INT, (short)(ATOI(pArg)));
}
else if ( s.IsKey("HITPOINTS" ))
{
pChar->Stat_SetVal(STAT_STR,(short)(ATOI(pArg)));
}
else if ( s.IsKey("STAMINA" ))
{
pChar->Stat_SetVal(STAT_DEX,(short)(ATOI(pArg)));
}
else if ( s.IsKey( "MANA" ))
{
pChar->Stat_SetVal(STAT_INT,(short)(ATOI(pArg)));
}
else if ( s.IsKeyHead( "SKILL", 5 ))
{
SKILL_TYPE skill = static_cast<SKILL_TYPE>(ATOI( &(s.GetKey()[5])));
if ( pChar->IsSkillBase(skill) && g_Cfg.m_SkillIndexDefs.IsValidIndex(skill) )
{
pChar->Skill_SetBase( skill, ATOI(pArg));
}
}
else if ( s.IsKey("ACCOUNT" ))
{
// What if the account does not exist ?
pChar->SetPlayerAccount( pArg );
}
else if ( s.IsKey("KILLS" ) && pChar->m_pPlayer )
{
pChar->m_pPlayer->m_wMurders = (word)(ATOI(pArg));
}
else if ( s.IsKey("NPCAITYPE" ))
{
// Convert to proper NPC type.
int i = ATOI( pArg );
switch ( i )
{
case 0x01: pChar->SetNPCBrain( NPCBRAIN_HEALER ); break;
case 0x02: pChar->SetNPCBrain( NPCBRAIN_MONSTER ); break;
case 0x04:
case 0x40: pChar->SetNPCBrain( NPCBRAIN_GUARD ); break;
case 0x08: pChar->SetNPCBrain( NPCBRAIN_BANKER ); break;
default: pChar->SetNPCBrain( pChar->GetNPCBrain( false )); break;
}
}
continue;
}
}
return true;
}