Example #1
0
BOOL HumanSkillUpgrade::CheckCondition()
{
	__ENTER_FUNCTION

	HumanDB* pDB = m_pHuman->GetDB();
	_OWN_SKILL& oOwnSkill = pDB->GetSkillID( (BYTE)m_iSkillID );

	if( oOwnSkill.m_nLevel >= m_iLevel )
		return FALSE;

	if( CheckSkillStudyCondition() && 
		IsEnoughHumanLevel() &&				// 角色等级条件
		IsOccupationMatch() &&				// 职业条件
		IsSkillClassSpendEnoughPosints() && // 系别点数花费条件
		IsEnoughParentSkillLevel() &&		// 父技能条件
		IsEnoughSkillPoints() &&			// 技能点数条件
		IsEnoughMoney() &&					// 金钱条件
		IsEnoughExp() &&					// 经验条件
		IsHadEnoughItem1() &&				// 物品1条件
		IsHadEnoughItem2() &&				// 物品2条件
		IsHadEnoughItem3()					// 物品3条件
		)
	{
		return TRUE;
	}
	return FALSE;
	__LEAVE_FUNCTION

	return FALSE;
}
Example #2
0
bool8 ScrCmd_checkmoney(struct ScriptContext *ctx)
{
    u32 amount = ScriptReadWord(ctx);
    u8 ignore = ScriptReadByte(ctx);
    if (!ignore)
        gScriptResult = IsEnoughMoney(gSaveBlock1.money, amount);
    return FALSE;
}