本文整理汇总了C++中Zone::getCreature方法的典型用法代码示例。如果您正苦于以下问题:C++ Zone::getCreature方法的具体用法?C++ Zone::getCreature怎么用?C++ Zone::getCreature使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zone
的用法示例。
在下文中一共展示了Zone::getCreature方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
//////////////////////////////////////////////////////////////////////////////
// 뱀파이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void DestructionSpear::execute(Ousters* pOusters, ObjectID_t TargetObjectID, OustersSkillSlot* pOustersSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
Assert(pOusters != NULL);
Assert(pOustersSkillSlot != NULL);
try
{
Zone* pZone = pOusters->getZone();
Assert(pZone != NULL);
Creature* pTargetCreature = pZone->getCreature(TargetObjectID);
//Assert(pTargetCreature != NULL);
// NoSuch제거. by sigi. 2002.5.2
if (pTargetCreature==NULL)
{
executeSkillFailException(pOusters, getSkillType());
return;
}
execute(pOusters, pTargetCreature->getX(), pTargetCreature->getY(), pOustersSkillSlot, CEffectID);
}
catch (Throwable & t)
{
executeSkillFailException(pOusters, getSkillType());
//cout << t.toString() << endl;
}
__END_CATCH
}
示例2: execute
//////////////////////////////////////////////////////////////////////////////
// 슬레이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void MoleShot::execute(Slayer* pSlayer, ObjectID_t TargetObjectID, SkillSlot* pSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin" << endl;
Assert(pSlayer != NULL);
Assert(pSkillSlot != NULL);
try
{
Zone* pZone = pSlayer->getZone();
Assert(pZone != NULL);
Creature* pTargetCreature = pZone->getCreature(TargetObjectID);
//Assert(pTargetCreature != NULL);
// NoSuch제거. by sigi. 2002.5.2
if (pTargetCreature==NULL)
{
executeSkillFailException(pSlayer, getSkillType());
return;
}
// 아이템이 없거나, 총 계열의 무기가 아니거나, SR이라면
// 이 기술을 사용할 수 없다.
Item* pItem = pSlayer->getWearItem(Slayer::WEAR_RIGHTHAND);
if (pItem == NULL
|| !isArmsWeapon(pItem))
// SR도 사용 가능하게 수정. by sigi. 2002.12.3
// || pItem->getItemClass() == Item::ITEM_CLASS_SR)
{
executeSkillFailException(pSlayer, getSkillType());
return;
}
Item::ItemClass IClass = pItem->getItemClass();
if (IClass == Item::ITEM_CLASS_SG)
{
SGexecute(pSlayer, pTargetCreature->getX(), pTargetCreature->getY(), pSkillSlot, CEffectID);
}
else if (IClass == Item::ITEM_CLASS_AR
|| IClass == Item::ITEM_CLASS_SMG
// SR도 사용 가능하게 수정. by sigi. 2002.12.3
|| IClass == Item::ITEM_CLASS_SR)
{
ARSMGexecute(pSlayer, pTargetCreature->getX(), pTargetCreature->getY(), pSkillSlot, CEffectID);
}
}
catch (Throwable & t)
{
executeSkillFailException(pSlayer, getSkillType());
}
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl;
__END_CATCH
}
示例3: affect
void EffectBlazeWalk::affect(Creature* pCreature)
throw(Error)
{
__BEGIN_TRY
Assert(pCreature != NULL);
Zone* pZone = pCreature->getZone();
Assert(pZone != NULL);
Creature* pAttacker = pZone->getCreature(m_UserObjectID);
if (pAttacker == NULL )
{
setDeadline(0);
return;
}
if (!(pZone->getZoneLevel() & COMPLETE_SAFE_ZONE)
&& !pCreature->isDead()
&& !pCreature->isFlag(Effect::EFFECT_CLASS_COMA )
// 무적상태 체크. by sigi. 2002.9.5
&& canAttack(pAttacker, pCreature )
)
{
GCModifyInformation gcMI, gcAttackerMI;
setDamage(pCreature, m_Point, pAttacker, m_SkillType, &gcMI, &gcAttackerMI);
if (pAttacker->isPC() ) computeAlignmentChange(pCreature, m_Point, pAttacker, &gcMI, &gcAttackerMI);
if (pCreature->isPC() ) pCreature->getPlayer()->sendPacket(&gcMI);
if (pAttacker->isSlayer() && !pCreature->isSlayer() )
{
Slayer* pSlayer = dynamic_cast<Slayer*>(pAttacker);
if (pSlayer != NULL )
{
GCModifyInformation gcMI;
shareAttrExp(pSlayer, m_Point, 8, 1, 1, gcAttackerMI);
}
}
if (pAttacker->isPC() ) pAttacker->getPlayer()->sendPacket(&gcAttackerMI);
if (pCreature->isDead() ) setDeadline(0);
}
m_AttackNum--;
if (m_AttackNum > 0 )
{
setNextTime(5);
}
else setDeadline(0);
//cout << "EffectBlazeWalk " << "begin" << endl;
//cout << "EffectBlazeWalk " << "end" << endl;
__END_CATCH
}
示例4: affect
void EffectDivineGuidance::affect(Creature* pCreature)
throw(Error)
{
__BEGIN_TRY
//cout << "EffectDivineGuidance " << "begin" << endl;
//cout << "EffectDivineGuidance " << "end" << endl;
Assert(pCreature != NULL);
Zone* pZone = pCreature->getZone();
Assert(pZone != NULL);
Creature* pAttacker = pZone->getCreature(m_UserObjectID);
if (!(pZone->getZoneLevel() & COMPLETE_SAFE_ZONE)
&& !pCreature->isDead()
&& !pCreature->isFlag(Effect::EFFECT_CLASS_COMA)
// 무적상태 체크. by sigi. 2002.9.5
&& canAttack(pAttacker, pCreature )
)
{
GCModifyInformation gcMI, gcAttackerMI;
setDamage(pCreature, m_Point, pAttacker, SKILL_DIVINE_GUIDANCE, &gcMI, &gcAttackerMI);
if (pCreature->isPC() ) pCreature->getPlayer()->sendPacket(&gcMI);
if (pAttacker!=NULL)
{
computeAlignmentChange(pCreature, m_Point, pAttacker, &gcMI, &gcAttackerMI);
if (pAttacker->isPC() )
{
if (pAttacker->isSlayer() && !pCreature->isSlayer() )
{
Slayer* pSlayer = dynamic_cast<Slayer*>(pAttacker);
if (pSlayer != NULL )
{
GCModifyInformation gcMI;
shareAttrExp(pSlayer, m_Point, 1, 1, 8, gcAttackerMI);
}
}
if (pAttacker->isPC() ) pAttacker->getPlayer()->sendPacket(&gcAttackerMI);
}
}
}
setNextTime(m_Tick);
__END_CATCH
}
示例5: execute
//////////////////////////////////////////////////////////////////////////////
// 아우스터즈 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void SummonGroundElemental::execute(Ousters* pOusters, ObjectID_t TargetObjectID, OustersSkillSlot* pOustersSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << "begin " << endl;
Assert(pOusters != NULL);
Assert(pOustersSkillSlot != NULL);
BYTE Grade = 0;
if (pOustersSkillSlot->getExpLevel() <= 10 ) Grade = 0;
else if (pOustersSkillSlot->getExpLevel() <= 20 ) Grade = 1;
else if (pOustersSkillSlot->getExpLevel() < 30 ) Grade = 2;
else Grade = 3;
try
{
Zone* pZone = pOusters->getZone();
Assert(pZone != NULL);
Creature* pTargetCreature = pZone->getCreature(TargetObjectID);
//Assert(pTargetCreature != NULL);
// NPC는 공격할 수가 없다.
if (pTargetCreature==NULL // NoSuch제거 때문에.. by sigi. 2002.5.2
|| pTargetCreature->isNPC())
{
executeSkillFailException(pOusters, getSkillType(), Grade);
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " end " << endl;
return;
}
execute(pOusters, pTargetCreature->getX(), pTargetCreature->getY(), pOustersSkillSlot, CEffectID);
}
catch (Throwable & t)
{
executeSkillFailException(pOusters, getSkillType(), Grade);
//cout << t.toString() << endl;
}
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " end " << endl;
__END_CATCH
}
示例6: execute
//////////////////////////////////////////////////////////////////////////////
// 슬레이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void SwordRay::execute(Slayer* pSlayer, ObjectID_t TargetObjectID, SkillSlot* pSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << "begin " << endl;
// Slayer Object Assertion
Assert(pSlayer != NULL);
Assert(pSkillSlot != NULL);
try
{
Zone* pZone = pSlayer->getZone();
Assert(pZone != NULL);
Creature* pTargetCreature = pZone->getCreature(TargetObjectID);
//Assert(pTargetCreature != NULL);
// NoSuch제거. by sigi. 2002.5.2
if (pTargetCreature==NULL
|| !canAttack(pSlayer, pTargetCreature )
|| pTargetCreature->isNPC())
{
executeSkillFailException(pSlayer, getSkillType());
return;
}
execute(pSlayer, pTargetCreature->getX(), pTargetCreature->getY(), pSkillSlot, CEffectID);
}
catch (Throwable & t)
{
executeSkillFailException(pSlayer, getSkillType());
//cout << t.toString() << endl;
}
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " end " << endl;
__END_CATCH
}
示例7: execute
//////////////////////////////////////////////////////////////////////////////
// 뱀파이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void RefusalEther::execute(Ousters* pOusters, ObjectID_t TargetObjectID, OustersSkillSlot* pOustersSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin" << endl;
Assert(pOusters != NULL);
Assert(pOustersSkillSlot != NULL);
BYTE Grade = 0;
if (pOustersSkillSlot->getExpLevel() < 15 ) Grade = 0;
else if (pOustersSkillSlot->getExpLevel() < 30 ) Grade = 1;
else Grade = 2;
try
{
Zone* pZone = pOusters->getZone();
Assert(pZone != NULL);
Creature* pTargetCreature = pZone->getCreature(TargetObjectID);
//Assert(pTargetCreature != NULL);
// NoSuch제거. by sigi. 2002.5.2
if (pTargetCreature==NULL)
{
executeSkillFailException(pOusters, getSkillType(), Grade);
return;
}
execute(pOusters, pTargetCreature->getX(), pTargetCreature->getY(), pOustersSkillSlot, CEffectID);
}
catch (Throwable & t)
{
executeSkillFailException(pOusters, getSkillType(), Grade);
}
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl;
__END_CATCH
}
示例8: execute
void SwordOfThor::execute(Slayer* pSlayer, ObjectID_t targetObjectID, SkillSlot* pSkillSlot, CEffectID_t CEffectID) throw(Error)
{
__BEGIN_TRY
Zone* pZone = pSlayer->getZone();
Assert(pZone != NULL);
Creature* pTargetCreature = pZone->getCreature(targetObjectID);
//Assert(pTargetCreature != NULL);
// NoSuch제거. by sigi. 2002.5.2
if (pTargetCreature==NULL)
{
executeSkillFailException(pSlayer, getSkillType());
return;
}
execute(pSlayer, pTargetCreature->getX(), pTargetCreature->getY(), pSkillSlot, CEffectID);
__END_CATCH
}
示例9: execute
//////////////////////////////////////////////////////////////////////////////
// 뱀파이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void MeteorStrike::execute(Vampire* pVampire, ObjectID_t TargetObjectID, VampireSkillSlot* pVampireSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << "begin " << endl;
Assert(pVampire != NULL);
Assert(pVampireSkillSlot != NULL);
try
{
Zone* pZone = pVampire->getZone();
Assert(pZone != NULL);
Creature* pTargetCreature = pZone->getCreature(TargetObjectID);
//Assert(pTargetCreature != NULL);
// NPC는 공격할 수가 없다.
if (pTargetCreature==NULL // NoSuch제거 때문에.. by sigi. 2002.5.2
|| !canAttack(pVampire, pTargetCreature )
|| pTargetCreature->isNPC())
{
executeSkillFailException(pVampire, getSkillType());
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " end " << endl;
return;
}
execute(pVampire, pTargetCreature->getX(), pTargetCreature->getY(), pVampireSkillSlot, CEffectID);
}
catch (Throwable & t)
{
executeSkillFailException(pVampire, getSkillType());
//cout << t.toString() << endl;
}
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " end " << endl;
__END_CATCH
}
示例10: execute
//////////////////////////////////////////////////////////////////////////////
// 슬레이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void ThunderStorm::execute(Slayer * pSlayer, ObjectID_t TargetObjectID, SkillSlot * pSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
Zone* pZone = pSlayer->getZone();
Assert(pZone!=NULL);
Creature* pTargetCreature = pZone->getCreature(TargetObjectID);
if (pTargetCreature!=NULL)
{
execute(pSlayer, pTargetCreature->getX(), pTargetCreature->getY(), pSkillSlot, CEffectID);
}
else
{
executeSkillFailException(pSlayer, getSkillType());
}
__END_CATCH
}
示例11: execute
//////////////////////////////////////////////////////////////////////////////
// 뱀파이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void IceField::execute(Ousters* pOusters, ObjectID_t TargetObjectID, OustersSkillSlot* pOustersSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin" << endl;
Assert(pOusters != NULL);
Assert(pOustersSkillSlot != NULL);
try
{
Zone* pZone = pOusters->getZone();
Assert(pZone != NULL);
Creature* pTargetCreature = pZone->getCreature(TargetObjectID);
//Assert(pTargetCreature != NULL);
// NoSuch제거. by sigi. 2002.5.2
if (pTargetCreature==NULL
|| !canAttack(pOusters, pTargetCreature )
)
{
executeSkillFailException(pOusters, getSkillType());
return;
}
execute(pOusters, pTargetCreature->getX(), pTargetCreature->getY(), pOustersSkillSlot, CEffectID);
}
catch (Throwable & t)
{
executeSkillFailException(pOusters, getSkillType());
}
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl;
__END_CATCH
}
示例12: execute
//////////////////////////////////////////////////////////////////////////////
// 슬레이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void ThunderFlash::execute(Slayer* pSlayer, ObjectID_t TargetObjectID, SkillSlot* pSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " begin(slayerobject)" << endl;
Assert(pSlayer != NULL);
Assert(pSkillSlot != NULL);
try
{
Zone* pZone = pSlayer->getZone();
Assert(pZone != NULL);
Creature* pTargetCreature = pZone->getCreature(TargetObjectID);
//Assert(pTargetCreature != NULL);
// NoSuch제거. by sigi. 2002.5.2
if (pTargetCreature==NULL)
{
executeSkillFailException(pSlayer, getSkillType());
return;
}
execute(pSlayer, pTargetCreature->getX(), pTargetCreature->getY(), pSkillSlot, CEffectID);
}
catch (Throwable & t)
{
executeSkillFailException(pSlayer, getSkillType());
}
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " end(slayerobject)" << endl;
__END_CATCH
}
示例13: execute
//////////////////////////////////////////////////////////////////////////////
// 뱀파이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void Darkness::execute(Vampire* pVampire, ObjectID_t TargetObjectID, VampireSkillSlot* pVampireSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin" << endl;
Assert(pVampire != NULL);
Assert(pVampireSkillSlot != NULL);
try
{
Zone* pZone = pVampire->getZone();
Assert(pZone != NULL);
Creature* pTargetCreature = pZone->getCreature(TargetObjectID);
//Assert(pTargetCreature != NULL);
// NoSuch제거. by sigi. 2002.5.2
if (pTargetCreature==NULL)
{
executeSkillFailException(pVampire, getSkillType());
return;
}
execute(pVampire, pTargetCreature->getX(), pTargetCreature->getY(), pVampireSkillSlot, CEffectID);
}
catch (Throwable & t)
{
executeSkillFailException(pVampire, getSkillType());
}
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl;
__END_CATCH
}
示例14: execute
//////////////////////////////////////////////////////////////////////
//
// Visible::execute()
//
//////////////////////////////////////////////////////////////////////
void Visible::execute(Slayer * pSlayer, ObjectID_t TargetObjectID, SkillSlot * pSkillSlot, CEffectID_t CEffectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin" << endl;
Assert(pSlayer != NULL);
Assert(pSkillSlot != NULL);
try
{
// Player를 받아온다.
Player * pPlayer = pSlayer->getPlayer();
// Zone을 받아온다.
Zone * pZone = pSlayer->getZone();
Creature * pTargetCreature = NULL;
if (pSlayer->getObjectID() == TargetObjectID) pTargetCreature = pSlayer;
else pTargetCreature = pZone->getCreature(TargetObjectID);
SkillType_t SkillType = pSkillSlot->getSkillType();
//Assert (pTargetCreature != NULL);
if (pTargetCreature == NULL || pTargetCreature->isNPC())
{
executeSkillFailException(pSlayer, SkillType);
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl;
return;
}
SkillInfo * pSkillInfo = g_pSkillInfoManager->getSkillInfo(SkillType);
// 기술의 레벨을 받아온다.
//SkillLevel_t SkillLevel = pSkillSlot->getExpLevel();
//SkillDomainType_t DomainType = pSkillInfo->getDomainType();
int RequiredMP = (int)pSkillInfo->getConsumeMP();
bool bManaCheck = hasEnoughMana(pSlayer, RequiredMP);
bool bTimeCheck = verifyRunTime(pSkillSlot);
bool bRangeCheck = verifyDistance(pSlayer, pTargetCreature, pSkillInfo->getRange());
bool bHit = false;
// 기술성공률 검증.
if (bManaCheck && bTimeCheck && bRangeCheck)
{
Coord_t myX = pSlayer->getX(), myY = pSlayer->getY();
Coord_t X = pTargetCreature->getX(), Y = pTargetCreature->getY();
Dir_t dir = calcDirection(myX, myY, X, Y);
SkillInput input(pSlayer, pSkillSlot);
SkillOutput output;
computeOutput(input, output);
GCSkillToTileOK1 _GCSkillToTileOK1;
GCSkillToTileOK2 _GCSkillToTileOK2;
GCSkillToTileOK3 _GCSkillToTileOK3;
GCSkillToTileOK4 _GCSkillToTileOK4;
GCSkillToTileOK5 _GCSkillToTileOK5;
decreaseMana(pSlayer, RequiredMP, _GCSkillToTileOK1);
// by sigi. 2002.11.12
VSRect rect(0, 0, pZone->getWidth()-1, pZone->getHeight()-1);
list<Creature*> cList;
int oX, oY;
for(oX = -2; oX <= 2; oX++)
for(oY = -2; oY <= 2; oY++)
{
int tileX = X+oX;
int tileY = Y+oY;
// by sigi. 2002.11.12
if (!rect.ptInRect(tileX, tileY)) continue;
Tile& tile = pZone->getTile(tileX, tileY);
pTargetCreature = NULL;
if(tile.hasCreature(Creature::MOVE_MODE_WALKING)) pTargetCreature = tile.getCreature(Creature::MOVE_MODE_WALKING);
if(pTargetCreature != NULL)
{
if(pTargetCreature->isPC())
{
bool bHitRoll = HitRoll::isSuccessMagic(pSlayer, pSkillInfo, pSkillSlot);
bool bEffected = pTargetCreature->isFlag(Effect::EFFECT_CLASS_INVISIBILITY);
if(bHitRoll && bEffected ) {
// 주위에 GCAddXXX를 보내고, effect manager에서 effect를 삭제하고, GCRemoveEffect를 보낸다.
addVisibleCreature(pZone, pTargetCreature, true);
//.........这里部分代码省略.........
示例15: execute
//////////////////////////////////////////////////////////////////////////////
// 뱀파이어 오브젝트 핸들러
//////////////////////////////////////////////////////////////////////////////
void BloodDrain::execute(Vampire* pVampire, ObjectID_t TargetObjectID)
throw(Error)
{
__BEGIN_TRY
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin(vampire)" << endl;
Assert(pVampire != NULL);
try
{
Player* pPlayer = pVampire->getPlayer();
Zone* pZone = pVampire->getZone();
Assert(pPlayer != NULL);
Assert(pZone != NULL);
Creature* pTargetCreature = pZone->getCreature(TargetObjectID);
//Assert(pTargetCreature != NULL);
// NPC는 공격할 수가 없다.
// 면역 상태. by sigi. 2002.9.13
// 무적상태 체크. by sigi.2002.9.5
// 죽은 애는 피 빨 수 없다. by Sequoia.2003. 3. 20
if (pTargetCreature==NULL // NoSuch 제거. by sigi. 2002.5.2
|| pTargetCreature->isNPC()
|| pTargetCreature->isFlag(Effect::EFFECT_CLASS_IMMUNE_TO_BLOOD_DRAIN)
|| !canAttack(pVampire, pTargetCreature )
|| pTargetCreature->isFlag(Effect::EFFECT_CLASS_COMA)
|| pTargetCreature->isDead()
)
{
executeSkillFailException(pVampire, getSkillType());
//cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End(vampire)" << endl;
return;
}
GCBloodDrainOK1 _GCBloodDrainOK1;
GCBloodDrainOK2 _GCBloodDrainOK2;
GCBloodDrainOK3 _GCBloodDrainOK3;
Timeval CurrentTime;
getCurrentTime(CurrentTime);
bool bHitRoll = HitRoll::isSuccessBloodDrain(pVampire, pTargetCreature);
bool bCanHit = canHit(pVampire, pTargetCreature, SKILL_BLOOD_DRAIN);
bool bTimeCheck = CurrentTime.tv_sec > 1 ? true : false;
bool bRangeCheck = verifyDistance(pVampire, pTargetCreature, 2);
bool bPK = verifyPK(pVampire, pTargetCreature);
if (bHitRoll && bCanHit && bTimeCheck && bRangeCheck && bPK)
{
// 슬레이어일 경우에만 이펙트 오브젝트를 생성한다.
if (pTargetCreature->isSlayer())
{
EffectBloodDrain* pEffectBloodDrain = new EffectBloodDrain(pTargetCreature);
pEffectBloodDrain->setLevel(pVampire->getLevel());
pEffectBloodDrain->setDeadline(BLOODDRAIN_DURATION); // 3일??
pTargetCreature->addEffect(pEffectBloodDrain);
pEffectBloodDrain->create(pTargetCreature->getName());
_GCBloodDrainOK2.addShortData(MODIFY_EFFECT_STAT, Effect::EFFECT_CLASS_BLOOD_DRAIN);
// 타겟이 뭐든 플래그는 건다.
pTargetCreature->setFlag(Effect::EFFECT_CLASS_BLOOD_DRAIN);
Slayer* pTargetSlayer = dynamic_cast<Slayer*>(pTargetCreature);
SLAYER_RECORD prev;
pTargetSlayer->getSlayerRecord(prev);
pTargetSlayer->initAllStat();
pTargetSlayer->sendRealWearingInfo();
pTargetSlayer->addModifyInfo(prev, _GCBloodDrainOK2);
// 로그를 남긴다.
//log(LOG_BLOODDRAINED, pTargetCreature->getName(), pVampire->getName());
}
// 아우스터즈의 경우엔..... -_-; 제한시간 없는 이펙트를 생성한다. 엄밀히 말해 제한시간이 없는 건 아니지만..
// else if (pTargetCreature->isOusters() )
// {
// EffectBloodDrain* pEffectBloodDrain = new EffectBloodDrain(pTargetCreature);
// pEffectBloodDrain->setLevel(pVampire->getLevel());
// pTargetCreature->addEffect(pEffectBloodDrain);
// pEffectBloodDrain->create(pTargetCreature->getName());
// _GCBloodDrainOK2.addShortData(MODIFY_EFFECT_STAT, Effect::EFFECT_CLASS_BLOOD_DRAIN);
//
// // 타겟이 뭐든 플래그는 건다.
// pTargetCreature->setFlag(Effect::EFFECT_CLASS_BLOOD_DRAIN);
//
// Sight_t oldSight = pTargetCreature->getSight();
// Sight_t newSight = pTargetCreature->getEffectedSight();
//
// if (oldSight != newSight )
// {
// pTargetCreature->setSight(newSight);
// pZone->updateScan(pTargetCreature, oldSight, pTargetCreature->getSight());
// _GCBloodDrainOK2.addShortData(MODIFY_VISION, pTargetCreature->getSight());
//
// GCChangeDarkLight gcChangeDarkLight;
// gcChangeDarkLight.setDarkLevel(15);
//.........这里部分代码省略.........