diff --git a/mojotrollz/api/char/charcreation.php b/mojotrollz/api/char/charcreation.php index c5ed73a..f744a53 100644 --- a/mojotrollz/api/char/charcreation.php +++ b/mojotrollz/api/char/charcreation.php @@ -1,11 +1,14 @@ $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){ diff --git a/mojotrollz/api/char/charcreation_validator.php b/mojotrollz/api/char/charcreation_validator.php index 08c5ebe..e2fb778 100644 --- a/mojotrollz/api/char/charcreation_validator.php +++ b/mojotrollz/api/char/charcreation_validator.php @@ -1,72 +1,125 @@ 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); } } \ No newline at end of file diff --git a/mojotrollz/api/char/js/skilltree.js b/mojotrollz/api/char/js/skilltree.js index c6e651f..2479ea8 100644 --- a/mojotrollz/api/char/js/skilltree.js +++ b/mojotrollz/api/char/js/skilltree.js @@ -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 + - - - + + +
@@ -29,8 +29,8 @@
${tree1}${tree2}${tree3}${tree1}${tree2}${tree3}
\ No newline at end of file diff --git a/mojotrollz/api/database/player_races.php b/mojotrollz/api/database/player_races.php index bbce732..cf715e7 100644 --- a/mojotrollz/api/database/player_races.php +++ b/mojotrollz/api/database/player_races.php @@ -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; + } + } } \ No newline at end of file diff --git a/mojotrollz/api/database/player_spawns.php b/mojotrollz/api/database/player_spawns.php index 97ede34..dcf5956 100644 --- a/mojotrollz/api/database/player_spawns.php +++ b/mojotrollz/api/database/player_spawns.php @@ -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; diff --git a/mojotrollz/dbd/sql/page.sql b/mojotrollz/dbd/sql/page.sql index 804dd5d..9baec5b 100644 --- a/mojotrollz/dbd/sql/page.sql +++ b/mojotrollz/dbd/sql/page.sql @@ -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'); diff --git a/mojotrollz/files/guild/a_guild.png b/mojotrollz/files/guild/a_guild.png new file mode 100644 index 0000000..649bf8a Binary files /dev/null and b/mojotrollz/files/guild/a_guild.png differ diff --git a/mojotrollz/files/guild/no_guild.png b/mojotrollz/files/guild/no_guild.png new file mode 100644 index 0000000..393bfbf Binary files /dev/null and b/mojotrollz/files/guild/no_guild.png differ diff --git a/mojotrollz/files/register_files.php b/mojotrollz/files/register_files.php index 5ec7564..2eb683a 100644 --- a/mojotrollz/files/register_files.php +++ b/mojotrollz/files/register_files.php @@ -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','*.*'); diff --git a/mojotrollz/files/wowicons/fail.png b/mojotrollz/files/wowicons/fail.png new file mode 100644 index 0000000..307090a Binary files /dev/null and b/mojotrollz/files/wowicons/fail.png differ diff --git a/mojotrollz/files/wowicons/ok.png b/mojotrollz/files/wowicons/ok.png new file mode 100644 index 0000000..e5c63fa Binary files /dev/null and b/mojotrollz/files/wowicons/ok.png differ diff --git a/mojotrollz/files/wowicons/ok_summary.png b/mojotrollz/files/wowicons/ok_summary.png new file mode 100644 index 0000000..8cf9a5e Binary files /dev/null and b/mojotrollz/files/wowicons/ok_summary.png differ diff --git a/mojotrollz/files/wowicons/skilltree.png b/mojotrollz/files/wowicons/skilltree.png new file mode 100644 index 0000000..85abd89 Binary files /dev/null and b/mojotrollz/files/wowicons/skilltree.png differ diff --git a/mojotrollz/page/autoload.inc b/mojotrollz/page/autoload.inc index 65b88fa..e0d06f5 100644 --- a/mojotrollz/page/autoload.inc +++ b/mojotrollz/page/autoload.inc @@ -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',''); diff --git a/mojotrollz/page/default_page/css/default_page.css b/mojotrollz/page/default_page/css/default_page.css index 5031af8..f2cfa49 100644 --- a/mojotrollz/page/default_page/css/default_page.css +++ b/mojotrollz/page/default_page/css/default_page.css @@ -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{ diff --git a/mojotrollz/page/default_page/js/wizard.js b/mojotrollz/page/default_page/js/wizard.js index d22284d..7db4d69 100644 --- a/mojotrollz/page/default_page/js/wizard.js +++ b/mojotrollz/page/default_page/js/wizard.js @@ -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);} +} \ No newline at end of file diff --git a/mojotrollz/page/default_start/js/default_start.js b/mojotrollz/page/default_start/js/default_start.js index 4b87c7f..1faf3e7 100644 --- a/mojotrollz/page/default_start/js/default_start.js +++ b/mojotrollz/page/default_start/js/default_start.js @@ -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); diff --git a/mojotrollz/page/default_start/tpl/default_start.tpl b/mojotrollz/page/default_start/tpl/default_start.tpl index 9b890be..8667aed 100644 --- a/mojotrollz/page/default_start/tpl/default_start.tpl +++ b/mojotrollz/page/default_start/tpl/default_start.tpl @@ -1,6 +1,6 @@
${default_page_welcome}
-
+
@@ -19,7 +19,7 @@
-
+
@@ -38,4 +38,4 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/mojotrollz/page/page_mojotrollz.php b/mojotrollz/page/page_mojotrollz.php index e8fae0c..1d126cf 100644 --- a/mojotrollz/page/page_mojotrollz.php +++ b/mojotrollz/page/page_mojotrollz.php @@ -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();} diff --git a/mojotrollz/page/wizard_details/js/wizard_details.js b/mojotrollz/page/wizard_details/js/wizard_details.js index 39021e8..7266eab 100644 --- a/mojotrollz/page/wizard_details/js/wizard_details.js +++ b/mojotrollz/page/wizard_details/js/wizard_details.js @@ -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(){ diff --git a/mojotrollz/page/wizard_friend/added_friend.tpl b/mojotrollz/page/wizard_friend/added_friend.tpl deleted file mode 100644 index 458aab0..0000000 --- a/mojotrollz/page/wizard_friend/added_friend.tpl +++ /dev/null @@ -1 +0,0 @@ -test abc \ No newline at end of file diff --git a/mojotrollz/page/wizard_friend/friend.tpl b/mojotrollz/page/wizard_friend/friend.tpl deleted file mode 100644 index 66ec25a..0000000 --- a/mojotrollz/page/wizard_friend/friend.tpl +++ /dev/null @@ -1,25 +0,0 @@ -
- - -
- -
-
-
- - - Molanor
- -
-
-
-
-
-
- -
-
-
-

${help_title}

- -
\ No newline at end of file diff --git a/mojotrollz/page/wizard_friend/img/background2.png b/mojotrollz/page/wizard_friend/img/background2.png deleted file mode 100644 index 2a3903b..0000000 Binary files a/mojotrollz/page/wizard_friend/img/background2.png and /dev/null differ diff --git a/mojotrollz/page/wizard_friend/img/friendlist_title_background.png b/mojotrollz/page/wizard_friend/img/friendlist_title_background.png deleted file mode 100644 index 3c9247c..0000000 Binary files a/mojotrollz/page/wizard_friend/img/friendlist_title_background.png and /dev/null differ diff --git a/mojotrollz/page/wizard_friend/img/wall.png b/mojotrollz/page/wizard_friend/img/wall.png deleted file mode 100644 index 28a6c7c..0000000 Binary files a/mojotrollz/page/wizard_friend/img/wall.png and /dev/null differ diff --git a/mojotrollz/page/wizard_friend/img/x.png b/mojotrollz/page/wizard_friend/img/x.png deleted file mode 100644 index afd68ca..0000000 Binary files a/mojotrollz/page/wizard_friend/img/x.png and /dev/null differ diff --git a/mojotrollz/page/wizard_friend/js/add_friend.js b/mojotrollz/page/wizard_friend/js/add_friend.js deleted file mode 100644 index 8be77c3..0000000 --- a/mojotrollz/page/wizard_friend/js/add_friend.js +++ /dev/null @@ -1,5 +0,0 @@ -$(document).ready(function() { - $('.btnadd_friend').click(function () { - add_friend($(this).attr('friend_name'),1); - }); -}); diff --git a/mojotrollz/page/wizard_friend/wizard_friend.php b/mojotrollz/page/wizard_friend/wizard_friend.php deleted file mode 100644 index b98892e..0000000 --- a/mojotrollz/page/wizard_friend/wizard_friend.php +++ /dev/null @@ -1,44 +0,0 @@ -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); - - } -} \ No newline at end of file diff --git a/mojotrollz/page/wizard_friendlist/friendlist.php b/mojotrollz/page/wizard_friendlist/friendlist.php deleted file mode 100644 index 302c462..0000000 --- a/mojotrollz/page/wizard_friendlist/friendlist.php +++ /dev/null @@ -1,40 +0,0 @@ -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); - - } -} \ No newline at end of file diff --git a/mojotrollz/page/wizard_friendlist/friendlist.tpl b/mojotrollz/page/wizard_friendlist/friendlist.tpl deleted file mode 100644 index e69de29..0000000 diff --git a/mojotrollz/page/wizard_friendlist/img/wall.jpg b/mojotrollz/page/wizard_friendlist/img/wall.jpg deleted file mode 100644 index 949a950..0000000 Binary files a/mojotrollz/page/wizard_friendlist/img/wall.jpg and /dev/null differ diff --git a/mojotrollz/page/wizard_guild/js/wizard_guild.js b/mojotrollz/page/wizard_guild/js/wizard_guild.js index f745e90..97f7f21 100644 --- a/mojotrollz/page/wizard_guild/js/wizard_guild.js +++ b/mojotrollz/page/wizard_guild/js/wizard_guild.js @@ -1,2 +1,6 @@ function init_wizard_guild(){ + remove_search(); + $('#btn_no_guild').click(function(){ + sendInfo('{"char_guild" : "no_guild"}','wizard_guild'); + }); } \ No newline at end of file diff --git a/mojotrollz/page/wizard_guild/tpl/guild.tpl b/mojotrollz/page/wizard_guild/tpl/guild.tpl index 87b8bfe..f6ea963 100644 --- a/mojotrollz/page/wizard_guild/tpl/guild.tpl +++ b/mojotrollz/page/wizard_guild/tpl/guild.tpl @@ -1,2 +1,2 @@ -guild +
  • No Guild
  • \ No newline at end of file diff --git a/mojotrollz/page/wizard_register/js/wizard_register.js b/mojotrollz/page/wizard_register/js/wizard_register.js index 50f7bc0..f7f5eab 100644 --- a/mojotrollz/page/wizard_register/js/wizard_register.js +++ b/mojotrollz/page/wizard_register/js/wizard_register.js @@ -1,3 +1,4 @@ function init_wizard_register(){ + remove_search(); $('#back_link').click(function(){system.load($(this).attr('sysload'));}); } \ No newline at end of file diff --git a/mojotrollz/page/wizard_skills/wizard_skills.php b/mojotrollz/page/wizard_skills/wizard_skills.php index 6ba6cb8..6330570 100644 --- a/mojotrollz/page/wizard_skills/wizard_skills.php +++ b/mojotrollz/page/wizard_skills/wizard_skills.php @@ -1,6 +1,8 @@ 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); } } \ No newline at end of file diff --git a/mojotrollz/page/wizard_spawn/js/wizard_spawn.js b/mojotrollz/page/wizard_spawn/js/wizard_spawn.js index 2f17bdb..fa3d3b2 100644 --- a/mojotrollz/page/wizard_spawn/js/wizard_spawn.js +++ b/mojotrollz/page/wizard_spawn/js/wizard_spawn.js @@ -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(); diff --git a/mojotrollz/page/wizard_summary/js/wizard_summary.js b/mojotrollz/page/wizard_summary/js/wizard_summary.js new file mode 100644 index 0000000..6748d4c --- /dev/null +++ b/mojotrollz/page/wizard_summary/js/wizard_summary.js @@ -0,0 +1,7 @@ +function init_wizard_summary(){ + remove_search(); + $('.table_summ tr').click(function(){ + system.load($(this).attr('sysload'));}); +} + + diff --git a/mojotrollz/page/wizard_summary/tpl/summary.tpl b/mojotrollz/page/wizard_summary/tpl/summary.tpl index 5726e38..b07c3e7 100644 --- a/mojotrollz/page/wizard_summary/tpl/summary.tpl +++ b/mojotrollz/page/wizard_summary/tpl/summary.tpl @@ -1,77 +1,77 @@
    -

    Summary

    +

    Summary

    - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + - - + + - + - - + + - + - +
    Name ${char_name}${char_name_ok}
    Gender ${char_gender_ok}
    Race ${char_race_ok}
    Class ${char_class_ok}
    Skin Color ${char_skin_color}${char_skin_color_ok}
    Hair ${char_hair}${char_hair_ok}
    Hair Color ${char_hair_color}${char_hair_color_ok}
    Face ${char_face}${char_face_ok}
    Facial Hair ${char_facial_hair}${char_facial_hair_ok}
    Facial Hair Color ${char_facial_hair_color}${char_facial_hair_color_ok}
    Equip${char_equip}
    Skill Tree${char_skill_tree}${char_skill_tree_ok}
    Guild${char_guild}${char_guild_ok}
    Spawn ${char_spawn_ok}
    \ No newline at end of file diff --git a/mojotrollz/page/wizard_summary/wizard_summary.php b/mojotrollz/page/wizard_summary/wizard_summary.php index dfe464e..b80d376 100644 --- a/mojotrollz/page/wizard_summary/wizard_summary.php +++ b/mojotrollz/page/wizard_summary/wizard_summary.php @@ -1,8 +1,17 @@ $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'); diff --git a/mojotrollz/page/wizard_toolbar/tpl/wizard_toolbar.tpl b/mojotrollz/page/wizard_toolbar/tpl/wizard_toolbar.tpl index 4e80a34..d123f3a 100644 --- a/mojotrollz/page/wizard_toolbar/tpl/wizard_toolbar.tpl +++ b/mojotrollz/page/wizard_toolbar/tpl/wizard_toolbar.tpl @@ -3,8 +3,8 @@ - - + + - + \ No newline at end of file diff --git a/mojotrollz/page/wizard_toolbar/wizard_toolbar.php b/mojotrollz/page/wizard_toolbar/wizard_toolbar.php index 730b80a..3b5a035 100644 --- a/mojotrollz/page/wizard_toolbar/wizard_toolbar.php +++ b/mojotrollz/page/wizard_toolbar/wizard_toolbar.php @@ -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'); diff --git a/mojotrollz/page/wizard_visuals/js/wizard_visuals.js b/mojotrollz/page/wizard_visuals/js/wizard_visuals.js index 2fdebe5..4300c98 100644 --- a/mojotrollz/page/wizard_visuals/js/wizard_visuals.js +++ b/mojotrollz/page/wizard_visuals/js/wizard_visuals.js @@ -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(){ diff --git a/system b/system index b3bf40d..69390d4 160000 --- a/system +++ b/system @@ -1 +1 @@ -Subproject commit b3bf40d17d3c707d7af17943b1f6ff147c0e71a6 +Subproject commit 69390d4c59bf3a2a3cd2add9f5b3bc3f571f1287