effectprotectionfromacid.cpp
来自「dk1游戏的原代码文件,完整.编译系统redhat7.3,mysql 3.23 」· C++ 代码 · 共 123 行
CPP
123 行
//////////////////////////////////////////////////////////////////////////////// Filename : EffectProtectionFromAcid.cpp// Written by : excel96// Description : ProtectionFromAcid俊 狼秦辑 积己登绰 魂己 单固瘤 距拳 捞棋飘捞促.//////////////////////////////////////////////////////////////////////////////#include "EffectProtectionFromAcid.h"#include "Creature.h"#include "Slayer.h"#include "DB.h"#include "Gpackets/GCRemoveEffect.h"////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////EffectProtectionFromAcid::EffectProtectionFromAcid(Creature* pCreature) throw(Error){ __BEGIN_TRY setTarget(pCreature); __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectProtectionFromAcid::affect(Creature* pCreature) throw(Error){ __BEGIN_TRY Resist_t resist = pCreature->getResist(MAGIC_DOMAIN_ACID); resist = min(MAX_RESIST,(int)(resist + m_Resist)); pCreature->setResist(MAGIC_DOMAIN_ACID, resist); __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectProtectionFromAcid::affect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject) throw(Error){ __BEGIN_TRY __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectProtectionFromAcid::unaffect(Creature* pCreature) throw(Error){ __BEGIN_TRY __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectProtectionFromAcid::unaffect() throw(Error){ __BEGIN_TRY __BEGIN_DEBUG Creature* pCreature = dynamic_cast<Creature*>(m_pTarget); pCreature->removeFlag(Effect::EFFECT_CLASS_PROTECTION_FROM_ACID); Resist_t resist = pCreature->getResist(MAGIC_DOMAIN_ACID); resist = max(0,(int)(resist - m_Resist)); pCreature->setResist(MAGIC_DOMAIN_ACID, resist); Zone* pZone = pCreature->getZone(); Assert(pZone != NULL); // 捞棋飘啊 荤扼脸促绊 舅妨霖促. GCRemoveEffect gcRemoveEffect; gcRemoveEffect.setObjectID(pCreature->getObjectID()); gcRemoveEffect.addEffectList(Effect::EFFECT_CLASS_PROTECTION_FROM_ACID); pZone->broadcastPacket(pCreature->getX(), pCreature->getY(), &gcRemoveEffect); __END_DEBUG __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectProtectionFromAcid::unaffect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject) throw(Error){ __BEGIN_TRY __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////string EffectProtectionFromAcid::toString() const throw(){ __BEGIN_TRY StringStream msg; msg << "EffectProtectionFromAcid(" << "ObjectID:" << getObjectID() << ")"; return msg.toString(); __END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectProtectionFromAcidLoader::load(Creature* pCreature) throw(Error){ __BEGIN_TRY __END_CATCH}EffectProtectionFromAcidLoader* g_pEffectProtectionFromAcidLoader = NULL;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?