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

📄 effectrevealer.cpp

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////// Filename    : EffectRevealer.cpp// Written by  : elca// Description : //////////////////////////////////////////////////////////////////////////////#include "EffectRevealer.h"#include "Slayer.h"#include "Vampire.h"#include "Monster.h"#include "Gpackets/GCRemoveEffect.h"////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////EffectRevealer::EffectRevealer(Creature* pCreature)	throw(Error){	__BEGIN_TRY	// 叼咆飘 洒电篮 浇饭捞绢父捞 镜 荐 乐促.	Assert(pCreature != NULL);	Assert(pCreature->isSlayer());	setTarget(pCreature);	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectRevealer::affect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectRevealer::affect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject)	throw(Error){	__BEGIN_TRY	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectRevealer::unaffect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	//cout << "EffectRevealer " << "unaffect BEGIN" << endl;	Assert(pCreature != NULL);	Assert(pCreature->isSlayer());	// 敲贰弊甫 力芭茄促.	pCreature->removeFlag(Effect::EFFECT_CLASS_REVEALER);	// 付过狼 塞栏肺 焊绊 乐带 农府媚甸阑 昏力茄促.	Zone* pZone = pCreature->getZone();	Assert(pZone != NULL);	pZone->updateMineScan(pCreature);	// 捞力 hidden档 夯促.	pZone->updateHiddenScan(pCreature);	// 捞棋飘啊 荤扼脸促绊 舅妨霖促.	GCRemoveEffect gcRemoveEffect;	gcRemoveEffect.setObjectID(pCreature->getObjectID());	gcRemoveEffect.addEffectList(Effect::EFFECT_CLASS_REVEALER);	pZone->broadcastPacket(pCreature->getX(), pCreature->getY(), &gcRemoveEffect);	//cout << "EffectRevealer " << "unaffect END" << endl;	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectRevealer::unaffect()	throw(Error){	__BEGIN_TRY	Creature* pCreature = dynamic_cast<Creature*>(m_pTarget);	unaffect(pCreature);	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectRevealer::unaffect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject)	throw(Error){	__BEGIN_TRY	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////string EffectRevealer::toString()	const throw(){	__BEGIN_TRY	StringStream msg;	msg << "EffectRevealer("		<< "ObjectID:" << getObjectID()		<< ")";	return msg.toString();	__END_CATCH}bool EffectRevealer::canSeeHide( Creature* pTarget ) const	throw( Error ){	if ( !pTarget->isFlag( Effect::EFFECT_CLASS_HIDE ) )		return true;	Level_t level;		if ( pTarget->isVampire() )	{		Vampire* pVampire = dynamic_cast<Vampire*>(pTarget);		Assert( pVampire != NULL );		level = pVampire->getLevel();	}	else if ( pTarget->isMonster() )	{		Monster* pMonster = dynamic_cast<Monster*>(pTarget);		Assert( pMonster != NULL );		level = pMonster->getLevel();	}	else	{		throw Error( "轨颇捞绢唱 阁胶磐啊 酒囱单 窍捞靛窍绊 乐促" );	}	if ( m_SkillLevel >= 25 && m_SkillLevel > level )		return true;	else		return false;}bool EffectRevealer::canSeeSniping( Creature* pTarget ) const	throw( Error ){	if ( !pTarget->isFlag( Effect::EFFECT_CLASS_SNIPING_MODE ) )		return true;	Assert( pTarget->isSlayer() );	Slayer* pSlayer = dynamic_cast<Slayer*>(pTarget);	ExpLevel_t level;	SkillSlot* pSkillSlot = pSlayer->getSkill( SKILL_SNIPING );	Assert( pSkillSlot != NULL );	level = pSkillSlot->getExpLevel();	if ( m_SkillLevel >= 45 && m_SkillLevel > level )		return true;	else		return false;}bool EffectRevealer::canSeeInvisibility( Creature* pTarget ) const	throw( Error ){	if ( !pTarget->isFlag( Effect::EFFECT_CLASS_INVISIBILITY ) )		return true;	Level_t level;	if ( pTarget->isVampire() )	{		Vampire* pVampire = dynamic_cast<Vampire*>(pTarget);		Assert( pVampire != NULL );		level = pVampire->getLevel();	}	else if ( pTarget->isMonster() )	{		Monster* pMonster = dynamic_cast<Monster*>(pTarget);		Assert( pMonster != NULL );		level = pMonster->getLevel();	}	else	{		throw Error( "轨颇捞绢唱 阁胶磐啊 酒囱单 牢厚瘤呼府萍甫 静绊 乐促." );	}	if ( m_SkillLevel >=65 && (m_SkillLevel-20) >= level )		return true;	else		return false;}

⌨️ 快捷键说明

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