bool CActorInstance::__CanPushDestActor(CActorInstance& rkActorDst) { if (rkActorDst.IsBuilding()) return false; if (rkActorDst.IsDoor()) return false; if (rkActorDst.IsStone()) return false; if (rkActorDst.IsNPC()) return false; // 거대 몬스터 밀림 제외 extern bool IS_HUGE_RACE(unsigned int vnum); if (IS_HUGE_RACE(rkActorDst.GetRace())) return false; if (rkActorDst.IsStun()) return true; if (rkActorDst.__GetOwnerVID()!=GetVirtualID()) return false; if (rkActorDst.__GetOwnerTime()>3.0f) return false; return true; }
void CActorInstance::__HitStone(CActorInstance& rVictim) { if (rVictim.IsStun()) { rVictim.Die(); } else { rVictim.__Shake(100); } }
void CActorInstance::__HitGood(CActorInstance& rVictim) { if (rVictim.IsKnockDown()) return; if (rVictim.IsStun()) { rVictim.Die(); } else { rVictim.__Shake(100); if (!rVictim.isLock()) { float fRotRad = D3DXToRadian(GetRotation()); float fVictimRotRad = D3DXToRadian(rVictim.GetRotation()); D3DXVECTOR2 v2Normal(sin(fRotRad), cos(fRotRad)); D3DXVECTOR2 v2VictimNormal(sin(fVictimRotRad), cos(fVictimRotRad)); D3DXVec2Normalize(&v2Normal, &v2Normal); D3DXVec2Normalize(&v2VictimNormal, &v2VictimNormal); float fScalar = D3DXVec2Dot(&v2Normal, &v2VictimNormal); if (fScalar < 0.0f) { if (rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE)) rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); } else { if (rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_BACK)) rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); else if (rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE)) rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); } } } }
void CActorInstance::__HitGreate(CActorInstance& rVictim) { // DISABLE_KNOCKDOWN_ATTACK if (rVictim.IsKnockDown()) return; if (rVictim.__IsStandUpMotion()) return; // END_OF_DISABLE_KNOCKDOWN_ATTACK float fRotRad = D3DXToRadian(GetRotation()); float fVictimRotRad = D3DXToRadian(rVictim.GetRotation()); D3DXVECTOR2 v2Normal(sin(fRotRad), cos(fRotRad)); D3DXVECTOR2 v2VictimNormal(sin(fVictimRotRad), cos(fVictimRotRad)); D3DXVec2Normalize(&v2Normal, &v2Normal); D3DXVec2Normalize(&v2VictimNormal, &v2VictimNormal); float fScalar = D3DXVec2Dot(&v2Normal, &v2VictimNormal); rVictim.__Shake(100); if (rVictim.IsUsingSkill()) return; if (rVictim.IsStun()) { if (fScalar < 0.0f) rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING); else { if (!rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING_BACK)) rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING); } rVictim.m_isRealDead=true; } else { if (fScalar < 0.0f) { if (rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING)) { rVictim.PushOnceMotion(CRaceMotionData::NAME_STAND_UP); rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); } } else { if (!rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING_BACK)) { if (rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING)) { rVictim.PushOnceMotion(CRaceMotionData::NAME_STAND_UP); rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); } } else { rVictim.PushOnceMotion(CRaceMotionData::NAME_STAND_UP_BACK); rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); } } } }