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

📄 effectflaginsert.cpp

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////// Filename    : EffectFlagInsert.cpp// Written by  : elca// Description : //////////////////////////////////////////////////////////////////////////////#include "EffectFlagInsert.h"#include "Creature.h"#include "Slayer.h"#include "Vampire.h"#include "Monster.h"#include "MonsterCorpse.h"#include "Player.h"#include "ZoneGroupManager.h"#include "StringPool.h"#include "Gpackets/GCModifyInformation.h"#include "Gpackets/GCStatusCurrentHP.h"#include "Gpackets/GCAddEffect.h"#include "Gpackets/GCRemoveEffect.h"#include "Gpackets/GCSystemMessage.h"#include <stdio.h>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////EffectFlagInsert::EffectFlagInsert(Creature* pCreature)	throw(Error){	__BEGIN_TRY	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////EffectFlagInsert::EffectFlagInsert(Item* pItem)	throw(Error){	__BEGIN_TRY	setTarget(pItem);	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectFlagInsert::affect(Creature* pCreature)	throw(Error){	__BEGIN_TRY																														    		__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectFlagInsert::affect(Item* pItem)	throw(Error){	__BEGIN_TRY	__END_CATCH}void EffectFlagInsert::unaffect() 	throw(Error){	__BEGIN_TRY		Item* pItem = dynamic_cast<Item *>(m_pTarget);	unaffect(pItem);	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectFlagInsert::unaffect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	__BEGIN_DEBUG	__END_DEBUG	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectFlagInsert::unaffect(Item* pItem)	throw(Error){	__BEGIN_TRY	__BEGIN_DEBUG	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_FLAG_INSERT);	Zone* pZone = pCorpse->getZone();	Assert(pZone != NULL);	GCRemoveEffect gcRemoveEffect;	gcRemoveEffect.setObjectID(pItem->getObjectID());	gcRemoveEffect.addEffectList(Effect::EFFECT_CLASS_FLAG_INSERT);	pZone->broadcastPacket(pCorpse->getX(), pCorpse->getY(), &gcRemoveEffect);	__END_DEBUG	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////string EffectFlagInsert::toString()	const throw(){	__BEGIN_TRY	StringStream msg;	msg << "EffectFlagInsert("		<< "ObjectID:" << getObjectID()		<< ")";	return msg.toString();	__END_CATCH}

⌨️ 快捷键说明

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