⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guildlevelupdialog.cpp

📁 墨香最新私服
💻 CPP
字号:
// GuildLevelUpDialog.cpp: implementation of the CGuildLevelUpDialog class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "GuildLevelUpDialog.h"
#include "./interface/cStatic.h"
#include "WindowIDEnum.h"
#include "GuildManager.h"
#include "ObjectManager.h"
#include "GameIn.h"
#include "NpcScriptDialog.h"
#include "ObjectStateManager.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CGuildLevelUpDialog::CGuildLevelUpDialog()
{
	m_type = WT_GUILDLEVELUPDLG;
}

CGuildLevelUpDialog::~CGuildLevelUpDialog()
{

}

void CGuildLevelUpDialog::Linking()
{
	for(int i=0; i<MAX_GUILD_STEP; ++i)
	{
		m_pLevelupNotComplete[i] = (cStatic*)GetWindowForID(GD_LU1NOTCOMPLETE+i);
		m_pLevelupComplete[i] = (cStatic*)GetWindowForID(GD_LU1COMPLETE+i);
	}
}

void CGuildLevelUpDialog::SetLevel(BYTE level)
{
	BYTE lvl = level - 1;
	for(int i=0; i<lvl; ++i)
	{
		m_pLevelupNotComplete[i]->SetActive(FALSE);
		m_pLevelupComplete[i]->SetActive(TRUE);
	}
	for(i=lvl; i<MAX_GUILD_STEP; ++i)
	{
		m_pLevelupNotComplete[i]->SetActive(TRUE);
		m_pLevelupComplete[i]->SetActive(FALSE);
	}
}

void CGuildLevelUpDialog::SetActive(BOOL val)
{
	if(val == TRUE)
	{
		BYTE level = GUILDMGR->GetGuildLevel();
		SetLevel(level);
	}
	else
	{
		if(HERO == 0)
			return;
		if( ( HERO->GetState() == eObjectState_Deal ) && (GAMEIN->GetNpcScriptDialog()->IsActive() == FALSE))
				OBJECTSTATEMGR->EndObjectState(HERO, eObjectState_Deal);
	}
	cDialog::SetActive(val);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -