From: Luca P. <lpa...@us...> - 2005-03-28 13:57:48
|
Update of /cvsroot/planeshift/planeshift/www/serverconsole/npcs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8167/npcs Modified Files: listnpcs.php npc_actions.php Log Message: fixed npclist display when behaviour not present Index: listnpcs.php =================================================================== RCS file: /cvsroot/planeshift/planeshift/www/serverconsole/npcs/listnpcs.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** listnpcs.php 28 Mar 2005 13:23:05 -0000 1.10 --- listnpcs.php 28 Mar 2005 13:57:33 -0000 1.11 *************** *** 21,26 **** echo "<b>List of Vulnerable NPCs</b>"; ! $query = "select c.id, c.name, sec.name, c.loc_x, c.loc_y, c.loc_z, c.npc_spawn_rule, b.npctype from characters as c, sectors as sec, sc_npc_definitions as b"; ! $query = $query . " where npc_master_id !=0 and c.loc_sector_id=sec.id and b.char_id=c.id"; if ($invulnerable==true) --- 21,26 ---- echo "<b>List of Vulnerable NPCs</b>"; ! $query = "select c.id, c.name, sec.name, c.loc_x, c.loc_y, c.loc_z, c.npc_spawn_rule, b.npctype from characters as c LEFT JOIN sc_npc_definitions as b ON b.char_id=c.id, sectors as sec "; ! $query = $query . " where npc_master_id !=0 and c.loc_sector_id=sec.id"; if ($invulnerable==true) Index: npc_actions.php =================================================================== RCS file: /cvsroot/planeshift/planeshift/www/serverconsole/npcs/npc_actions.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** npc_actions.php 28 Mar 2005 13:23:05 -0000 1.29 --- npc_actions.php 28 Mar 2005 13:57:33 -0000 1.30 *************** *** 173,181 **** // create new beahviour ! $query = "insert into sc_npc_definitions values ($id,'$name','$behaviour','$behaviour_region',0,0,0,'N')"; ! echo "$query"; ! $result = mysql_query2($query); ! $line = mysql_fetch_array($result, MYSQL_NUM); ! // redirect --- 173,182 ---- // create new beahviour ! if ($behaviour!='') { ! $query = "insert into sc_npc_definitions values ($id,'$name','$behaviour','$behaviour_region',0,0,0,'N')"; ! echo "$query"; ! $result = mysql_query2($query); ! $line = mysql_fetch_array($result, MYSQL_NUM); ! } // redirect |