Merge branch 'master' of mojotrollz.eu:wow-server/mojo_zero_web

This commit is contained in:
Tobi 2014-11-22 14:21:27 +01:00
commit 0e0b61c117
45 changed files with 325 additions and 202 deletions

View File

@ -1,11 +1,14 @@
<?php
class charcreation {
const DEFAULT_CHAR_NAME = 'Charactername';
const DEFAULT_CHAR_NAME = 'ChooseName';
const DEFAULT_CHAR_GENDER = 'default';
const DEFAULT_CHAR_RACE = 0;
const DEFAULT_CHAR_CLASS = 0;
const MOJO_CC_SESSIONKEY = 'mojo_charcreation';
const DEFAULT_CHAR_APPEARANCE = 1;
const DEFAULT_CHAR_APPEARANCE = 0;
const DEFAULT_CHAR_SPAWN = 0;
const DEFAULT_CHAR_GUILD = 'no_guild';
const DEFAULT_CHAR_SKILL_TREE = 0;
public static function data($json = NULL, $returnasjson = true){
if(!\SYSTEM\SECURITY\Security::load(self::MOJO_CC_SESSIONKEY)){
\SYSTEM\SECURITY\Security::save(self::MOJO_CC_SESSIONKEY, self::session_default());}
@ -20,6 +23,29 @@ class charcreation {
return $returnasjson ? JsonResult::toString(\SYSTEM\SECURITY\Security::load(self::MOJO_CC_SESSIONKEY)) : \SYSTEM\SECURITY\Security::load(self::MOJO_CC_SESSIONKEY);
}
public static function check_all(){
$vars = charcreation::check();
foreach($vars as $value){
if(!$value){
return false;}
}
return true;
}
public static function check(){
if(!\SYSTEM\SECURITY\Security::load(self::MOJO_CC_SESSIONKEY)){
\SYSTEM\SECURITY\Security::save(self::MOJO_CC_SESSIONKEY, self::session_default());}
$result = array();
$data = \SYSTEM\SECURITY\Security::load(self::MOJO_CC_SESSIONKEY);
foreach($data as $key=>$value){
if(method_exists('charcreation_validator','is_'.$key)){
$result[$key.'_ok'] = call_user_func('charcreation_validator::is_'.$key,$value);}
}
return $result;
}
private static function session_default(){
return array( 'char_name' => self::DEFAULT_CHAR_NAME,
'char_gender' => self::DEFAULT_CHAR_GENDER,
@ -31,10 +57,10 @@ class charcreation {
'char_face' => self::DEFAULT_CHAR_APPEARANCE,
'char_facial_hair' => self::DEFAULT_CHAR_APPEARANCE,
'char_facial_hair_color' => self::DEFAULT_CHAR_APPEARANCE,
'char_skill_tree' => 0,
'char_skill_tree' => self::DEFAULT_CHAR_SKILL_TREE,
'char_equip' => 0,
'char_guild' => 0,
'char_spawn' => 0);}
'char_guild' => self::DEFAULT_CHAR_GUILD,
'char_spawn' => self::DEFAULT_CHAR_SPAWN);}
public static function checkClassRace($class,$race){
switch($race){

View File

@ -1,72 +1,125 @@
<?php
class charcreation_validator {
public static function is_char_name($value){
return (strlen($value) <= 12) && (strlen($value) > 2) && !preg_match('/[^A-Za-z]/',$value);}
public static function char_name($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
if( strlen($value) > 12 || //strlen($value) < 2 ||
preg_match('/[^A-Za-z]/',$value)){
$data['char_name'] = charcreation::DEFAULT_CHAR_NAME;
} else {
$data['char_name'] = $value;}
$data['char_name'] = self::is_char_name($value) ? $value : charcreation::DEFAULT_CHAR_NAME;
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function is_char_gender($value){
return ($value == 'female') || ($value == 'male');}
public static function char_gender($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
$data['char_gender'] = ($value == ('female' || 'male')) ? $value : charcreation::DEFAULT_CHAR_GENDER;
$data['char_gender'] = self::is_char_gender($value) ? $value : charcreation::DEFAULT_CHAR_GENDER;
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function is_char_race($value){
return player_races::is($value);}
public static function char_race($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
$data['char_race'] = $value;
if(!charcreation::checkClassRace($data['char_class'], $data['char_race'])){
if(!self::is_char_race($value) || !charcreation::checkClassRace($data['char_class'], $data['char_race'])){
$data['char_class'] = charcreation::DEFAULT_CHAR_CLASS;}
if((player_spawns::is_alliance($data['char_spawn']) && !player_races::is_alliance($value)) ||
(player_spawns::is_horde($data['char_spawn']) && !player_races::is_horde($value))){
$data['char_spawn'] = charcreation::DEFAULT_CHAR_SPAWN;}
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function is_char_class($value){
return player_classes::is($value);}
public static function char_class($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
if($data['char_class'] != $value){
$data['char_skill_tree'] = charcreation::DEFAULT_CHAR_SKILL_TREE;}
$data['char_class'] = $value;
if(!charcreation::checkClassRace($data['char_class'], $data['char_race'])){
if(!self::is_char_class($value) || !charcreation::checkClassRace($data['char_class'], $data['char_race'])){
$data['char_race'] = charcreation::DEFAULT_CHAR_RACE;}
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function is_char_skin_color($value){
return is_numeric($value) && $value >= 0;}
public static function char_skin_color($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
$data['char_skin_color'] = $value;
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function is_char_hair($value){
return is_numeric($value) && $value >= 0;}
public static function char_hair($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
$data['char_hair'] = $value;
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function is_char_hair_color($value){
return is_numeric($value) && $value >= 0;}
public static function char_hair_color($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
$data['char_hair_color'] = $value;
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function is_char_face($value){
return is_numeric($value) && $value >= 0;}
public static function char_face($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
$data['char_face'] = $value;
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function is_char_facial_hair($value){
return is_numeric($value) && $value >= 0;}
public static function char_facial_hair($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
$data['char_facial_hair'] = $value;
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function is_char_facial_hair_color($value){
return is_numeric($value) && $value >= 0;}
public static function char_facial_hair_color($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
$data['char_facial_hair_color'] = $value;
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function char_skill_tree($value){}
public static function is_char_skill_tree($value){
if(count($value) != 3){
return false;}
return true;}
public static function char_skill_tree($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
$data['char_skill_tree'] = self::is_char_skill_tree($value) ? $value : charcreation::DEFAULT_CHAR_SKILL_TREE;
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function is_char_equip($value){
return false;}
public static function char_equip($value){}
public static function char_guild($value){}
public static function is_char_guild($value){
return ($value == charcreation::DEFAULT_CHAR_GUILD) ? true : false;}
public static function char_guild($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
$data['char_guild'] = self::is_char_guild($value) ? $value : charcreation::DEFAULT_CHAR_GUILD;
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
public static function is_char_spawn($value){
return player_spawns::is($value);}
public static function char_spawn($value){
$data = \SYSTEM\SECURITY\Security::load(charcreation::MOJO_CC_SESSIONKEY);
$data['char_spawn'] = $value;
if((player_races::is_horde($data['char_race']) && player_spawns::is_horde($value)) ||
(player_races::is_alliance($data['char_race']) && player_spawns::is_alliance($value)) ){
$data['char_spawn'] = $value;
} else {
$data['char_spawn'] = charcreation::DEFAULT_CHAR_SPAWN;
}
\SYSTEM\SECURITY\Security::save(charcreation::MOJO_CC_SESSIONKEY,$data);
}
}

View File

@ -2,7 +2,6 @@ var points_max = 51;
var points_spent_t1 = 0;
var points_spent_t2 = 0;
var points_spent_t3 = 0;
function skilltree(){
console.log("-MojoWoW: load skilltree")
$('.icon').mousedown(function(event) {
@ -13,14 +12,14 @@ function skilltree(){
switch (event.which) {
case 1:
if(is_icon_skillable(id) && !is_point_max() && !is_icon_max(id_count)){
write_icon(id,id_count,id_img,1);}
write_icon(id,id_count,id_img,1,true);}
break;
case 2:
//alert('Middle Mouse button pressed.');
break;
case 3:
if(is_icon_deskillable(id) && !is_icon_min(id_count)){
write_icon(id,id_count,id_img,-1);}
write_icon(id,id_count,id_img,-1,true);}
break;
default:
//alert('You have a strange Mouse!');
@ -29,7 +28,29 @@ function skilltree(){
$('.reset').click(function(){
write_reset(parseInt($(this).attr('t')));
});
write_start_spec();
}
function write_start_spec(){
for(var t=1; t<=3; t++){
var treestr = $('#tree'+t).attr('skill');
var pos = 0;
$('#tree'+t+' .icon').each(function(){
var id = '#'+this.id;
var id_count = '#'+this.id +'c';
var id_img = '#'+this.id +'i';
if($('#'+this.id+'i').hasClass('talent_icon') &&
!$('#'+this.id+'i').hasClass('icon_empty') &&
pos < treestr.length){
for(var i=0; i<parseInt(treestr.charAt(pos)); i++){
if(is_icon_skillable(id) && !is_point_max() && !is_icon_max(id_count)){
write_icon(id,id_count,id_img,1,false);}
}
pos++;
}
});
}
}
function write_reset(tree){
switch(tree){
case 1:
@ -139,9 +160,55 @@ function write_icon_cur_null(id_count){
$(id_count).attr('cur',0);
$(id_count).html('');
}
function write_icon(id,id_count,id_img,amount){
function write_url(){
var result = '?t='+$('.skilltree').attr('skill_class')+'_';
$('#tree1'+' .icon').each(function(){
if($('#'+this.id+'i').hasClass('talent_icon') &&
!$('#'+this.id+'i').hasClass('icon_empty')){
result += parseInt($('#'+this.id+'c').attr('cur'));}});
result += '_';
$('#tree2'+' .icon').each(function(){
if($('#'+this.id+'i').hasClass('talent_icon') &&
!$('#'+this.id+'i').hasClass('icon_empty')){
result += parseInt($('#'+this.id+'c').attr('cur'));}});
result += '_';
$('#tree3'+' .icon').each(function(){
if($('#'+this.id+'i').hasClass('talent_icon') &&
!$('#'+this.id+'i').hasClass('icon_empty')){
result += parseInt($('#'+this.id+'c').attr('cur'));}});
history.pushState(null, null, document.location.origin + document.location.pathname + result + window.location.hash);
}
function insertParam(key, value)
{
key = encodeURI(key); value = encodeURI(value);
var kvp = document.location.search.substr(1).split('&');
var i=kvp.length; var x; while(i--)
{
x = kvp[i].split('=');
if (x[0]==key)
{
x[1] = value;
kvp[i] = x.join('=');
break;
}
}
if(i<0) {kvp[kvp.length] = [key,value].join('=');}
//this will reload the page, it's likely better to store this until finished
document.location.search = kvp.join('&');
}
function write_icon(id,id_count,id_img,amount,pushstate){
write_icon_cur(id_count,amount);
write_points_spent(tree,amount);
if(pushstate){
write_url();
if(is_point_max()){
window.location.reload();}
}
if(is_icon_max(id_count)){
write_icon_yellow(id,id_count,id_img);
} else {
@ -150,7 +217,7 @@ function write_icon(id,id_count,id_img,amount){
tree = parseInt($(id).attr('t'));
row = parseInt($(id).attr('r'));
count = 0;
var count = 0;
$('#tree'+tree+' .icon').each(function(){
count += parseInt($('#'+this.id+'c').attr('cur'));
if((parseInt($('#'+this.id).attr('r'))-1)*5 <= count){

View File

@ -1,11 +1,14 @@
<?php
class skilltree{
public static function generate($class){
public static function generate($class,$t1,$t2,$t3){
if(!player_classes::is($class)){
return 'Choose a Class first!';}
$vars = \DBD\TALENT_TREE::Q1(array($class));
$res = \DBD\TALENT_TREE_ICON::QA(array($class));
$vars['tree1'] = $vars['tree2'] = $vars['tree3'] = '';
$vars['t1'] = $t1;
$vars['t2'] = $t2;
$vars['t3'] = $t3;
$count = 0;
for($t=1;$t<=3;$t++){
for($r=1;$r<=7; $r++){

View File

@ -1,4 +1,4 @@
<table oncontextmenu="return false;" class="skilltree" width="900" border="0" cellspacing="0" cellpadding="0" align="left" style="margin-left: 10px;">
<table oncontextmenu="return false;" class="skilltree" skill_class="${class}" width="900" border="0" cellspacing="0" cellpadding="0" align="left" style="margin-left: 10px;">
<tr>
<td class="talentheader">
<div id="treeheader1">
@ -29,8 +29,8 @@
</td>
</tr>
<tr>
<td class="outerbg" id="tree1" width="300" height="480" valign="top" style="background-image: url(./api.php?call=files&cat=skilltree_tree&id=${tree1_img}); background-color: rgb(0, 0, 0); background-repeat: no-repeat;">${tree1}</td>
<td class="outerbg" id="tree2" width="300" height="480" valign="top" style="background-image: url(./api.php?call=files&cat=skilltree_tree&id=${tree2_img}); background-color: rgb(0, 0, 0); background-repeat: no-repeat;">${tree2}</td>
<td class="outerbg" id="tree3" width="300" height="480" valign="top" style="background-image: url(./api.php?call=files&cat=skilltree_tree&id=${tree3_img}); background-color: rgb(0, 0, 0); background-repeat: no-repeat;">${tree3}</td>
<td class="outerbg" skill="${t1}" id="tree1" width="300" height="480" valign="top" style="background-image: url(./api.php?call=files&cat=skilltree_tree&id=${tree1_img}); background-color: rgb(0, 0, 0); background-repeat: no-repeat;">${tree1}</td>
<td class="outerbg" skill="${t2}" id="tree2" width="300" height="480" valign="top" style="background-image: url(./api.php?call=files&cat=skilltree_tree&id=${tree2_img}); background-color: rgb(0, 0, 0); background-repeat: no-repeat;">${tree2}</td>
<td class="outerbg" skill="${t3}" id="tree3" width="300" height="480" valign="top" style="background-image: url(./api.php?call=files&cat=skilltree_tree&id=${tree3_img}); background-color: rgb(0, 0, 0); background-repeat: no-repeat;">${tree3}</td>
</tr>
</table>

View File

@ -47,8 +47,8 @@ class player_races {
}
}
public static function is($class){
switch($class){
public static function is($race){
switch($race){
case self::HUMAN:
case self::ORC:
case self::DWARF:
@ -62,4 +62,28 @@ class player_races {
return false;
}
}
public static function is_horde($race){
switch($race){
case self::ORC:
case self::SCOURGE:
case self::TAUREN:
case self::TROLL:
return true;
default:
return false;
}
}
public static function is_alliance($race){
switch($race){
case self::HUMAN:
case self::DWARF:
case self::NIGHTELF:
case self::GNOME:
return true;
default:
return false;
}
}
}

View File

@ -41,10 +41,32 @@ class player_spawns {
switch($city){
case self::UNDERCITY:
case self::IRONFORGE:
case self::STROMWIND:
case self::STORMWIND:
case self::DARNASSUS:
case self::ORGRIMMAR:
case self::THUNDERBLUF:
case self::THUNDERBLUFF:
return true;
default:
return false;
}
}
public static function is_horde($city){
switch($city){
case self::UNDERCITY:
case self::ORGRIMMAR:
case self::THUNDERBLUFF:
return true;
default:
return false;
}
}
public static function is_alliance($city){
switch($city){
case self::IRONFORGE:
case self::STORMWIND:
case self::DARNASSUS:
return true;
default:
return false;

View File

@ -2,6 +2,7 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (10, 1, 2, 1, 'default_info', 'id', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (110, 1, 2, 1, 'wizard_toolbar', 'last', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (111, 1, 2, 1, 'wizard_toolbar', 'next', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (120, 1, 3, 1, 'wizard_skills', 't', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (131, 1, 2, 1, 'user_achievements_content', 'menu', 'INT');

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -14,6 +14,8 @@
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/city/','city','*.png');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/guild/','guild','*.png');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/equipment/','equipment','*.*');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/inventory/','inventory','*.*');

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -6,7 +6,6 @@
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/wizard_details','');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/wizard_visuals','');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/wizard_friend','');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/wizard_skills','');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/wizard_guild','');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/wizard_spawn','');

View File

@ -92,7 +92,7 @@ body {
}
#frame_content_wrapper{
height: 550px;
//height: 550px;
}
#frame_content_right {
@ -109,7 +109,7 @@ body {
}
.table_summ{
color: black; padding: 10px; margin-left: 20px; margin-top: 20px; width: 100%;
color: black; padding: 10px; margin-left: auto; margin-right: auto; margin-top: 20px; width: 90%;
}
.table_summ tr{

View File

@ -7,3 +7,8 @@ function sendInfo(json,toolbar){
system.call('call=charcreation&json='+json,
function(){system.load(toolbar)},
{},'json',false);}
function remove_search(){
if(document.location.search){
history.pushState(null, null, document.location.origin + document.location.pathname + window.location.hash);}
}

View File

@ -39,7 +39,7 @@ function load_visualisation(id){
});
$.each(json, function(key, value){first = true; data.addRow($.map(value, function(v) { if(first){first=false;return [new Date(v)];}else{return [(v == null || parseFloat(v) <= 0) ? 0 : parseFloat(v)];}}));});
var options = {title: id, backgroundColor: 'darkslategrey', aggregationTarget: 'category', selectionMode: 'multiple', curveType: 'function', /*focusTarget: 'category',*/ chartArea:{left:20,top:40}, interpolateNulls: false, height: "200"};
var options = {title: id, backgroundColor: { fill:'transparent' }, aggregationTarget: 'category', selectionMode: 'multiple', curveType: 'function', /*focusTarget: 'category',*/ chartArea:{left:20,top:40}, interpolateNulls: false, height: "200"};
new google.visualization.LineChart(document.getElementById(id)).draw(data, options);
},
{},'json',true);

View File

@ -1,6 +1,6 @@
<div id="frame_content_left">${default_page_welcome}</div>
<div id="frame_content_center">
<div class="threecol_parent" style="width: 30%; height: 462px;">
<div class="threecol_parent" style="width: 30%;">
<div class="threecol_row" style="height: 12px;">
<div class="threecol_col" style="background: url(${PICPATH_DEFAULT}border_tops_l.png) no-repeat;"></div>
<div class="threecol_col" style="background: url(${PICPATH_DEFAULT}border_tops_m.png) repeat-x;"></div>
@ -19,7 +19,7 @@
</div>
</div>
<div id="frame_content_right">
<div class="threecol_parent" style="width: 30%; height: 462px;">
<div class="threecol_parent" style="width: 30%;">
<div class="threecol_row" style="height: 12px;">
<div class="threecol_col" style="background: url(${PICPATH_DEFAULT}border_tops_l.png) no-repeat;"></div>
<div class="threecol_col" style="background: url(${PICPATH_DEFAULT}border_tops_m.png) repeat-x;"></div>
@ -38,4 +38,4 @@
</div>
</div>
<div class="clear"></div>
<div id="frame_content_toolbar"></div>
<div id="frame_content_toolbar" style="height: 35px;"></div>

View File

@ -21,8 +21,8 @@ class page_mojotrollz extends \SYSTEM\API\api_default {
public static function page_wizard_friend(){
return new wizard_friend();}
public static function page_wizard_skills(){
return new wizard_skills();}
public static function page_wizard_skills($t = null){
return new wizard_skills($t);}
public static function page_wizard_guild(){
return new wizard_guild();}

View File

@ -1,8 +1,6 @@
function init_wizard_details (){
/*$('#charname').keyup(function(event){
if(event.keyCode == 13){
sendInfo('{"char_name" : "'+$(this).val()+'"}','wizard_details');}
});*/
remove_search();
$('#btn_check_name').click(function(){
sendInfo('{"char_name" : "'+$('#charname').val()+'"}','wizard_details');})
$('.info').mouseover(function(){

View File

@ -1 +0,0 @@
test abc

View File

@ -1,25 +0,0 @@
<div id="friendlist" style="float: left; width: 30%; min-height: 320px; background: url(${BG}help_paper.png) no-repeat; background-size: 280px 300px;">
<img src="${BUTTONS}friendlist.png"/>
<div style="margin-left: 15px;">
<input type="text" class="form-control input-lg" id="friend_name" placeholder="${friend_name}">
<div class="" id="added_friend_list">
<div class="" style="outline: 2px white; height: 200px;">
<div style="float: left;">
<img src="${WOWICONS}warrior.png" width="30px;"/>
<img src="${WOWICONS}ork_male.png" width="30px;"/>
Molanor</div>
<img src="${PICPATH}x.png" style="float: right; margin-right: 15px;"/>
</div>
</div>
</div>
</div>
<div id="guildlist" style="float: left; margin-top:5px; margin-left: 10px; min-height: 300px; background: url(${BG}help_paper.png) no-repeat; background-size: 280px 300px;">
<div style="margin-top: -5px;">
<img width="280" src="${BUTTONS}wanted.png"/>
</div>
</div>
<div id="friend_help" style="float: right; margin-top: 5px; min-height: 250px; background: url(${BG}help_paper.png) no-repeat; width: 20%;">
<h3>${help_title}</h3>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 742 B

View File

@ -1,5 +0,0 @@
$(document).ready(function() {
$('.btnadd_friend').click(function () {
add_friend($(this).attr('friend_name'),1);
});
});

View File

@ -1,44 +0,0 @@
<?php
class wizard_friend extends SYSTEM\PAGE\Page {
private function js(){
return '';
}
public static function getfriend($friend_name){
$con = new \SYSTEM\DB\Connection(new \DBD\mangos_chars());
$res = $con->prepare( 'selCharByName',
'SELECT * FROM `mangos_chars_characters` WHERE `name` = ?;',
array($friend_name));
$result = array();
return $result;
}
public function friend_tolist(){
$result = "";
$friend = votes::getfriend(1);
foreach($friend_name as $friend){
$vars = array('name' => $friend['name'], 'race' => $friend['race'], 'gender' => $friend['gender'], 'class' => $friend['class']);
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/added_friend.tpl'), $vars);
}
return $result;
}
private function css (){
return '';
}
public function html(){
$vars = array();
$vars['js'] = $this->js();
$vars['css'] = $this->css();
$vars['PICPATH'] = \SYSTEM\WEBPATH(new PPAGE(),'wizard_friend/img/');
$vars['WOWICONS'] = \SYSTEM\IMG\img::getURL('wowicons');
$vars['BUTTONS'] = \SYSTEM\IMG\img::getURL('buttons');
$vars['BG'] = \SYSTEM\IMG\img::getURL('backgrounds');
$vars = array_merge($vars, \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_MAINPAGE));
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'wizard_friend/friend.tpl'), $vars);
}
}

View File

@ -1,40 +0,0 @@
<?php
class wizard_friend extends SYSTEM\PAGE\Page {
private function js(){
return '';
}
public static function getfriend($friend_name){
$con = new \SYSTEM\DB\Connection(new \DBD\mangos_chars());
$res = $con->prepare( 'selCharByName',
'SELECT * FROM `mangos_chars_characters` WHERE `name` = ?;',
array($friend_name));
$result = array();
return $result;
}
public function friend_tolist(){
$result = "";
$friend = votes::getfriend(1);
foreach($friend_name as $friend){
$vars = array('name' => $friend['name'], 'race' => $friend['race'], 'gender' => $friend['gender'], 'class' => $friend['class']);
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/added_friend.tpl'), $vars);
}
return $result;
}
private function css (){
return '';
}
public function html(){
$vars = array();
$vars['js'] = $this->js();
$vars['css'] = $this->css();
$vars['PICPATH'] = \SYSTEM\WEBPATH(new PPAGE(),'wizard_friendlist/img/');
$vars = array_merge($vars, \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_MAINPAGE));
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'wizard_friendlist/friendlist.tpl'), $vars);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,2 +1,6 @@
function init_wizard_guild(){
remove_search();
$('#btn_no_guild').click(function(){
sendInfo('{"char_guild" : "no_guild"}','wizard_guild');
});
}

View File

@ -1,2 +1,2 @@
guild
<li class="btn_menu_off" id="btn_no_guild">No Guild</li>
<div id="frame_content_toolbar" style="padding-top: 15px; height: 75px;"></div>

View File

@ -1,3 +1,4 @@
function init_wizard_register(){
remove_search();
$('#back_link').click(function(){system.load($(this).attr('sysload'));});
}

View File

@ -1,6 +1,8 @@
<?php
class wizard_skills extends SYSTEM\PAGE\Page {
var $t = null;
public function __construct($t) {
$this->t = $t;}
public static function js(){
return array( \SYSTEM\WEBPATH(new PAPI(),'char/js/skilltree.js'),
\SYSTEM\WEBPATH(new PPAGE(),'wizard_skills/js/wizard_skills.js'));}
@ -9,8 +11,14 @@ class wizard_skills extends SYSTEM\PAGE\Page {
return array( \SYSTEM\WEBPATH(new PAPI(),'char/css/skilltree.css'));}
public function html(){
$tree = explode('_', $this->t);
if(count($tree) == 4){
charcreation::data(json_encode(array('char_class' => $tree[0])),false);
charcreation::data(json_encode(array('char_skill_tree' => array($tree[1],$tree[2],$tree[3]))),false);
}
//t=11_014_55525_05
$vars = charcreation::data(NULL,false);
$vars['skilltree'] = skilltree::generate($vars['char_class']);
$vars['skilltree'] = skilltree::generate($vars['char_class'],$vars['char_skill_tree'][0],$vars['char_skill_tree'][1],$vars['char_skill_tree'][2]);
return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'wizard_skills/tpl/wizard_skills.tpl'), $vars);
}
}

View File

@ -1,5 +1,6 @@
var map_kalim=false;
function init_wizard_spawn(){
function init_wizard_spawn(){
remove_search();
$('#mapchange').click(function(){
if (map_kalim){
$('#city_kalim').hide();

View File

@ -0,0 +1,7 @@
function init_wizard_summary(){
remove_search();
$('.table_summ tr').click(function(){
system.load($(this).attr('sysload'));});
}

View File

@ -1,77 +1,77 @@
<div style="text-align: center; color: black;">
<H4>Summary</H4>
<H3>Summary</H3>
</div>
<table class="table_summ">
<!--<tr>
<th>Option</th>
<th>Wert</th>
<th>Check</th>
</tr>-->
<tr>
<tr sysload="wizard_details" href="#wizard_details">
<td><b>Name</b></td>
<td>${char_name}</td>
<td>${char_name_ok}</td>
<td><img src="${WOWICONS}${char_name_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_details" href="#wizard_details">
<td><b>Gender</b></td>
<td><img src="${WOW_GENDER}${char_gender}.png"/></td>
<td>${char_gender_ok}</td>
<td><img src="${WOWICONS}${char_gender_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_details" href="#wizard_details">
<td><b>Race</b></td>
<td><img src="${WOW_RACE}${char_race}_${char_gender}.png"/></td>
<td>${char_race_ok}</td>
<td><img src="${WOWICONS}${char_race_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_details" href="#wizard_details">
<td><b>Class</b></td>
<td><img src="${WOW_CLASS}${char_class}.png"/></td>
<td>${char_class_ok}</td>
<td><img src="${WOWICONS}${char_class_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_visuals" href="#wizard_visuals">
<td>Skin Color</td>
<td>${char_skin_color}</td>
<td>${char_skin_color_ok}</td>
<td><img src="${WOWICONS}${char_skin_color_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_visuals" href="#wizard_visuals">
<td>Hair</td>
<td>${char_hair}</td>
<td>${char_hair_ok}</td>
<td><img src="${WOWICONS}${char_hair_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_visuals" href="#wizard_visuals">
<td>Hair Color</td>
<td>${char_hair_color}</td>
<td>${char_hair_color_ok}</td>
<td><img src="${WOWICONS}${char_hair_color_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_visuals" href="#wizard_visuals">
<td>Face</td>
<td>${char_face}</td>
<td>${char_face_ok}</td>
<td><img src="${WOWICONS}${char_face_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_visuals" href="#wizard_visuals">
<td>Facial Hair</td>
<td>${char_facial_hair}</td>
<td>${char_facial_hair_ok}</td>
<td><img src="${WOWICONS}${char_facial_hair_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_visuals" href="#wizard_visuals">
<td>Facial Hair Color</td>
<td>${char_facial_hair_color}</td>
<td>${char_facial_hair_color_ok}</td>
<td><img src="${WOWICONS}${char_facial_hair_color_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_visuals" href="#wizard_visuals">
<td>Equip</td>
<td>${char_equip}</td>
<td><img src="${WOWICONS}${char_equip_ok}.png"/></td>
</tr>
<tr sysload="wizard_skills" href="#wizard_skills">
<td>Skill Tree</td>
<td>${char_skill_tree}</td>
<td>${char_skill_tree_ok}</td>
<td><img src="${WOWICONS}${char_skill_tree}.png"/></td>
<td><img src="${WOWICONS}${char_skill_tree_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_guild" href="#wizard_guild">
<td><b>Guild</b></td>
<td>${char_guild}</td>
<td>${char_guild_ok}</td>
<td><img src="${WOW_GUILD}${char_guild}.png"/></td>
<td><img src="${WOWICONS}${char_guild_ok}.png"/></td>
</tr>
<tr>
<tr sysload="wizard_spawn" href="#wizard_spawn">
<td><b>Spawn</b></td>
<td><img src="${WOW_CITY}${char_spawn}.png"/></td>
<td>${char_spawn_ok}</td>
<td><img src="${WOWICONS}${char_spawn_ok}.png"/></td>
</tr>
</table>
<div id="frame_content_toolbar" style="padding-top: 15px; height: 75px;"></div>

View File

@ -1,8 +1,17 @@
<?php
class wizard_summary extends SYSTEM\PAGE\Page {
public static function js(){
return array( \SYSTEM\WEBPATH(new PPAGE(),'wizard_summary/js/wizard_summary.js'));}
public function html(){
$vars = charcreation::data(NULL,false);
$vars = charcreation::check();
foreach($vars as $key=>$value){
if($value){
$vars[$key] = 'ok';
} else {
$vars[$key] = 'fail';}
}
$vars = array_merge($vars,charcreation::data(NULL,false));
$vars['char_skin_color'] = \DBD\RACE_VISUALS_BY_ID::Q1(array($vars['char_race'],race_visuals::VISUAL_SKIN,$vars['char_skin_color']))['name'];
$vars['char_hair'] = \DBD\RACE_VISUALS_BY_ID::Q1(array($vars['char_race'],race_visuals::VISUAL_HAIR,$vars['char_hair']))['name'];
@ -11,10 +20,14 @@ class wizard_summary extends SYSTEM\PAGE\Page {
$vars['char_facial_hair'] = \DBD\RACE_VISUALS_BY_ID::Q1(array($vars['char_race'],race_visuals::VISUAL_FACIAL_HAIR,$vars['char_facial_hair']))['name'];
$vars['char_facial_hair_color'] = \DBD\RACE_VISUALS_BY_ID::Q1(array($vars['char_race'],race_visuals::VISUAL_FACIAL_HAIR_COLOR,$vars['char_facial_hair_color']))['name'];
$vars['char_skill_tree'] = charcreation::check()['char_skill_tree_ok'] ? 'skilltree' : 'default';
$vars['char_race'] = player_races::name($vars['char_race']);
$vars['char_class'] = player_classes::name($vars['char_class']);
$vars['char_spawn'] = player_spawns::name($vars['char_spawn']);
$vars['WOWICONS'] = \SYSTEM\FILES\files::getURL('wowicons');
$vars['WOW_GUILD'] = \SYSTEM\FILES\files::getURL('guild');
$vars['WOW_GENDER'] = \SYSTEM\FILES\files::getURL('gender');
$vars['WOW_RACE'] = \SYSTEM\FILES\files::getURL('race');
$vars['WOW_CLASS'] = \SYSTEM\FILES\files::getURL('class');

View File

@ -3,8 +3,8 @@
<a class="tb_link" id="tb_gender race" sysload="wizard_details" href="#wizard_details" style="padding-left: 10px;"><img src="${WOW_RACE}${char_race}_${char_gender}.png" /></a>
<a class="tb_link" id="tb_class" sysload="wizard_details" href="#wizard_details" style="padding-left: 10px;"><img src="${WOW_CLASS}${char_class}.png" /></a>
<a class="tb_link" id="tb_visuals" sysload="wizard_visuals" href="#wizard_visuals" style="padding-left: 30px;"><img src="${WOWICONS}default.png" /></a>
<a class="tb_link" id="tb_skills" sysload="wizard_skills" href="#wizard_skills" style="padding-left: 30px;"><img src="${WOWICONS}default.png" /></a>
<a class="tb_link" id="tb_guild" sysload="wizard_guild" href="#wizard_guild" style="padding-left: 30px;"><img src="${WOWICONS}default.png" /></a>
<a class="tb_link" id="tb_skills" sysload="wizard_skills" href="#wizard_skills" style="padding-left: 30px;"><img src="${WOWICONS}${is_skilltree}.png" /></a>
<a class="tb_link" id="tb_guild" sysload="wizard_guild" href="#wizard_guild" style="padding-left: 30px;"><img src="${WOW_GUILD}${char_guild}.png" /></a>
<a class="tb_link" id="tb_spawn" sysload="wizard_spawn" href="#wizard_spawn" style="padding-left: 30px;"><img src="${WOW_CITY}${char_spawn}.png" /></a>
<a class="tb_link" id="tb_summary" sysload="wizard_summary" href="#wizard_summary" style="padding-left: 30px;"><img src="${WOWICONS}default.png" /></a>
<a class="tb_link" id="tb_summary" sysload="wizard_summary" href="#wizard_summary" style="padding-left: 30px;"><img src="${WOWICONS}${char_summary}.png" /></a>
<a class="tb_link" id="tb_next" sysload="${next}" href="#${next}" style="padding-left: 15px;"><img src="${WOWICONS}arrow_right.png" /></a>

View File

@ -18,9 +18,12 @@ class wizard_toolbar extends SYSTEM\PAGE\Page {
$vars['char_class'] = player_classes::name($vars['char_class']);
$vars['char_race'] = player_races::name($vars['char_race']);
$vars['char_spawn'] = player_spawns::name($vars['char_spawn']);
$vars['char_summary'] = charcreation::check_all() ? 'ok_summary' : 'default';
$vars['is_skilltree'] = charcreation::check()['char_skill_tree_ok'] ? 'skilltree' : 'default';
$vars['last'] = $this->last;
$vars['next'] = $this->next;
$vars['WOWICONS'] = \SYSTEM\FILES\files::getURL('wowicons');
$vars['WOW_GUILD'] = \SYSTEM\FILES\files::getURL('guild');
$vars['WOW_RACE'] = \SYSTEM\FILES\files::getURL('race');
$vars['WOW_CLASS'] = \SYSTEM\FILES\files::getURL('class');
$vars['WOW_CITY'] = \SYSTEM\FILES\files::getURL('city');

View File

@ -1,4 +1,5 @@
function init_wizard_visuals (){
remove_search();
$('#sel_0').change(function(){
sendInfo('{"char_skin_color" : "'+$(this).val()+'"}','wizard_visuals');});
$('#sel_1').change(function(){

2
system

@ -1 +1 @@
Subproject commit b3bf40d17d3c707d7af17943b1f6ff147c0e71a6
Subproject commit 69390d4c59bf3a2a3cd2add9f5b3bc3f571f1287