skilltree arrows working, missing default files for race, old images

This commit is contained in:
Ulf Gebhardt 2014-11-12 17:27:57 +01:00
parent 9c943557c7
commit d83b4b6923
21 changed files with 147 additions and 18 deletions

View File

@ -62,8 +62,13 @@ function is_icon_skillable(id){
tree = parseInt($(id).attr('t'));
row = parseInt($(id).attr('r'));
column = parseInt($(id).attr('r'));
parent_row = parseInt($(id).attr('parent_row'));
parent_column = parseInt($(id).attr('parent_column'));
count = 0;
if(parent_row && parent_column && parent_row != 0 && parent_column != 0 && !is_icon_max('#t'+tree+'r'+parent_row+'c'+parent_column+'c')){
return false;}
$('#tree'+tree+' .icon').each(function(){
if($(this).attr('r') < row){
count += parseInt($('#'+this.id+'c').attr('cur'));}
@ -152,7 +157,18 @@ function write_icon(id,id_count,id_img,amount){
}
if(is_icon_max('#'+this.id+'c')){
write_icon_yellow('#'+this.id,'#'+this.id+'c','#'+this.id+'i');
} else if(is_icon_skillable('#'+this.id)){
write_icon_green('#'+this.id,'#'+this.id+'c','#'+this.id+'i');
} else {
$('#'+this.id+'c').html('');
write_icon_grey('#'+this.id,'#'+this.id+'c','#'+this.id+'i');
}
} else if(is_icon_skillable('#'+this.id)){
current = parseInt($('#'+this.id+'c').attr('cur'));
$('#'+this.id+'c').html(current+'/'+$('#'+this.id+'c').attr('max'));
if(is_icon_max('#'+this.id+'c')){
write_icon_yellow('#'+this.id,'#'+this.id+'c','#'+this.id+'i');
} else if(is_icon_skillable('#'+this.id)){
write_icon_green('#'+this.id,'#'+this.id+'c','#'+this.id+'i');
}
} else {
@ -169,7 +185,9 @@ function write_icon_green(id,id_count,id_img){
$(id_count).addClass('icon_text_green');
if($(id).attr('icon')){
$(id).attr('style','background: url(./api.php?call=files&cat=skilltree_skills&id='+$(id).attr('icon')+') 50% 50% no-repeat;');}
if($(id).attr('style') !== 'background: url(./api.php?call=files&cat=skilltree_skills&id='+$(id).attr('icon')+') 50% 50% no-repeat;'){
$(id).attr('style','background: url(./api.php?call=files&cat=skilltree_skills&id='+$(id).attr('icon')+') 50% 50% no-repeat;');}
}
if( $(id_img).hasClass('icon_border_grey') ||
$(id_img).hasClass('icon_border_yellow')){
@ -181,19 +199,35 @@ function write_icon_green(id,id_count,id_img){
$(id_img).hasClass('icon_border_yellow_down')){
$(id_img).removeClass('icon_border_grey_down');
$(id_img).removeClass('icon_border_yellow_down');
$(id_img).addClass('icon_border_green_down');}
$(id_img).addClass('icon_border_green_down');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'))+1;
var column = parseInt($(id).attr('c'));
write_arrow_grey('#t'+tree+'r'+row+'c'+column+'i');
}
if( $(id_img).hasClass('icon_border_grey_down_right') ||
$(id_img).hasClass('icon_border_yellow_down_right')){
$(id_img).removeClass('icon_border_grey_down_right');
$(id_img).removeClass('icon_border_yellow_down_right');
$(id_img).addClass('icon_border_green_down_right');}
$(id_img).addClass('icon_border_green_down_right');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'));
var column = parseInt($(id).attr('c'));
write_arrow_grey('#t'+tree+'r'+(row+1)+'c'+column+'i');
write_arrow_grey('#t'+tree+'r'+row+'c'+(column+1)+'i');
}
if( $(id_img).hasClass('icon_border_grey_right') ||
$(id_img).hasClass('icon_border_yellow_right')){
$(id_img).removeClass('icon_border_grey_right');
$(id_img).removeClass('icon_border_yellow_right');
$(id_img).addClass('icon_border_green_right');}
$(id_img).addClass('icon_border_green_right');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'));
var column = parseInt($(id).attr('c'))+1;
write_arrow_grey('#t'+tree+'r'+row+'c'+column+'i');
}
if( $(id_img).hasClass('icon_border_grey_inc') ||
$(id_img).hasClass('icon_border_yellow_inc')){
@ -211,7 +245,52 @@ function write_icon_green(id,id_count,id_img){
$(id_img).hasClass('icon_border_yellow_left')){
$(id_img).removeClass('icon_border_grey_left');
$(id_img).removeClass('icon_border_yellow_left');
$(id_img).addClass('icon_border_green_left');}
$(id_img).addClass('icon_border_green_left');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'));
var column = parseInt($(id).attr('c'))-1;
write_arrow_grey('#t'+tree+'r'+row+'c'+column+'i');
}
}
function write_arrow_yellow(id){
if($(id).hasClass('talent_arrow')){
if($(id).hasClass('icon_arrow_grey_down')){
$(id).removeClass('icon_arrow_grey_down');
$(id).addClass('icon_arrow_yellow_down');
}
if($(id).hasClass('icon_arrow_grey_down_right')){
$(id).removeClass('icon_arrow_grey_down_right');
$(id).addClass('icon_arrow_yellow_down_right');
}
if($(id).hasClass('icon_arrow_grey_right')){
$(id).removeClass('icon_arrow_grey_right');
$(id).addClass('icon_arrow_yellow_right');
}
if($(id).hasClass('icon_arrow_grey_left')){
$(id).removeClass('icon_arrow_grey_left');
$(id).addClass('icon_arrow_yellow_left');
}
}
}
function write_arrow_grey(id){
if($(id).hasClass('talent_arrow')){
if($(id).hasClass('icon_arrow_yellow_down')){
$(id).removeClass('icon_arrow_yellow_down');
$(id).addClass('icon_arrow_grey_down');
}
if($(id).hasClass('icon_arrow_yellow_down_right')){
$(id).removeClass('icon_arrow_yellow_down_right');
$(id).addClass('icon_arrow_grey_down_right');
}
if($(id).hasClass('icon_arrow_yellow_right')){
$(id).removeClass('icon_arrow_yellow_right');
$(id).addClass('icon_arrow_grey_right');
}
if($(id).hasClass('icon_arrow_yellow_left')){
$(id).removeClass('icon_arrow_yellow_left');
$(id).addClass('icon_arrow_grey_left');
}
}
}
function write_icon_yellow(id,id_count,id_img){
if($(id_img).hasClass('icon_empty')){
@ -221,7 +300,9 @@ function write_icon_yellow(id,id_count,id_img){
$(id_count).addClass('icon_text_yellow');
if($(id).attr('icon')){
$(id).attr('style','background: url(./api.php?call=files&cat=skilltree_skills&id='+$(id).attr('icon')+') 50% 50% no-repeat;');}
if($(id).attr('style') !== 'background: url(./api.php?call=files&cat=skilltree_skills&id='+$(id).attr('icon')+') 50% 50% no-repeat;'){
$(id).attr('style','background: url(./api.php?call=files&cat=skilltree_skills&id='+$(id).attr('icon')+') 50% 50% no-repeat;');}
}
if( $(id_img).hasClass('icon_border_grey') ||
$(id_img).hasClass('icon_border_green')){
@ -233,19 +314,35 @@ function write_icon_yellow(id,id_count,id_img){
$(id_img).hasClass('icon_border_green_down')){
$(id_img).removeClass('icon_border_grey_down');
$(id_img).removeClass('icon_border_green_down');
$(id_img).addClass('icon_border_yellow_down');}
$(id_img).addClass('icon_border_yellow_down');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'))+1;
var column = parseInt($(id).attr('c'));
write_arrow_yellow('#t'+tree+'r'+row+'c'+column+'i');
}
if( $(id_img).hasClass('icon_border_grey_down_right') ||
$(id_img).hasClass('icon_border_green_down_right')){
$(id_img).removeClass('icon_border_grey_down_right');
$(id_img).removeClass('icon_border_green_down_right');
$(id_img).addClass('icon_border_yellow_down_right');}
$(id_img).addClass('icon_border_yellow_down_right');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'));
var column = parseInt($(id).attr('c'));
write_arrow_yellow('#t'+tree+'r'+(row+1)+'c'+column+'i');
write_arrow_yellow('#t'+tree+'r'+row+'c'+(column+1)+'i');
}
if( $(id_img).hasClass('icon_border_grey_right') ||
$(id_img).hasClass('icon_border_green_right')){
$(id_img).removeClass('icon_border_grey_right');
$(id_img).removeClass('icon_border_green_right');
$(id_img).addClass('icon_border_yellow_right');}
$(id_img).addClass('icon_border_yellow_right');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'));
var column = parseInt($(id).attr('c'))+1;
write_arrow_yellow('#t'+tree+'r'+row+'c'+column+'i');
}
if( $(id_img).hasClass('icon_border_grey_inc') ||
$(id_img).hasClass('icon_border_green_inc')){
@ -263,7 +360,12 @@ function write_icon_yellow(id,id_count,id_img){
$(id_img).hasClass('icon_border_green_left')){
$(id_img).removeClass('icon_border_grey_left');
$(id_img).removeClass('icon_border_green_left');
$(id_img).addClass('icon_border_yellow_left');}
$(id_img).addClass('icon_border_yellow_left');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'));
var column = parseInt($(id).attr('c'))-1;
write_arrow_yellow('#t'+tree+'r'+row+'c'+column+'i');
}
}
function write_icon_grey(id,id_count,id_img){
if($(id_img).hasClass('icon_empty')){
@ -273,7 +375,9 @@ function write_icon_grey(id,id_count,id_img){
$(id_count).removeClass('icon_text_yellow');
if($(id).attr('icon')){
$(id).attr('style','background: url(./api.php?call=files&cat=skilltree_skills_grey&id='+$(id).attr('icon')+') 50% 50% no-repeat;');}
if($(id).attr('style') !== 'background: url(./api.php?call=files&cat=skilltree_skills_grey&id='+$(id).attr('icon')+') 50% 50% no-repeat;'){
$(id).attr('style', 'background: url(./api.php?call=files&cat=skilltree_skills_grey&id='+$(id).attr('icon')+') 50% 50% no-repeat;');}
}
if( $(id_img).hasClass('icon_border_yellow') ||
$(id_img).hasClass('icon_border_green')){
@ -285,19 +389,35 @@ function write_icon_grey(id,id_count,id_img){
$(id_img).hasClass('icon_border_green_down')){
$(id_img).removeClass('icon_border_yellow_down');
$(id_img).removeClass('icon_border_green_down');
$(id_img).addClass('icon_border_grey_down');}
$(id_img).addClass('icon_border_grey_down');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'))+1;
var column = parseInt($(id).attr('c'));
write_arrow_grey('#t'+tree+'r'+row+'c'+column+'i');
}
if( $(id_img).hasClass('icon_border_yellow_down_right') ||
$(id_img).hasClass('icon_border_green_down_right')){
$(id_img).removeClass('icon_border_yellow_down_right');
$(id_img).removeClass('icon_border_green_down_right');
$(id_img).addClass('icon_border_grey_down_right');}
$(id_img).addClass('icon_border_grey_down_right');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'));
var column = parseInt($(id).attr('c'));
write_arrow_yellow('#t'+tree+'r'+(row+1)+'c'+column+'i');
write_arrow_yellow('#t'+tree+'r'+row+'c'+(column+1)+'i');
}
if( $(id_img).hasClass('icon_border_yellow_right') ||
$(id_img).hasClass('icon_border_green_right')){
$(id_img).removeClass('icon_border_yellow_right');
$(id_img).removeClass('icon_border_green_right');
$(id_img).addClass('icon_border_grey_right');}
$(id_img).addClass('icon_border_grey_right');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'));
var column = parseInt($(id).attr('c'))+1;
write_arrow_grey('#t'+tree+'r'+row+'c'+column+'i');
}
if( $(id_img).hasClass('icon_border_yellow_inc') ||
$(id_img).hasClass('icon_border_green_inc')){
@ -315,5 +435,10 @@ function write_icon_grey(id,id_count,id_img){
$(id_img).hasClass('icon_border_green_left')){
$(id_img).removeClass('icon_border_yellow_left');
$(id_img).removeClass('icon_border_green_left');
$(id_img).addClass('icon_border_grey_left');}
$(id_img).addClass('icon_border_grey_left');
var tree = parseInt($(id).attr('t'));
var row = parseInt($(id).attr('r'));
var column = parseInt($(id).attr('c'))-1;
write_arrow_grey('#t'+tree+'r'+row+'c'+column+'i');
}
}

