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

📄 concealment.cpp

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////// Filename    : Concealment.cpp// Written by  : // Description : //////////////////////////////////////////////////////////////////////////////#include "Concealment.h"#include "EffectConcealment.h"#include "Gpackets/GCSkillToSelfOK1.h"#include "Gpackets/GCSkillToSelfOK2.h"#include "Gpackets/GCAddEffect.h"//////////////////////////////////////////////////////////////////////////////// 浇饭捞绢 伎橇 勤甸矾//////////////////////////////////////////////////////////////////////////////void Concealment::execute(Slayer* pSlayer, SkillSlot* pSkillSlot, CEffectID_t CEffectID)	throw(Error){	__BEGIN_TRY	//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin(slayer)" << endl;	Assert(pSlayer != NULL);	Assert(pSkillSlot != NULL);	try 	{		Player* pPlayer = pSlayer->getPlayer();		Zone* pZone = pSlayer->getZone();		Assert(pPlayer != NULL);		Assert(pZone != NULL);		GCSkillToSelfOK1 _GCSkillToSelfOK1;		GCSkillToSelfOK2 _GCSkillToSelfOK2;		SkillType_t       SkillType  = pSkillSlot->getSkillType();		SkillInfo*        pSkillInfo = g_pSkillInfoManager->getSkillInfo(SkillType);		SkillDomainType_t DomainType = pSkillInfo->getDomainType();		SkillLevel_t      SkillLevel = pSkillSlot->getExpLevel();		int  RequiredMP  = (int)pSkillInfo->getConsumeMP();		bool bManaCheck  = hasEnoughMana(pSlayer, RequiredMP);		bool bTimeCheck  = verifyRunTime(pSkillSlot);		bool bRangeCheck = checkZoneLevelToUseSkill(pSlayer);		bool bHitRoll    = HitRoll::isSuccessMagic(pSlayer, pSkillInfo, pSkillSlot);		bool bEffected   = pSlayer->isFlag(Effect::EFFECT_CLASS_CONCEALMENT);		if (bManaCheck && bTimeCheck && bRangeCheck && bHitRoll && !bEffected)		{			decreaseMana(pSlayer, RequiredMP, _GCSkillToSelfOK1);			// 瘤加 矫埃阑 拌魂茄促.			SkillInput input(pSlayer, pSkillSlot);			SkillOutput output;			computeOutput(input, output);			// 捞蒲飘 努贰胶甫 父甸绢 嘿牢促.			EffectConcealment* pEffect = new EffectConcealment(pSlayer);			pEffect->setDeadline(output.Duration);			pEffect->setLevel(SkillLevel);			pSlayer->addEffect(pEffect);			pSlayer->setFlag(Effect::EFFECT_CLASS_CONCEALMENT);			SLAYER_RECORD prev;			pSlayer->getSlayerRecord(prev);			pSlayer->initAllStat();			pSlayer->addModifyInfo(prev, _GCSkillToSelfOK1);			// 版氰摹甫 棵赴促.			SkillGrade Grade = g_pSkillInfoManager->getGradeByDomainLevel(pSlayer->getSkillDomainLevel(DomainType));			Exp_t ExpUp = 10* (Grade + 1);			shareAttrExp(pSlayer, ExpUp, 1, 8, 1, _GCSkillToSelfOK1);			increaseDomainExp(pSlayer, DomainType, pSkillInfo->getPoint(), _GCSkillToSelfOK1);//			increaseSkillExp(pSlayer, DomainType, pSkillSlot, pSkillInfo, _GCSkillToSelfOK1);			_GCSkillToSelfOK1.setSkillType(SkillType);			_GCSkillToSelfOK1.setCEffectID(CEffectID);			_GCSkillToSelfOK1.setDuration(output.Duration);					_GCSkillToSelfOK2.setObjectID(pSlayer->getObjectID());			_GCSkillToSelfOK2.setSkillType(SkillType);			_GCSkillToSelfOK2.setDuration(output.Duration);					pPlayer->sendPacket(&_GCSkillToSelfOK1);			pZone->broadcastPacket(pSlayer->getX(), pSlayer->getY(),  &_GCSkillToSelfOK2, pSlayer);			GCAddEffect gcAddEffect;			gcAddEffect.setObjectID(pSlayer->getObjectID());			gcAddEffect.setEffectID(pEffect->getEffectClass());			gcAddEffect.setDuration(output.Duration);			pZone->broadcastPacket(pSlayer->getX(), pSlayer->getY(), &gcAddEffect, pSlayer);			pSkillSlot->setRunTime(output.Delay);		} 		else 		{			executeSkillFailNormal(pSlayer, getSkillType(), NULL);		}	} 	catch (Throwable & t) 	{		executeSkillFailException(pSlayer, getSkillType());	}	//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End(slayer)" << endl;	__END_CATCH}Concealment g_Concealment;

⌨️ 快捷键说明

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