diff --git a/ag/include/designfunctions.inc.php b/ag/include/designfunctions.inc.php
index 8da4985..9ddf5d3 100644
--- a/ag/include/designfunctions.inc.php
+++ b/ag/include/designfunctions.inc.php
@@ -18,6 +18,12 @@ 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
/**
@@ -88,21 +94,40 @@ function generateUserLinkByID($userid, $showClanTags = TRUE){
}
-function generateAttackLinkByID($attackid) {
+function generateAttackLinkByID($attackid, $withColor = TRUE) {
+ return ''.generateAttackNameByID($attackid, $withColor).'';
+}
+
+function generateAttackNameByID($attackid, $withColor = TRUE) {
$sql = 'SELECT * from attacken WHERE id = ' .$attackid;
$qry = mysql_query($sql);
$row = mysql_fetch_assoc($qry);
- return ''.$row['name'].'';
-}
+ 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.'"';
+ }
+ if($withColor) {
+ return ''.$row['name'].'';
+ } else {
+ return $row['name'];
+ }
+}
function displayClanLink($clanid, $clanname = NULL){
- if($clanname === NULL) {
- $qry = mysql_query('SELECT clanname FROM clan WHERE id = ' . $clanid);
- $row = mysql_fetch_assoc($qry);
- $clanname = $row['clanname'];
- }
- return ''.$clanname.'';
+ if($clanname === NULL) {
+ $qry = mysql_query('SELECT clanname FROM clan WHERE id = ' . $clanid);
+ $row = mysql_fetch_assoc($qry);
+ $clanname = $row['clanname'];
+ }
+ return ''.$clanname.'';
}
function displayHistoryBackLink(){
@@ -203,13 +228,11 @@ function displayCount($value){
function generateTimerHtml($timerId, $timeInSeconds, $htmlOnExpire) {
?>
-
-
-
-
-
-
+