|
|
@ -394,7 +394,7 @@ void CEntityBase::setTarget( const NLMISC::CEntityId& targetId, bool sendMessage
|
|
|
|
// lookupStat :
|
|
|
|
// lookupStat :
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------
|
|
|
|
//---------------------------------------------------
|
|
|
|
sint32& CEntityBase::lookupStat( const string& var ) throw (CEntityBase::EInvalidStat)
|
|
|
|
sint32& CEntityBase::lookupStat( const string& var)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// TODO Alain: optimize this...
|
|
|
|
// TODO Alain: optimize this...
|
|
|
|
uint i;
|
|
|
|
uint i;
|
|
|
@ -562,7 +562,7 @@ sint32& CEntityBase::lookupStat( const string& var ) throw (CEntityBase::EInvali
|
|
|
|
// lookupStat for Characteristics:
|
|
|
|
// lookupStat for Characteristics:
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------
|
|
|
|
//---------------------------------------------------
|
|
|
|
sint32& CEntityBase::lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st ) throw (CEntityBase::EInvalidStat)
|
|
|
|
sint32& CEntityBase::lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if( c < CHARACTERISTICS::NUM_CHARACTERISTICS )
|
|
|
|
if( c < CHARACTERISTICS::NUM_CHARACTERISTICS )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -601,7 +601,7 @@ sint32& CEntityBase::lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacter
|
|
|
|
// lookupStat for Scores:
|
|
|
|
// lookupStat for Scores:
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------
|
|
|
|
//---------------------------------------------------
|
|
|
|
sint32& CEntityBase::lookupStat( SCORES::TScores score, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st ) throw (CEntityBase::EInvalidStat)
|
|
|
|
sint32& CEntityBase::lookupStat( SCORES::TScores score, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if( score < SCORES::NUM_SCORES )
|
|
|
|
if( score < SCORES::NUM_SCORES )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -640,7 +640,7 @@ sint32& CEntityBase::lookupStat( SCORES::TScores score, SCharacteristicsAndScore
|
|
|
|
// lookupStat for Skills:
|
|
|
|
// lookupStat for Skills:
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------
|
|
|
|
//---------------------------------------------------
|
|
|
|
sint32& CEntityBase::lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st ) throw (CEntityBase::EInvalidStat)
|
|
|
|
sint32& CEntityBase::lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* enum ESkillSubType
|
|
|
|
/* enum ESkillSubType
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -675,7 +675,7 @@ sint32& CEntityBase::lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st
|
|
|
|
// lookupStat for SpecialModifiers:
|
|
|
|
// lookupStat for SpecialModifiers:
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------
|
|
|
|
//---------------------------------------------------
|
|
|
|
sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm ) throw (CEntityBase::EInvalidStat)
|
|
|
|
sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
switch( sm )
|
|
|
|
switch( sm )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -738,7 +738,7 @@ sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm ) throw
|
|
|
|
throw CEntityBase::EInvalidStat() ;
|
|
|
|
throw CEntityBase::EInvalidStat() ;
|
|
|
|
} // lookupStat //
|
|
|
|
} // lookupStat //
|
|
|
|
|
|
|
|
|
|
|
|
const sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm ) const throw (CEntityBase::EInvalidStat)
|
|
|
|
const sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm) const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return const_cast<CEntityBase*>(this)->lookupStat(sm);
|
|
|
|
return const_cast<CEntityBase*>(this)->lookupStat(sm);
|
|
|
|
}
|
|
|
|
}
|
|
|
|