void TMonsterAI::ProcessStateMsg(LPOBJ lpObj, int iMsgCode, int iIndex, int aMsgSubCode) { switch ( iMsgCode ) { case 1: gObjMonsterDieGiveItem(lpObj, &gObj[iIndex]); break; case 2: if ( gObj[iIndex].Live != FALSE ) { gObjBackSpring(lpObj, &gObj[iIndex]); } break; case 3: if ( lpObj->TargetNumber != -1 ) { lpObj->m_Agro.DelAgro(lpObj->TargetNumber); } lpObj->TargetNumber = -1; lpObj->LastAttackerID = -1; lpObj->m_ActState.Emotion = 0; lpObj->m_ActState.Attack = 0; lpObj->m_ActState.Move = 0; lpObj->NextActionTime = 1000; break; case 4: lpObj->m_ActState.Emotion = 3; lpObj->m_ActState.EmotionCount = 1; break; case 55: gObjAttack(lpObj, &gObj[iIndex], NULL, FALSE, FALSE, 0, FALSE, 0, 0); break; case 56: { LPOBJ lpTargetObj = &gObj[iIndex]; if(gObjCheckUsedBuffEffect(lpTargetObj, AT_POISON) == 0) { if ( retResistance(lpTargetObj, 1) == FALSE ) { lpTargetObj->lpAttackObj = lpObj; gObjAddBuffEffect(lpTargetObj, AT_POISON, 19, 3, 0, 0, aMsgSubCode); } } } break; case 57: { LPOBJ lpTargetObj = &gObj[iIndex]; gObjBackSpring2(lpTargetObj, lpObj, aMsgSubCode); } break; } }
void TMonsterAI::ProcessStateMsg(LPOBJ lpObj, int iMsgCode, int iIndex, int aMsgSubCode) { switch ( iMsgCode ) { case 1: gObjMonsterDieGiveItem(lpObj, &gObj[iIndex]); break; case 2: if ( gObj[iIndex].Live != FALSE ) { gObjBackSpring(lpObj, &gObj[iIndex]); } break; case 3: if ( lpObj->TargetNumber != -1 ) { lpObj->m_Agro.DelAgro(lpObj->TargetNumber); } lpObj->TargetNumber = -1; lpObj->LastAttackerID = -1; lpObj->m_ActState.Emotion = 0; lpObj->m_ActState.Attack = 0; lpObj->m_ActState.Move = 0; lpObj->NextActionTime = 1000; break; case 4: lpObj->m_ActState.Emotion = 3; lpObj->m_ActState.EmotionCount = 1; break; case 55: gObjAttack(lpObj, &gObj[iIndex], NULL, FALSE, FALSE, 0, FALSE); break; case 56: { LPOBJ lpTargetObj = &gObj[iIndex]; if ( lpTargetObj->m_PoisonType == 0 ) { if ( retResistance(lpTargetObj, R_POISON) == FALSE ) { lpTargetObj->m_PoisonType = 1; lpTargetObj->m_PoisonBeattackCount = aMsgSubCode; lpTargetObj->lpAttackObj = lpObj; lpTargetObj->m_ViewSkillState |= 1; GCSkillInfoSend(lpTargetObj, 1, 0x37); } } } break; case 57: { LPOBJ lpTargetObj = &gObj[iIndex]; gObjBackSpring2(lpTargetObj, lpObj, aMsgSubCode); } break; } }