// 可否攻击 bool CGate::IsAttackAble(CMoveShape* pAttackShape) { if(!GetUnAttack()) return false; if(pAttackShape == NULL) return false; if(GetState() == STATE_DIED || IsDied()) return false; //城门打开时不可攻击 if(GetAction()==ACT_OPEN) return false; CServerRegion* pRegion = (CServerRegion*)GetFather(); if(pRegion == NULL) return false; //城门在非战斗时间不能被攻击 bool bResult = false; switch( pAttackShape -> GetType() ) { case TYPE_PLAYER: { } break; } return bResult; }
// 091110 ONS 펫 애니메이션 추가 : 죽었을때 애니메이션 처리 추가 void CPet::Process() { if(IsDied()) { DWORD time; time = REMOVEFADE_START_TIME; if( gCurTime - m_DiedTime > time ) { ShowObjectName( FALSE ); ShowChatBalloon( FALSE, NULL ); //그림자도 없애주자. if(m_ShadowObj.IsInited()) { m_ShadowObj.Release(); } DWORD ToTime = time; DWORD ElTime = gCurTime - m_DiedTime - time; float alp = 1 - (ElTime / (float)ToTime); if(alp <= 0) alp = 0; GetEngineObject()->SetAlpha(alp); } } CObject::Process(); }
void CMonster::Process() { if(IsDied()) { DWORD time = REMOVEFADE_START_TIME; if(GetObjectKind() == eObjectKind_BossMonster) { time += 5000; } if( gCurTime - m_DiedTime > time ) { ShowObjectName( FALSE ); ShowChatBalloon( FALSE, NULL ); //그림자도 없애주자. if(m_ShadowObj.IsInited()) { m_ShadowObj.Release(); } DWORD ToTime = time; DWORD ElTime = gCurTime - m_DiedTime - time; float alp = 1 - (ElTime / (float)ToTime); if(alp <= 0) alp = 0; GetEngineObject()->SetAlpha(alp); } #ifdef _TESTCLIENT_ if(gCurTime - m_DiedTime > MONSTERREMOVE_TIME) { OBJECTMGR->AddGarbageObject(this); } #endif } else { const EObjectKind objectKind = EObjectKind( GetSInfo() ? GetSInfo()->ObjectKind : eObjectKind_None ); switch( objectKind ) { // 080616 LUJ, 함정인 경우 초당 1씩 피를 감소시키고, 최후에는 자살시킨다 case eObjectKind_Trap: { if( gCurTime < mLastCheckedTick ) { break; } else if( ! GetLife() ) { SetDieFlag(); break; } SetLife( GetLife() - 1 ); mLastCheckedTick = gCurTime + 1000; break; } } } if(GetObjectKind() == eObjectKind_BossMonster) { CBossMonster* const pMon = (CBossMonster*)this; // 080109 KTH -- 보스 몬스터 등장 연출 if( pMon && pMon->IsOpenning() ) { if( pMon->GetOpenningTime()->Check() == 0 ) { pMon->GetEngineObject()->EnablePick(); pMon->SetOpenningEnd(); } } } CObject::Process(); }