effectpotentialexplosion.cpp

来自「天之炼狱1服务器端源文件游戏服务端不完整」· C++ 代码 · 共 111 行

CPP
111
字号
//////////////////////////////////////////////////////////////////////////////// Filename    : EffectPotentialExplosion.cpp// Written by  : elca// Description : //////////////////////////////////////////////////////////////////////////////#include "EffectPotentialExplosion.h"#include "Slayer.h"#include "Vampire.h"#include "Monster.h"#include "Player.h"#include "PacketUtil.h"#include "Gpackets/GCRemoveEffect.h"#include "Gpackets/GCOtherModifyInfo.h"EffectPotentialExplosion::EffectPotentialExplosion(Creature* pCreature)	throw(Error){	__BEGIN_TRY	setTarget(pCreature);	__END_CATCH}void EffectPotentialExplosion::affect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	__END_CATCH}void EffectPotentialExplosion::affect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject)	throw(Error){	__BEGIN_TRY	__END_CATCH}void EffectPotentialExplosion::unaffect() 	throw(Error){	__BEGIN_TRY	    Creature* pCreature = dynamic_cast<Creature *>(m_pTarget);	unaffect(pCreature);	__END_CATCH}void EffectPotentialExplosion::unaffect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	__BEGIN_DEBUG	//cout << "EffectPotentialExplosion " << "unaffect BEGIN" << endl;	Assert(pCreature != NULL);	Assert(pCreature->isSlayer());	pCreature->removeFlag(Effect::EFFECT_CLASS_POTENTIAL_EXPLOSION);	Slayer* pSlayer = dynamic_cast<Slayer*>(pCreature);	SLAYER_RECORD prev;	pSlayer->getSlayerRecord(prev);	pSlayer->initAllStat();	pSlayer->sendRealWearingInfo();	pSlayer->sendModifyInfo(prev);	Zone* pZone = pSlayer->getZone();	Assert(pZone != NULL);	GCRemoveEffect gcRemoveEffect;	gcRemoveEffect.setObjectID(pSlayer->getObjectID());	gcRemoveEffect.addEffectList(Effect::EFFECT_CLASS_POTENTIAL_EXPLOSION);	pZone->broadcastPacket(pSlayer->getX(), pSlayer->getY(), &gcRemoveEffect);	GCOtherModifyInfo gcOtherModifyInfo;	makeGCOtherModifyInfo(&gcOtherModifyInfo, pSlayer, &prev);	pZone->broadcastPacket(pSlayer->getX(), pSlayer->getY(), &gcOtherModifyInfo, pSlayer);	//cout << "EffectPotentialExplosion " << "unaffect END" << endl;	__END_DEBUG	__END_CATCH}void EffectPotentialExplosion::unaffect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject)	throw(Error){	__BEGIN_TRY	__END_CATCH}string EffectPotentialExplosion::toString() const 	throw(){	__BEGIN_TRY	StringStream msg;	msg << "EffectPotentialExplosion("		<< "ObjectID:" << getObjectID()		<< ")";	return msg.toString();	__END_CATCH}

⌨️ 快捷键说明

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