
#include "menus\main.inl"
#include "menus\information.inl"
#include "menus\classes.inl"

#include "menus\attributes.inl"
#include "menus\skills.inl"
#include "menus\items.inl"

//---------------------------------------------------------------------

public menu_print_main(id)
{
	new menu_body[256];
	format(menu_body,255,"%L",id,"L_MENU_MAIN_BODY");
	show_menu(id,KEYS,menu_body,-1,"menu_main");
	
	return PLUGIN_CONTINUE;
}

public menu_print_next(id)
{
	new menu_body[256];
	format(menu_body,255,"%L",id,"L_MENU_MAIN2_BODY");
	show_menu(id,KEYS,menu_body,-1,"menu_next");
	
	return PLUGIN_CONTINUE;
}

public menu_print_information(id)
{
	new menu_body[256];
	format(menu_body,255,"%L",id,"L_MENU_INFO_BODY");
	show_menu(id,KEYS,menu_body,-1,"menu_info");
	
	return PLUGIN_CONTINUE;
}

public menu_print_classes(id)
{
	if(g_player_class_selected[id])
	{
		client_print(id,print_chat,"%L",id,"L_CLASS_SELECTE_ONCE",PLUGIN_TAG);
		return PLUGIN_HANDLED;
	}
	
	save_player(id);
		
	new menu_body[256];
	format(menu_body,255,"%L",id,"L_MENU_CLASS_BODY");
	show_menu(id,KEYS,menu_body,-1,"menu_classes");
	
	return PLUGIN_CONTINUE;
}

public menu_print_attributes(id)
{
	new menu_body[1024];
	
	if(g_player_class[id] == 0)
	{
		client_print(id,print_chat,"%L",id,"L_ATTR_MUST_SELECT_CLASS",PLUGIN_TAG);
		return PLUGIN_HANDLED;
	}
	else
	{
		format(menu_body,1023,"%L",id,"L_MENU_ATTRIBUTE_BODY",
		g_player_athletic[id],
		g_player_acrobatic[id],
		g_player_endurance[id]);
		
		show_menu(id,KEYS,menu_body,-1,"menu_attributes");
	}

	print_hud_player(id);
	
	return PLUGIN_CONTINUE;
}

public menu_print_skills(id)
{
	new menu_body[1024];
	
	if(g_player_class[id] == 0)
	{
		client_print(id,print_chat,"%L",id,"L_SKILL_MUST_SELECT_CLASS",PLUGIN_TAG);
		return PLUGIN_HANDLED;
	}
	else if(g_player_class[id] == 1)
	{
		format(menu_body,1023,"%L",id,"L_MENU_SKILL_BODY_1",
		g_skill[id][P_SKILL_1],
		g_skill[id][P_SKILL_2],
		g_skill[id][P_SKILL_3],
		g_skill[id][P_SKILL_4],
		g_skill[id][P_SKILL_5],
		g_skill[id][P_SKILL_6]);
		
		show_menu(id,KEYS,menu_body,-1,"menu_skills");
	}
	else
	{
		format(menu_body,1023,"%L",id,"L_MENU_SKILL_BODY_2",
		g_skill[id][P_SKILL_1],
		g_skill[id][P_SKILL_2],
		g_skill[id][P_SKILL_3],
		g_skill[id][P_SKILL_4],
		g_skill[id][P_SKILL_5],
		g_skill[id][P_SKILL_6]);
		
		show_menu(id,KEYS,menu_body,-1,"menu_skills");
	}
	
	print_hud_player(id);
	
	return PLUGIN_CONTINUE;
}

public menu_print_items(id)
{
	new menu_body[1024];
	
	if(g_player_class[id] == 0)
	{
		client_print(id,print_chat,"%L",id,"L_ITEM_MUST_SELECT_CLASS",PLUGIN_TAG);
		return PLUGIN_HANDLED;
	}
	else
	{
		format(menu_body,1023,"%L",id,"L_MENU_ITEM_BODY",
		BLEACH_ITEM_1_COST,
		BLEACH_ITEM_2_COST,
		BLEACH_ITEM_3_COST);
		
		show_menu(id,KEYS,menu_body,-1,"menu_items");
	}

	print_hud_player(id);
	
	return PLUGIN_CONTINUE;
}
