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

📄 skilllist.cpp

📁 奇迹世界 部分源代码奇迹世界 部分源代码奇迹世界 部分源代码
💻 CPP
字号:
#include "stdafx.h"
#include "SkillList.h"
#include "Skill.h"
#include "SkillFactory.h"

SkillList::SkillList()
{
}

SkillList::~SkillList()
{	
	Release();
}

VOID SkillList::Release()
{
	SKILL_LIST_ITER it;

	for( it = m_listSkills.begin(); it != m_listSkills.end(); ++it )
	{
		Skill *pSkill = *it;
		pSkill->CommonRelease();
		SkillFactory::Instance()->FreeSkill( pSkill );
	}
	m_listSkills.clear();
}

// dwDelayTick捞 0老 版快 InstantBroadcast角青 饶 胶懦 贸府 场
VOID SkillList::Add( Skill *pSkill )
{
	if( pSkill->GetSkillType() != SKILL_TYPE_PASSIVE )
	{
		pSkill->StartExecute();
		m_listSkills.push_back( pSkill );	
	}
}

VOID SkillList::Update()
{
	SKILL_LIST_ITER it;

	DWORD dwCurTick = GetTickCount();
	for( it = m_listSkills.begin(); it != m_listSkills.end(); ++it )
	{
		Skill *pSkill = *it;

		if( dwCurTick >= pSkill->GetExecuteTick() )		// 何殿龋 荐沥!
		{
			pSkill->EndExecute();

			SkillFactory::Instance()->FreeSkill( pSkill );

			m_listSkills.erase( it-- );
		}
	}
}

⌨️ 快捷键说明

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