From 2df43e5d28e03099f093f0e788bf4e5f68e9c628 Mon Sep 17 00:00:00 2001 From: hecht Date: Wed, 13 Aug 2014 21:04:03 +0000 Subject: [PATCH] #142: Die Farben werden nun nicht mehr durch defines.inc.php, sondern aus den attackentypen tabellen gelesen. --- ag/include/designfunctions.inc.php | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/ag/include/designfunctions.inc.php b/ag/include/designfunctions.inc.php index 19da2f6..c43a16f 100644 --- a/ag/include/designfunctions.inc.php +++ b/ag/include/designfunctions.inc.php @@ -18,12 +18,6 @@ defineIfNotDefined('GROUP_COLOR_DEVELOPER', 'orange'); defineIfNotDefined('GROUP_COLOR_CREATIVE', 'red'); defineIfNotDefined('GROUP_COLOR_MODERATOR', 'green'); -defineIfNotDefined('ATTACK_COLOR_DMGATTACK', 'white'); -defineIfNotDefined('ATTACK_COLOR_BUFF', 'blue'); -defineIfNotDefined('ATTACK_COLOR_DEBUFF', 'orange'); -defineIfNotDefined('ATTACK_COLOR_HEAL', 'green'); -defineIfNotDefined('ATTACK_COLOR_SPECIAL', 'red'); - // Diese Funktion muss in ein Darstellungspackage hinein und muss noch verlegt werden, Gestaltung in css-Datei /** @@ -107,17 +101,11 @@ function generateAttackNameByID($attackid, $withColor = TRUE) { $qry = mysql_query($sql); $row = mysql_fetch_assoc($qry); - if($row['type'] == 'normal'){ - $color = 'style="color:'.ATTACK_COLOR_DMGATTACK.'"'; - } else if($row['type'] == 'kaioken' || $row['type'] == 'kaioken2' || $row['type'] == 'SSJ'){ - $color = 'style="color:'.ATTACK_COLOR_BUFF.'"'; - } else if($row['type'] == 'lose' || $row['type'] == 'lose2'){ - $color = 'style="color:'.ATTACK_COLOR_DEBUFF.'"'; - } else if($row['type'] == 'hp' || $row['type'] == 'hpmp'){ - $color = 'style="color:'.ATTACK_COLOR_HEAL.'"'; - } else { - $color = 'style="color:'.ATTACK_COLOR_SPECIAL.'"'; - } + + $qry = db_query('SELECT farbe FROM `attackentyp` where name = \'' . $row['type'].'\''); + $row_color = mysql_fetch_row($qry); + $color = 'style="color:'.$row_color[0].'"'; + if($withColor) { return ''.$row['name'].''; } else {