#1470 working frontend + demo data; ingame rendering not included
--HG-- branch : gsoc2012-achievementshg/feature/gsoc2013-dfighter
After Width: | Height: | Size: 468 KiB |
@ -0,0 +1,159 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 3.3.3
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- Host: localhost
|
||||
-- Erstellungszeit: 27. Mai 2012 um 21:06
|
||||
-- Server Version: 5.1.46
|
||||
-- PHP-Version: 5.3.2
|
||||
|
||||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
|
||||
--
|
||||
-- Datenbank: `app_achievements`
|
||||
--
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_achievement`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_achievement` (`aa_id`, `aa_category`, `aa_parent`, `aa_tie_race`, `aa_tie_cult`, `aa_tie_civ`, `aa_image`) VALUES
|
||||
(1, 1, NULL, NULL, NULL, NULL, ''),
|
||||
(2, 1, NULL, NULL, NULL, NULL, ''),
|
||||
(3, 1, NULL, NULL, NULL, NULL, ''),
|
||||
(4, 1, NULL, NULL, NULL, NULL, '');
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_achievement_lang`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_achievement_lang` (`aal_achievement`, `aal_lang`, `aal_name`) VALUES
|
||||
(1, 'en', 'Kill the Bait'),
|
||||
(2, 'en', 'Grill the Bill'),
|
||||
(3, 'en', 'Killing Spree'),
|
||||
(4, 'en', 'The Burning Desert');
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_atom`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_atom` (`atom_id`, `atom_objective`, `atom_mandatory`, `atom_ruleset`, `atom_primary`) VALUES
|
||||
(1, 13, 0, '', 0);
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_category`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_category` (`ac_id`, `ac_parent`, `ac_order`, `ac_image`) VALUES
|
||||
(1, NULL, 0, ''),
|
||||
(2, NULL, 0, ''),
|
||||
(3, 1, 0, ''),
|
||||
(4, 1, 0, ''),
|
||||
(5, 1, 0, '');
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_category_lang`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_category_lang` (`acl_category`, `acl_lang`, `acl_name`) VALUES
|
||||
(1, 'en', 'Exploration'),
|
||||
(2, 'en', 'Occupations'),
|
||||
(3, 'en', 'Aeden Aqueous'),
|
||||
(4, 'en', 'Burning Desert'),
|
||||
(5, 'en', 'Witherings');
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_objective`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_objective` (`ao_id`, `ao_perk`, `ao_condition`, `ao_value`, `ao_display`) VALUES
|
||||
(1, 1, 'all', NULL, 'simple'),
|
||||
(2, 1, 'all', NULL, 'simple'),
|
||||
(3, 1, 'all', NULL, 'simple'),
|
||||
(4, 1, 'all', NULL, 'simple'),
|
||||
(5, 1, 'all', NULL, 'simple'),
|
||||
(6, 2, 'all', NULL, 'hidden'),
|
||||
(7, 3, 'all', 30, 'value'),
|
||||
(8, 4, 'all', NULL, 'meta'),
|
||||
(9, 4, 'all', NULL, 'meta'),
|
||||
(10, 4, 'all', NULL, 'meta'),
|
||||
(11, 4, 'all', NULL, 'meta'),
|
||||
(12, 4, 'all', NULL, 'meta'),
|
||||
(13, 3, 'all', 30, 'value');
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_objective_lang`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_objective_lang` (`aol_objective`, `aol_lang`, `aol_name`) VALUES
|
||||
(1, 'en', 'Kill A'),
|
||||
(2, 'en', 'Kill B'),
|
||||
(3, 'en', 'Kill C'),
|
||||
(4, 'en', 'Kill D'),
|
||||
(5, 'en', 'Kill E'),
|
||||
(7, 'en', 'Kill 30 random Yubos'),
|
||||
(8, 'en', 'Meta A'),
|
||||
(9, 'en', 'Meta B'),
|
||||
(10, 'en', 'Meta C'),
|
||||
(11, 'en', 'Meta D'),
|
||||
(12, 'en', 'Meta E'),
|
||||
(13, 'en', 'Kill 30 random Gingos');
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_perk`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_perk` (`ap_id`, `ap_achievement`, `ap_parent`, `ap_value`) VALUES
|
||||
(1, 1, NULL, 50),
|
||||
(2, 2, NULL, 10),
|
||||
(3, 3, NULL, 10),
|
||||
(4, 4, NULL, 20),
|
||||
(5, 2, NULL, 10),
|
||||
(6, 2, NULL, 10);
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_perk_lang`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_perk_lang` (`apl_perk`, `apl_lang`, `apl_name`) VALUES
|
||||
(1, 'en', 'Murder every boss listed below'),
|
||||
(2, 'en', 'Grill "Bill the Vile"'),
|
||||
(3, 'en', 'Kill 30 of each mob type listed below'),
|
||||
(4, 'en', 'Explore all regions of the Burning Desert'),
|
||||
(5, 'en', 'Grill "Peter the Pan"'),
|
||||
(6, 'en', 'Grill "Ivan the Slayer"');
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_player_atom`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_player_atom` (`apa_atom`, `apa_player`, `apa_date`, `apa_expire`) VALUES
|
||||
(1, 1, 0, '');
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_player_objective`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_player_objective` (`apo_objective`, `apo_player`, `apo_date`) VALUES
|
||||
(4, 1, 500),
|
||||
(7, 1, 500),
|
||||
(11, 1, 500);
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_player_perk`
|
||||
--
|
||||
|
||||
INSERT INTO `ach_player_perk` (`app_perk`, `app_player`, `app_date`) VALUES
|
||||
(2, 1, 600),
|
||||
(5, 1, 100);
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ach_player_valuecache`
|
||||
--
|
||||
|
@ -1,21 +1,285 @@
|
||||
<?php
|
||||
function ach_render_box_done($content) {
|
||||
return "<table bgcolor='#FFFFFF' cellspacing='1' cellpadding='0'>
|
||||
|
||||
function ach_render_tiebar($cult = "neutral", $civ = "neutral") {
|
||||
|
||||
}
|
||||
|
||||
function ach_render_menu(&$menu,$sub = 0) {
|
||||
$html = "<style>
|
||||
.ach_menu {
|
||||
display:block;
|
||||
padding:2px;
|
||||
border:1px solid #000000;
|
||||
margin-bottom:2px;
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.ach_menu:hover {
|
||||
color:orange;
|
||||
}
|
||||
|
||||
.ach_mspan a {
|
||||
text-decoration:none;
|
||||
}
|
||||
</style>";
|
||||
|
||||
$sz = $menu->getSize();
|
||||
for($i=0;$i<$sz;$i++) {
|
||||
$curr = $menu->getChild($i);
|
||||
$html .= "<span class='ach_mspan'><a href=''><table class='ach_menu'>
|
||||
<tr>
|
||||
<td><table cellspacing='2' cellpadding='0' bgcolor='#B4B4B4'>
|
||||
<td><img src='pic/menu/test.png' /></td>
|
||||
<td style='font-size:".(20-$sub)."px;font-weight:bold;";
|
||||
if($curr->isOpen()) {
|
||||
$html .= "color:orange;";
|
||||
}
|
||||
$html .= "'>".$curr->getName()."</td>
|
||||
</tr>
|
||||
</table></a></span>
|
||||
<div style='display:block;margin-left:25px;'>".ach_render_menu($curr,($sub+4))."</div>";
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function ach_render_category(&$cat) {
|
||||
$html = "";
|
||||
|
||||
$tmp = $cat->getDone();
|
||||
$sz = sizeof($tmp);
|
||||
for($i=0;$i<$sz;$i++) {
|
||||
#echo "A";
|
||||
$html .= ach_render_achievement_done($cat->getChild($tmp[$i]));
|
||||
}
|
||||
|
||||
$tmp = $cat->getOpen();
|
||||
$sz = sizeof($tmp);
|
||||
for($i=0;$i<$sz;$i++) {
|
||||
#echo "B";
|
||||
$html .= ach_render_achievement_open($cat->getChild($tmp[$i]));
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function ach_render_achievement_done(&$ach) {
|
||||
$html = "";
|
||||
|
||||
$html .= '<div style="display: block; margin-bottom: 5px;"><table cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="3px"><img src="pic/bar_done_ul.png"></td>
|
||||
<td style="background-image: url(pic/bar_done_u.png);"></td>
|
||||
<td width="3px"><img src="pic/bar_done_ur.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><table cellspacing='1' cellpadding='0' bgcolor='#FFFFFF'>
|
||||
<td style="background-image: url(pic/bar_done_l.png);"></td>
|
||||
<td style="background-image: url(pic/bar_done_bg.png);">
|
||||
<center><table width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody><tr>
|
||||
<td rowspan="2" valign="top"><img src="pic/icon/test.png"></td>
|
||||
<td width="100%"><center><span style="font-weight:bold;font-size:24px;color:#000000;">'.$ach->getName().'</span></center></td>
|
||||
<td rowspan="2" valign="top" style="font-weight: bold; text-align: center; font-size: 30px;color:#000000;padding-right:10px;">
|
||||
'.$ach->getValueDone().'<br><img src="pic/yubo_done.png">
|
||||
</td>
|
||||
</tr><tr><td align="center" valign="top">';
|
||||
$html .= ach_render_perk_done($ach);
|
||||
$html .= '</td></tr></tbody></table></center>
|
||||
</td>
|
||||
<td style="background-image: url(pic/bar_done_r.png);"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><table cellspacing='1' cellpadding='0' bgcolor='#B4B4B4'>
|
||||
<td><img src="pic/bar_done_bl.png"></td>
|
||||
<td style="background-image: url(pic/bar_done_b.png);"></td>
|
||||
<td><img src="pic/bar_done_br.png"></td>
|
||||
</tr>
|
||||
</tbody></table></div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function ach_render_achievement_open(&$ach) {
|
||||
$html = "";
|
||||
|
||||
$html .= '<div style="display: block; margin-bottom: 5px;"><table cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr>
|
||||
<td width="3px"><img src="pic/bar_pending_ul.png"></td>
|
||||
<td style="background-image: url(pic/bar_pending_u.png);"></td>
|
||||
<td width="3px"><img src="pic/bar_pending_ur.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width='450px' height='50px' align='center' valign='middle'>".$content."</td>
|
||||
<td style="background-image: url(pic/bar_pending_l.png);"></td>
|
||||
<td>
|
||||
<center><table width="100%" cellspacing="0" cellpadding="0">
|
||||
<tbody><tr>
|
||||
<td rowspan="2" valign="top"><img src="pic/icon/test.png"></td>
|
||||
<td width="100%"><center><span style="font-weight:bold;font-size:24px;color:#FFFFFF;">'.$ach->getName().'</span></center></td>
|
||||
<td rowspan="2" valign="top" style="font-weight: bold; text-align: center; font-size: 30px;color:#FFFFFF;padding-right:10px;">
|
||||
'.$ach->getValueOpen().'<br><img src="pic/yubo_pending.png">
|
||||
</td>
|
||||
</tr><tr><td align="center" valign="top">';
|
||||
$html .= ach_render_perk_open($ach);
|
||||
$html .= '</td></tr></tbody></table></center>
|
||||
</td>
|
||||
<td style="background-image: url(pic/bar_pending_r.png);"></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<tr>
|
||||
<td><img src="pic/bar_pending_bl.png"></td>
|
||||
<td style="background-image: url(pic/bar_pending_b.png);"></td>
|
||||
<td><img src="pic/bar_pending_br.png"></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tbody></table></div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function ach_render_perk_open(&$ach) {
|
||||
#echo var_export($perk_list,true);
|
||||
$html = "";
|
||||
|
||||
$perk_list = $ach->getOpen();
|
||||
|
||||
$perk = $ach->getChild($perk_list[0]);
|
||||
|
||||
$html .= "<span style='color:#999999;font-weight:bold;'>".$perk->getName()."</span>";
|
||||
if($perk->objDrawable()) {
|
||||
$html .= "<br>".ach_render_obj_list($perk->getChildren());
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function ach_render_perk_done(&$ach) {
|
||||
$html = "";
|
||||
|
||||
$perk_list = $ach->getDone();
|
||||
|
||||
foreach($perk_list as $elem) {
|
||||
$perk = $ach->getChild($elem);
|
||||
$html .= "<div style='display:block;'><span style='color:#66CC00;font-weight:bold;'>".$perk->getName()."</span> ( ".date('d.m.Y',$perk->getDone())." ) <img src='pic/yubo_done.png' width='15px' /> ".$perk->getValue()."</div>";
|
||||
}
|
||||
/*if($perk->objDrawable()) {
|
||||
$html .= "<br>".ach_render_obj_list($perk->getChildren());
|
||||
}*/
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function ach_render_obj_list(&$obj) {
|
||||
$html = "<center><table width='90%'>";
|
||||
|
||||
$i = 0;
|
||||
$skip = false;
|
||||
|
||||
foreach($obj as $elem) {
|
||||
if(($i%2) == 0) {
|
||||
$html .= "<tr>";
|
||||
}
|
||||
|
||||
switch($elem->getDisplay()) {
|
||||
case "meta":
|
||||
$html .= "<td width='50%'>".ach_render_obj_meta($elem)."</td>";
|
||||
break;
|
||||
case "value":
|
||||
if(($i%2) == 1) {
|
||||
$html .= "</tr><tr>";
|
||||
}
|
||||
$html .= "<td colspan='2' width='100%'><center>".ach_render_obj_value($elem)."</center></td>";
|
||||
$i++;
|
||||
break;
|
||||
case "simple":
|
||||
$html .= "<td width='50%'>".ach_render_obj_simple($elem)."</td>";
|
||||
break;
|
||||
case "hidden":
|
||||
default:
|
||||
//do nothing
|
||||
$skip = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if(($i%2) == 1) {
|
||||
$html .= "</tr>";
|
||||
}
|
||||
|
||||
|
||||
if(!$skip) {
|
||||
$i++;
|
||||
}
|
||||
$skip = false;
|
||||
}
|
||||
|
||||
if(($i%2) == 1) {
|
||||
$html .= "</tr>";
|
||||
}
|
||||
|
||||
$html .= "</table></center>";
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function ach_render_obj_simple(&$obj) {
|
||||
$html = "";
|
||||
if($obj->isdone()) {
|
||||
$html .= "<img src='pic/check.png' height='10px' /> <span style='color:#71BE02;'>";
|
||||
}
|
||||
else {
|
||||
$html .= "<img src='pic/pending.png' height='10px' /> <span style='color:#999999;'>";
|
||||
}
|
||||
|
||||
$html .= $obj->getName()."</span>";
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
function ach_render_obj_meta(&$obj) {
|
||||
$html = "";
|
||||
if($obj->isdone()) {
|
||||
$col = "#71BE02";
|
||||
$grey = "";
|
||||
}
|
||||
else {
|
||||
$col = "#999999";
|
||||
$grey = "grey/";
|
||||
}
|
||||
|
||||
return "<table cellspacing='0' cellpadding='0'>
|
||||
<tr>
|
||||
<td><img src='pic/icon/".$grey."test.png' width='20px' /></td>
|
||||
<td valign='middle'><span style='color:".$col.";'> ".$obj->getName()."</span></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</table>";
|
||||
}
|
||||
|
||||
function ach_render_obj_value(&$obj) {
|
||||
$html = "";
|
||||
if($obj->isdone()) {
|
||||
$col = "#71BE02";
|
||||
}
|
||||
else {
|
||||
$col = "#999999";
|
||||
}
|
||||
$html .= "<div style='color:".$col.";display:block;'>".$obj->getName()."</span><div />";
|
||||
|
||||
$val = $obj->getValue();
|
||||
$prog = $obj->getProgress();
|
||||
|
||||
$width = 350;
|
||||
$left = floor($width*(100*($prog/$val))/100);
|
||||
|
||||
$html .= "
|
||||
<table width='".$width."px' cellspacing='0' cellpadding='0' style='border:1px solid #FFFFFF;color:#000000;'>
|
||||
<tr>
|
||||
<td bgcolor='#66CC00' width='".$left."px' align='right'>";
|
||||
if(($prog/$val) > 0.85) {
|
||||
$html .= " ".$prog." / ".$val." ";
|
||||
}
|
||||
$html .= "</td>
|
||||
<td align='left' style='color:#FFFFFF;'>";
|
||||
if(($prog/$val) <= 0.85) {
|
||||
$html .= " ".$prog." / ".$val." ";
|
||||
}
|
||||
$html .= "</td>
|
||||
</tr>
|
||||
</table>";
|
||||
|
||||
return $html;
|
||||
}
|
||||
?>
|
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 44 KiB |