From f0ab6fb9aa82567aa090b5c66fe61a2433fc3214 Mon Sep 17 00:00:00 2001 From: hecht Date: Wed, 13 Aug 2014 19:57:30 +0000 Subject: [PATCH] Das char feld item hat das npc_item feld ueberschrieben. Dieser wert wird nun ignoriert und es funzt wieder. --- ag/gm/include/npc.inc.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ag/gm/include/npc.inc.php b/ag/gm/include/npc.inc.php index a9cbc2d..fc03076 100644 --- a/ag/gm/include/npc.inc.php +++ b/ag/gm/include/npc.inc.php @@ -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."
"; $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', '>')." \n"; } else { - echo $drop; + echo $drop."\n"; } } echo ''."\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."
"; $u = db_query($sql); $log = 0;