0) { $ids[] = $id; } } } return $ids; } function stelledar($char_id,$user_ida,$name) { //Alle Chardaten laden //TODO: chardaten gefällt mir absolut nicht! Das muss man anders regeln =/ chardaten($char_id,$name,$char_1,$hp1,$mp1,$exp,$fehler); if ($fehler == NULL) { $buffedstats = getCharBuffs($char_1['kampf_item']); //Alle Attacken laden $learned_atts = getCharAttacks($char_id); //Attackensets laden $clanfight_attset = getAttackSet($char_id, CLANKAMPF); if(count($clanfight_attset) == 0) { createAttackSet($char_id, CLANKAMPF); for($i = 1; $i < KAMPF_RUNDEN+1;$i++) { $clanfight_attset[$i] = -1; } } $normfight_attset = getAttackSet($char_id, NORMALKAMPF); if(count($normfight_attset) == 0) { createAttackSet($char_id, NORMALKAMPF); for($i = 1; $i < KAMPF_RUNDEN+1;$i++) { $normfight_attset[$i] = -1; } } //TODO:prüfen ob man nicht auch den name aus $learned_atts holen kann $clanfight_attset_name = getAttackNames($clanfight_attset); $normfight_attset_name = getAttackNames($normfight_attset); //Rüstung laden $e_schuhe = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.rassen_type=".$char_1['rasse_a']['type']." OR i.rassen_type is NULL) AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Schuhe' AND i.level <='$char_1[level]' AND 0 = (SELECT count(c.id) from chars c WHERE c.besitzer = w.user AND c.id != '$char_1[id]' AND find_in_set(w.id, kampf_item)) group by i.name order by i.level desc"); $e_schwert = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.rassen_type=".$char_1['rasse_a']['type']." OR i.rassen_type is NULL) AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Schwert' AND i.level <='$char_1[level]' AND 0 = (SELECT count(c.id) from chars c WHERE c.besitzer = w.user AND c.id != '$char_1[id]' AND find_in_set(w.id, kampf_item)) group by i.name order by i.level desc"); $e_rustung = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.rassen_type=".$char_1['rasse_a']['type']." OR i.rassen_type is NULL) AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Ruestung' AND i.level <='$char_1[level]' AND 0 = (SELECT count(c.id) from chars c WHERE c.besitzer = w.user AND c.id != '$char_1[id]' AND find_in_set(w.id, kampf_item)) group by i.name order by i.level desc"); $e_schild = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.rassen_type=".$char_1['rasse_a']['type']." OR i.rassen_type is NULL) AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Schild' AND i.level <='$char_1[level]' AND 0 = (SELECT count(c.id) from chars c WHERE c.besitzer = w.user AND c.id != '$char_1[id]' AND find_in_set(w.id, kampf_item)) group by i.name order by i.level desc"); $e_helm = db_query("SELECT i.name, w.id, i.level FROM ware w LEFT JOIN item i ON(i.id=w.item_id) WHERE (i.rassen_type=".$char_1['rasse_a']['type']." OR i.rassen_type is NULL) AND w.user='$user_ida[id]' AND w.ru_mal='1' AND i.s_type='Helm' AND i.level <='$char_1[level]' AND 0 = (SELECT count(c.id) from chars c WHERE c.besitzer = w.user AND c.id != '$char_1[id]' AND find_in_set(w.id, kampf_item)) group by i.name order by i.level desc"); $checked = explode(',',$char_1['kampf_item']); $excludeIds = getExcludeIds($user_ida['id'], $char_id); ?>
'; echo '