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

📄 effectstormbloody.cpp

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////// Filename    : EffectStormBloody.cpp// Written by  : 厘全芒// Description ://////////////////////////////////////////////////////////////////////////////#include "EffectStormBloody.h"#include "Slayer.h"#include "Vampire.h"#include "Ousters.h"#include "Monster.h"#include "DB.h"#include "Player.h"#include "SkillUtil.h"#include "Gpackets/GCModifyInformation.h"#include "Gpackets/GCStatusCurrentHP.h"#include "Gpackets/GCRemoveEffect.h"////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////EffectStormBloody::EffectStormBloody(Creature* pCreature)	throw(Error){	__BEGIN_TRY	m_UserObjectID=0;	setTarget(pCreature);	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectStormBloody::affect()	throw(Error){	__BEGIN_TRY	//cout << "EffectStormBloody " << "begin begin" << endl;	Creature* pCreature = dynamic_cast<Creature *>(m_pTarget);	affect(pCreature);	//cout << "EffectStormBloody " << "begin end" << endl;	__END_CATCH }////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectStormBloody::affect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	//cout << "EffectStormBloody " << "begin" << endl;	Assert(pCreature != NULL);	Zone* pZone = pCreature->getZone();	Assert(pZone != NULL);	// 荤侩磊甫 啊廉柯促.	// !! 捞固 粮阑 唱艾阑 荐 乐栏骨肺 NULL捞 瞪 荐 乐促.	// by bezz. 2003.3.13	Creature* pCastCreature = pZone->getCreature( m_UserObjectID );	// 某胶磐啊 绝栏搁 公矫茄促.	if ( pCastCreature == NULL )		return;	// EffectStormBloody篮 AcidStorm, PoisonStorm, BloodyStorm困甫 瘤唱哎锭 嘿绰促.	// 捞绰 3锅狼 楷加 单固瘤甫 林绊 荤扼柳促.	Damage_t StormDamage = m_Point;	GCModifyInformation GCAttackerMI;	if (!(pZone->getZoneLevel() & COMPLETE_SAFE_ZONE)		// 公利惑怕 眉农. by sigi. 2002.9.5		&& !pCreature->isFlag(Effect::EFFECT_CLASS_NO_DAMAGE))	{		if (pCreature->isSlayer())		{			Slayer* pSlayer = dynamic_cast<Slayer*>(pCreature);			GCModifyInformation gcMI;			setDamage( pSlayer, StormDamage, pCastCreature, SKILL_BLOODY_STORM, &gcMI, &GCAttackerMI );			pSlayer->getPlayer()->sendPacket(&gcMI);		}		else if (pCreature->isVampire())		{			Vampire* pVampire = dynamic_cast<Vampire*>(pCreature);			GCModifyInformation gcMI;			setDamage( pVampire, StormDamage, pCastCreature, SKILL_BLOODY_STORM, &gcMI, &GCAttackerMI );			pVampire->getPlayer()->sendPacket(&gcMI);		}		else if (pCreature->isOusters())		{			Ousters* pOusters = dynamic_cast<Ousters*>(pCreature);			GCModifyInformation gcMI;			setDamage( pOusters, StormDamage, pCastCreature, SKILL_BLOODY_STORM, &gcMI, &GCAttackerMI );			pOusters->getPlayer()->sendPacket(&gcMI);		}		else if (pCreature->isMonster())		{			Monster* pMonster = dynamic_cast<Monster*>(pCreature);			setDamage( pMonster, StormDamage, pCastCreature, SKILL_BLOODY_STORM, NULL, &GCAttackerMI );		}		if ( pCastCreature->isVampire() && pCreature->isDead() )		{			Vampire* pVampire = dynamic_cast<Vampire*>(pCastCreature);			int exp = computeCreatureExp(pCreature, KILL_EXP);			shareVampExp(pVampire, exp, GCAttackerMI);			pVampire->getPlayer()->sendPacket( &GCAttackerMI );		}		// m_CasterName捞 pCreature甫 磷牢 版快狼 KillCount 贸府		// by sigi. 2002.9.9		// setDamage 甫 阂矾辑 贸府茄促. 林籍贸府		// by bezz. 2002.12.31/*		if (pCreature->isDead())		{			Creature* pAttacker = pZone->getCreature( m_UserObjectID );			if (pAttacker!=NULL)			{ 				affectKillCount(pAttacker, pCreature);			}		}*/	}		setNextTime(m_Tick);	//cout << "EffectStormBloody " << "end" << endl;	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectStormBloody::affect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject)	throw(Error){	__BEGIN_TRY	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectStormBloody::unaffect(Creature* pCreature)	throw(Error){	__BEGIN_TRY	__BEGIN_DEBUG	pCreature->removeFlag(Effect::EFFECT_CLASS_STORM_BLOODY);	Zone* pZone = pCreature->getZone();	Assert(pZone != NULL);	// 捞棋飘啊 荤扼脸促绊 舅妨霖促.	GCRemoveEffect gcRemoveEffect;	gcRemoveEffect.setObjectID(pCreature->getObjectID());	gcRemoveEffect.addEffectList(Effect::EFFECT_CLASS_STORM_BLOODY);	pZone->broadcastPacket(pCreature->getX(), pCreature->getY(), &gcRemoveEffect);	__END_DEBUG	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectStormBloody::unaffect()	throw(Error){	__BEGIN_TRY	Creature* pCreature = dynamic_cast<Creature*>(m_pTarget);	unaffect(pCreature);	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////void EffectStormBloody::unaffect(Zone* pZone , ZoneCoord_t x , ZoneCoord_t y , Object* pObject)	throw(Error){	__BEGIN_TRY	__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////string EffectStormBloody::toString() const 	throw(){	__BEGIN_TRY	StringStream msg;	msg << "EffectStormBloody("		<< "ObjectID:" << getObjectID()		<< ")";	return msg.toString();	__END_CATCH}

⌨️ 快捷键说明

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