fixes for arrows
This commit is contained in:
parent
d97ad458eb
commit
23a130033f
@ -93,14 +93,17 @@ function is_icon_skillable(id){
|
|||||||
|
|
||||||
}
|
}
|
||||||
function is_icon_deskillable(id){
|
function is_icon_deskillable(id){
|
||||||
tree = parseInt($(id).attr('t'));
|
var tree = parseInt($(id).attr('t'));
|
||||||
row = parseInt($(id).attr('r'));
|
var row = parseInt($(id).attr('r'));
|
||||||
count = 0;
|
var count = 0;
|
||||||
|
var count_row = 0;
|
||||||
$('#tree'+tree+' .icon').each(function(){
|
$('#tree'+tree+' .icon').each(function(){
|
||||||
|
if($(this).attr('r') == row){
|
||||||
|
count_row += parseInt($('#'+this.id+'c').attr('cur'));}
|
||||||
if($(this).attr('r') > row){
|
if($(this).attr('r') > row){
|
||||||
count += parseInt($('#'+this.id+'c').attr('cur'));}
|
count += parseInt($('#'+this.id+'c').attr('cur'));}
|
||||||
});
|
});
|
||||||
if(count > 0){
|
if(count > 0 && count_row <= 5){
|
||||||
return false;}
|
return false;}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -201,9 +204,10 @@ function write_icon_green(id,id_count,id_img){
|
|||||||
$(id_img).removeClass('icon_border_yellow_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 tree = parseInt($(id).attr('t'));
|
||||||
var row = parseInt($(id).attr('r'))+1;
|
var row = parseInt($(id).attr('r'));
|
||||||
var column = parseInt($(id).attr('c'));
|
var column = parseInt($(id).attr('c'));
|
||||||
write_arrow_grey('#t'+tree+'r'+row+'c'+column+'i');
|
write_arrow_grey('#t'+tree+'r'+(row+1)+'c'+column+'i');
|
||||||
|
write_arrow_grey('#t'+tree+'r'+(row+2)+'c'+column+'i');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $(id_img).hasClass('icon_border_grey_down_right') ||
|
if( $(id_img).hasClass('icon_border_grey_down_right') ||
|
||||||
@ -316,9 +320,10 @@ function write_icon_yellow(id,id_count,id_img){
|
|||||||
$(id_img).removeClass('icon_border_green_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 tree = parseInt($(id).attr('t'));
|
||||||
var row = parseInt($(id).attr('r'))+1;
|
var row = parseInt($(id).attr('r'));
|
||||||
var column = parseInt($(id).attr('c'));
|
var column = parseInt($(id).attr('c'));
|
||||||
write_arrow_yellow('#t'+tree+'r'+row+'c'+column+'i');
|
write_arrow_yellow('#t'+tree+'r'+(row+1)+'c'+column+'i');
|
||||||
|
write_arrow_yellow('#t'+tree+'r'+(row+2)+'c'+column+'i');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $(id_img).hasClass('icon_border_grey_down_right') ||
|
if( $(id_img).hasClass('icon_border_grey_down_right') ||
|
||||||
@ -391,9 +396,10 @@ function write_icon_grey(id,id_count,id_img){
|
|||||||
$(id_img).removeClass('icon_border_green_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 tree = parseInt($(id).attr('t'));
|
||||||
var row = parseInt($(id).attr('r'))+1;
|
var row = parseInt($(id).attr('r'));
|
||||||
var column = parseInt($(id).attr('c'));
|
var column = parseInt($(id).attr('c'));
|
||||||
write_arrow_grey('#t'+tree+'r'+row+'c'+column+'i');
|
write_arrow_grey('#t'+tree+'r'+(row+1)+'c'+column+'i');
|
||||||
|
write_arrow_grey('#t'+tree+'r'+(row+2)+'c'+column+'i');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $(id_img).hasClass('icon_border_yellow_down_right') ||
|
if( $(id_img).hasClass('icon_border_yellow_down_right') ||
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user