@ -283,4 +283,76 @@ function getFusionRaceId($charid){
}
/**
* This function returns an overview about the
*/
function getAttacksforChar($charid) {
$char = getChar($charid);
$char_race = getCharRaceId($charid);
echo '<br>';
// first read out basic information about our attacks
$sql = 'select a.name, a.id, a.level, substr(a.req_atk, 1, locate(\',0\', a.req_atk) - 1) as req_atk , geld, ifnull((select l.benutzt from lernen l where l.besitzer = '.$char['id'].' and at_id = a.id),0) as benutzt, a.id not in (select l.at_id from lernen l where l.besitzer = '.$char['id'].') as unknown from attacken a where find_in_set('.$char_race.', a.rassen) order by level';
$qry = mysql_query($sql);
echo '<br>'.$sql.'<br>';
// The first index is the id of the attack!
// then there is the basic information like
//
// entries {id, name, levelups, benutzt, unknown}
// ==> id, name, required level, times that it has been used , if its still unkown (bool)
// entry {req} -> array {id, name, reggs}
// ==> [0] => first requirenment -> id, name, amount level ups required, times to be used