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

📄 effectshrineshield.cpp

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////// Filename    : EffectShrineShield.cpp// Written by  : elca// Description : //////////////////////////////////////////////////////////////////////////////#include "EffectShrineShield.h"#include "Creature.h"#include "Slayer.h"#include "Vampire.h"#include "Monster.h"#include "MonsterCorpse.h"#include "Player.h"#include "ZoneGroupManager.h"#include "Gpackets/GCModifyInformation.h"#include "Gpackets/GCStatusCurrentHP.h"#include "Gpackets/GCAddEffect.h"#include "Gpackets/GCRemoveEffect.h"#include "Gpackets/GCSystemMessage.h"////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////EffectShrineShield::EffectShrineShield(Creature* pCreature)	throw(Error){	__BEGIN_TRY	m_ShrineID = 0;	setTarget(pCreature);	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////EffectShrineShield::EffectShrineShield(Item* pItem)	throw(Error){	__BEGIN_TRY	setTarget(pItem);	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectShrineShield::affect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectShrineShield::affect(Item* pItem)	throw(Error){	__BEGIN_TRY	__END_CATCH}void EffectShrineShield::unaffect() 	throw(Error){	__BEGIN_TRY			switch (m_pTarget->getObjectClass())	{		case OBJECT_CLASS_CREATURE :		{			Creature* pCreature = dynamic_cast<Creature *>(m_pTarget);			unaffect(pCreature);		}		break;		case OBJECT_CLASS_ITEM :		{			Item* pItem = dynamic_cast<Item *>(m_pTarget);			unaffect(pItem);		}		break;		default :			throw Error("Wrong Object Class");	}	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectShrineShield::unaffect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	__BEGIN_DEBUG	//cout << "EffectShrineShield" << "unaffect BEGIN" << endl;	Assert(pCreature != NULL);	// 瓷仿摹甫 沥惑利栏肺 登倒府扁 困秦辑绰 敲贰弊甫 掺绊,	// initAllStat阑 阂矾具 茄促.	pCreature->removeFlag(Effect::EFFECT_CLASS_SHRINE_SHIELD);	Zone* pZone = pCreature->getZone();	Assert(pZone != NULL);	GCRemoveEffect gcRemoveEffect;	gcRemoveEffect.setObjectID(pCreature->getObjectID());	gcRemoveEffect.addEffectList(Effect::EFFECT_CLASS_SHRINE_SHIELD);	pZone->broadcastPacket(pCreature->getX(), pCreature->getY(), &gcRemoveEffect);	//cout << "EffectShrineShield" << "unaffect END" << endl;	__END_DEBUG	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectShrineShield::unaffect(Item* pItem)	throw(Error){	__BEGIN_TRY	__BEGIN_DEBUG	//cout << "EffectShrineShield" << "unaffect BEGIN" << endl;	Assert(pItem != NULL);	Assert(pItem->getItemClass()==Item::ITEM_CLASS_CORPSE);	Assert(pItem->getItemType()==MONSTER_CORPSE);	MonsterCorpse* pCorpse = dynamic_cast<MonsterCorpse*>(pItem);	pCorpse->removeFlag(Effect::EFFECT_CLASS_SHRINE_SHIELD);	Zone* pZone = pCorpse->getZone();	Assert(pZone != NULL);	GCRemoveEffect gcRemoveEffect;	gcRemoveEffect.setObjectID(pItem->getObjectID());	gcRemoveEffect.addEffectList(Effect::EFFECT_CLASS_SHRINE_SHIELD);	pZone->broadcastPacket(pCorpse->getX(), pCorpse->getY(), &gcRemoveEffect);	//cout << "EffectShrineShield" << "unaffect END" << endl;	__END_DEBUG	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////string EffectShrineShield::toString()	const throw(){	__BEGIN_TRY	StringStream msg;	msg << "EffectShrineShield("		<< "ObjectID:" << getObjectID()		<< ")";	return msg.toString();	__END_CATCH}

⌨️ 快捷键说明

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