diff --git a/ag/gm/gm_seite.php b/ag/gm/gm_seite.php index 05d4365..6aa740a 100644 --- a/ag/gm/gm_seite.php +++ b/ag/gm/gm_seite.php @@ -17,6 +17,7 @@ session_start(); * Zuletzt verändert: 03.10.2007 *******************************************************************************/ +include_once('../path.inc.php'); // get the path ;) include_once(ROOT_PATH.'/include/config/db.inc.php'); include_once(ROOT_PATH.'/include/designfunctions.inc.php'); include_once(ROOT_PATH.'/include/fehlerausgabe.inc.php'); diff --git a/ag/gm/include/npc.inc.php b/ag/gm/include/npc.inc.php index 004c148..ce6b618 100644 --- a/ag/gm/include/npc.inc.php +++ b/ag/gm/include/npc.inc.php @@ -9,7 +9,19 @@ ?> '."\n"; - echo "\t".''."\n"; +function displayNPCInfo($action, $task, $charid) { + //Form-Variablen + echo "\t".''."\n"; + echo "\t".''."\n"; + //initialisierung der Variablen für Inhalt $d_select_array = array(array('Dragonball', 'Onepiece'), array(300, 1200, 3600)); $d_array = array('charakter', 'name', 'type', 'hp', 'mp', 'starke', 'verteidigung', 'speed', 'ausdauer', 'glueck', 'zeit_rec', 'level', 'lvlmin', 'lvlmax', 'bild'); $desc_select_array = array(array('Dragonball', 'Onepiece'), array('5min', '20min', '60min')); $desc_array = array('ID', 'Name', 'Type', 'HP', 'MP', 'Stärke', 'Verteidigung', 'Geschwindigkeit', 'Ausdauer', 'Glück', 'Kampfdauer in Sekunden', 'Level', 'Min-Level', 'Max-Level', 'Bild'); - $attset = getCharAttackSet($charid, NORMALKAMPF); - $attset_names = getAttackNamesFromAttackSet($attset); - $attacks = getNPCAttacks(); + $attset = array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1); + $attset_names = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '); + //initialisieren falls editiert wird (dort existieren schon Inhalte) + if($task == TASK_EDIT) { + $attset = getCharAttackSet($charid, NORMALKAMPF); + $attset_names = getAttackNamesFromAttackSet($attset); + + //$sql = 'SELECT * 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; + $qry = mysql_query($sql); + $row = mysql_fetch_assoc($qry); + } - $sql = 'SELECT * 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; - $qry = mysql_query($sql); - $row = mysql_fetch_assoc($qry); + $attacks = getNPCAttacks(); $colspan = 2; - echo "\t".'