/* ==========================================================================
* 파    일 : SkillWindow.h
* 목    적 : 
* 작 성 자 : 김가람
* 작 성 일 : 2007-06-18
* 주의사항 :
*===========================================================================*/
#pragma once
#include "TabWindow.h"


class cLabel;
class cCommuSheetWindow;

class cSkillWindow : public cTabWindow
{
public:
	cSkillWindow();
	virtual ~cSkillWindow();

	void Clear();

	unsigned int AddJobTab( unsigned long jobIdx );
	virtual void SetCurrent( unsigned int index );

	void UpdateSkillStep( unsigned long idx, unsigned char step );
	void StartCoolTime( unsigned long idx, unsigned long restTime, unsigned long totalTime );

	/// 오라스킬 세팅
	void SetOnAura( unsigned long skillIdx, unsigned long AuraUniqueIdx, bool on );
	unsigned long  GetAuraUniqueIdx( unsigned long idx );

	void DisableAllSkill();
	void UpdateSkillInfo();

	/// 스킬포인트 세팅 
	void UpdateSkillPoint();
	void UpdateSkillUsePoint();

	virtual void UpdateSkin();

	/// 커뮤니티 스킬 발동 요청
	void RequestCommuSkill( unsigned long skillIndex );
	void RequestLifeCommand( unsigned long comIdx, LPCTSTR value1, LPCSTR value2 );
	void NetUnLockCommu();

protected:
	bool OnCreate( cUINodeProperty* pproperty );
	void OnCommand( cUINode* pcaller, unsigned int id );
	void OnIconDragged( cUINode* caller, unsigned int id, const cUIPos& pos, bool shift );
	void OnShow();
	void OnHide();

	void UpdateCommuButtonPos();

private:
	/// 스킬 포인트
	cLabel*		mpSkillPoint;
	cLabel*		mpSkillUsePoint;

	/// community skill sheet info
	cTabButton*			mpCommuButton;
	cCommuSheetWindow*	mpCommuSheetWindow;

	unsigned char		mJobTabCount;

	cUIRect				mCommuBtnBaseRect;
};
