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

📄 effectblazewalk.cpp

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////// Filename    : EffectBlazeWalk.cpp// Written by  : excel96// Description ://////////////////////////////////////////////////////////////////////////////#include "EffectBlazeWalk.h"#include "Slayer.h"#include "Vampire.h"#include "Monster.h"#include "DB.h"#include "Player.h"#include "SkillUtil.h"#include "Gpackets/GCModifyInformation.h"#include "Gpackets/GCStatusCurrentHP.h"////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////EffectBlazeWalk::EffectBlazeWalk(Creature* pCreature)	throw(Error){	__BEGIN_TRY	m_UserObjectID = 0;	m_AttackNum = 0;	setTarget(pCreature);	m_SkillType = SKILL_BLAZE_WALK;	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectBlazeWalk::affect()	throw(Error){	__BEGIN_TRY	//cout << "EffectBlazeWalk " << "begin begin" << endl;	Creature* pCreature = dynamic_cast<Creature *>(m_pTarget);	affect(pCreature);	//cout << "EffectBlazeWalk " << "begin end" << endl;	__END_CATCH }////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectBlazeWalk::affect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	Assert(pCreature != NULL);	Zone* pZone = pCreature->getZone();	Assert(pZone != NULL);	if (!(pZone->getZoneLevel() & COMPLETE_SAFE_ZONE)		&& !pCreature->isDead()		&& !pCreature->isFlag( Effect::EFFECT_CLASS_COMA )		// 公利惑怕 眉农. by sigi. 2002.9.5		&& !pCreature->isFlag(Effect::EFFECT_CLASS_NO_DAMAGE))	{		Creature* pAttacker = pZone->getCreature( m_UserObjectID );		if ( pAttacker == NULL )		{			setDeadline(0);			return;		}		GCModifyInformation gcMI, gcAttackerMI;		setDamage( pCreature, m_Point, pAttacker, m_SkillType, &gcMI, &gcAttackerMI );		if ( pAttacker->isPC() ) computeAlignmentChange( pCreature, m_Point, pAttacker, &gcMI, &gcAttackerMI );		if ( pCreature->isPC() ) pCreature->getPlayer()->sendPacket( &gcMI );		if ( pAttacker->isSlayer() && !pCreature->isSlayer() )		{			Slayer* pSlayer = dynamic_cast<Slayer*>(pAttacker);			if ( pSlayer != NULL )			{				GCModifyInformation gcMI;				shareAttrExp( pSlayer, m_Point, 8, 1, 1, gcAttackerMI );			}		}		if ( pAttacker->isPC() ) pAttacker->getPlayer()->sendPacket( &gcAttackerMI );		if ( pCreature->isDead() ) setDeadline(0);	}	m_AttackNum--;	if ( m_AttackNum > 0 )	{		setNextTime(5);	}	else setDeadline(0);//cout << "EffectBlazeWalk " << "begin" << endl;	//cout << "EffectBlazeWalk " << "end" << endl;	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectBlazeWalk::unaffect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	__BEGIN_DEBUG	Assert(pCreature != NULL);	pCreature->removeFlag(Effect::EFFECT_CLASS_BLAZE_WALK);	__END_DEBUG	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectBlazeWalk::unaffect()	throw(Error){	__BEGIN_TRY	Creature* pCreature = dynamic_cast<Creature*>(m_pTarget);	unaffect(pCreature);	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////string EffectBlazeWalk::toString() const 	throw(){	__BEGIN_TRY	StringStream msg;	msg << "EffectBlazeWalk("		<< "ObjectID:" << getObjectID()		<< ")";	return msg.toString();	__END_CATCH}

⌨️ 快捷键说明

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