parameters: (actor, Level)
return_statement: return LevelDiff
docstring: Calculate the number of new levels based on current levels
docstring_summary: Calculate the number of new levels based on current levels
docstring_tokens: Calculate the number of new levels based on current levels
function: def GetLevelDiff (actor, Level):
  	"""Calculate the number of new levels based on current levels"""
  
  	LevelDiff = [0]*3
  	LevelStat = [IE_LEVEL, IE_LEVEL2, IE_LEVEL3]
  
  	# Dual Swap: since dual class characters are based on mc combinations
  	# the level stat used by the 'new' class must be the one that
  	# matches the multiclass combo. EG a Fighter that duals to a Mage
  	# will now advance the IE_LEVEL2 stat since he will be FIGHTER_MAGE
  
  	if (GUICommon.IsDualSwap(actor)):
  		LevelStat = [IE_LEVEL2, IE_LEVEL, IE_LEVEL3]
  
  	for i in range(len(Level)):
  		LevelDiff[i] = max(0, Level[i] - GemRB.GetPlayerStat (actor, LevelStat[i]))
  
  	return LevelDiff
function_tokens: def GetLevelDiff ( actor , Level ) : LevelDiff = [ 0 ] * 3 LevelStat = [ IE_LEVEL , IE_LEVEL2 , IE_LEVEL3 ] # Dual Swap: since dual class characters are based on mc combinations # the level stat used by the 'new' class must be the one that # matches the multiclass combo. EG a Fighter that duals to a Mage # will now advance the IE_LEVEL2 stat since he will be FIGHTER_MAGE if ( GUICommon . IsDualSwap ( actor ) ) : LevelStat = [ IE_LEVEL2 , IE_LEVEL , IE_LEVEL3 ] for i in range ( len ( Level ) ) : LevelDiff [ i ] = max ( 0 , Level [ i ] - GemRB . GetPlayerStat ( actor , LevelStat [ i ] ) ) return LevelDiff