📄 effectbless.cpp
字号:
//////////////////////////////////////////////////////////////////////////////// Filename : EffectBless.cpp// Written by : elca// Description ://////////////////////////////////////////////////////////////////////////////#include "EffectBless.h"#include "Slayer.h"#include "Vampire.h"#include "Monster.h"#include "Player.h"#include "PacketUtil.h"#include "Gpackets/GCModifyInformation.h"#include "Gpackets/GCStatusCurrentHP.h"#include "Gpackets/GCRemoveEffect.h"#include "Gpackets/GCOtherModifyInfo.h"////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////EffectBless::EffectBless(Creature* pCreature) throw(Error){ __BEGIN_TRY Assert(pCreature != NULL); Assert(pCreature->isSlayer()); setTarget(pCreature); __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectBless::affect(Creature* pCreature) throw(Error){ __BEGIN_TRY __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectBless::affect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject) throw(Error){ __BEGIN_TRY __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectBless::unaffect() throw(Error){ __BEGIN_TRY //cout << "EffectBless" << "unaffect BEGIN" << endl; Creature* pCreature = dynamic_cast<Creature *>(m_pTarget); unaffect(pCreature); //cout << "EffectBless" << "unaffect END" << endl; __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectBless::unaffect(Creature* pCreature) throw(Error){ __BEGIN_TRY //cout << "EffectBless" << "unaffect BEGIN" << endl; Assert(pCreature != NULL); Assert(pCreature->isSlayer()); // 浇饭捞绢富绊绰 吧府瘤 臼绰促. pCreature->removeFlag(Effect::EFFECT_CLASS_BLESS); 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_BLESS); pZone->broadcastPacket(pCreature->getX(), pCreature->getY(), &gcRemoveEffect); GCOtherModifyInfo gcOtherModifyInfo; makeGCOtherModifyInfo(&gcOtherModifyInfo, pSlayer, &prev); pZone->broadcastPacket(pSlayer->getX(), pSlayer->getY(), &gcOtherModifyInfo, pSlayer); //cout << "EffectBless" << "unaffect END" << endl; __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectBless::unaffect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject) throw(Error){ __BEGIN_TRY __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////string EffectBless::toString() const throw(){ __BEGIN_TRY StringStream msg; msg << "EffectBless(" << "ObjectID:" << getObjectID() << ")"; return msg.toString(); __END_CATCH}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -