effectstriking.cpp

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

CPP
107
字号
//////////////////////////////////////////////////////////////////////////////// Filename    : EffectStriking.cpp// Written by  : excel96// Description : //////////////////////////////////////////////////////////////////////////////#include "EffectStriking.h"#include "Slayer.h"#include "Player.h"#include "Gpackets/GCRemoveEffect.h"EffectStriking::EffectStriking(Creature* pCreature)	throw(Error){	__BEGIN_TRY	Assert(pCreature != NULL);	Assert(pCreature->isSlayer());	setTarget(pCreature);	__END_CATCH}void EffectStriking::affect(Creature* pCreature)	throw(Error){	__BEGIN_TRY																															    		__END_CATCH}void EffectStriking::affect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject)	throw(Error){	__BEGIN_TRY	__END_CATCH}void EffectStriking::unaffect()	throw(Error){	//cout << "EffectStriking " << "unaffect BEGIN" << endl;    Creature* pCreature = dynamic_cast<Creature*>(m_pTarget);	unaffect(pCreature);	//cout << "EffectStriking " << "unaffect END" << endl;}void EffectStriking::unaffect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	//cout << "EffectStriking " << "unaffect BEGIN" << endl;	Assert(pCreature != NULL);	Assert(pCreature->isSlayer());	// 刚历 敲贰弊甫 朝赴促.	pCreature->removeFlag(Effect::EFFECT_CLASS_STRIKING);	// 瓷仿摹甫 货肺 拌魂秦辑 焊郴霖促.	Slayer* pSlayer = dynamic_cast<Slayer*>(pCreature);	SLAYER_RECORD prev;	pSlayer->getSlayerRecord(prev);	pSlayer->initAllStat();	pSlayer->sendRealWearingInfo();	pSlayer->sendModifyInfo(prev);	// 捞棋飘啊 荤扼脸促绊 林困俊 舅赴促.	Zone* pZone = pCreature->getZone();	Assert(pZone != NULL);	GCRemoveEffect gcRemoveEffect;	gcRemoveEffect.setObjectID(pCreature->getObjectID());	gcRemoveEffect.addEffectList(Effect::EFFECT_CLASS_STRIKING);	pZone->broadcastPacket(pCreature->getX(), pCreature->getY(), &gcRemoveEffect);	//cout << "EffectStriking " << "unaffect END" << endl;	__END_CATCH}void EffectStriking::unaffect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject)	throw(Error){	__BEGIN_TRY	__END_CATCH}string EffectStriking::toString()	const throw(){	__BEGIN_TRY	StringStream msg;	msg << "EffectStriking("		<< "ObjectID:" << getObjectID()		<< ")";	return msg.toString();	__END_CATCH}

⌨️ 快捷键说明

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