View File

@ -44,7 +44,9 @@ class skilltree{
'tree' => $t,
'row' => $r,
'column' => $c,
'icon' => $res[$count]['icon']));
'icon' => $res[$count]['icon'],
'parent_row' => $res[$count]['parent_row'],
'parent_column' => $res[$count]['parent_column']));
$count++;
} else {
@ -60,7 +62,9 @@ class skilltree{
'tree' => $t,
'row' => $r,
'column' => $c,
'icon' => ''));
'icon' => '',
'parent_row' => 0,
'parent_column' => 0));
}
if($c == 4){

View File

@ -1,4 +1,4 @@
<div class="icon" id="${id}" style="${style}" t="${tree}" r="${row}" c="${column}" icon="${icon}">
<div class="icon" id="${id}" style="${style}" t="${tree}" r="${row}" c="${column}" icon="${icon}" parent_row="${parent_row}" parent_column="${parent_column}">
<img src="./api.php?call=files&cat=skilltree&id=spacer.gif" class="${type} ${border}" alt="" id="${id}i">
<div class="icon_number ${text_color}" id="${id}c" max="${max}" cur="0">${max_text}</div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

BIN
mojotrollz/files/cards.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 KiB

BIN
mojotrollz/files/dorn.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
mojotrollz/files/gemz.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 KiB

BIN
mojotrollz/files/matsa.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

BIN
mojotrollz/files/mcmats.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

BIN
mojotrollz/files/shards.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB