Das char feld item hat das npc_item feld ueberschrieben. Dieser wert wird nun ignoriert und es funzt wieder.

main
hecht 11 years ago
parent 48937ff55d
commit f0ab6fb9aa

@ -164,12 +164,15 @@ function displayNPCInfo($action, $task, $charid) {
$sql = 'SELECT kl.*, ni.* FROM chars c inner join npc_item ni on ni.charakter = c.id inner join kampf_list kl on ni.charakter = kl.charakter WHERE c.id ='.$charid;
//$sql = 'SELECT * FROM chars c inner join kampf_list kl on c.id = kl.charakter WHERE c.id ='.$charid;
//echo $sql."<br>";
$qry = db_query($sql);
$row = mysql_fetch_assoc($qry);
// Fetch the char array by getChar method (for backwards compat) with no caching enabled!
$char_data = getChar($charid, false);
foreach( $char_data as $key => $value ) {
$row[$key] = $value;
if($key != 'item') {
$row[$key] = $value;
}
}
}
@ -213,9 +216,9 @@ function displayNPCInfo($action, $task, $charid) {
}
foreach($drop_items as $drop) {
if(strpos($drop, $selected) == true) {
echo istrinstr($drop, ' selected', '>');
echo istrinstr($drop, ' selected', '>')."&nbsp;\n";
} else {
echo $drop;
echo $drop."\n";
}
}
echo '</select></td></tr>'."\n";
@ -269,7 +272,7 @@ function editNPC($charid, $data, $att_ids) {
$sql .= ', n.preis = \''.encodeNoHTMLWithBB($data['preis']).'\'';
$sql .= ' WHERE c.id=\''.$charid.'\'';
//echo $sql;
//echo $sql."<br>";
$u = db_query($sql);
$log = 0;

Loading…
Cancel
Save