// Monster die Handler (hooked replacement for gObjMonsterDieGiveItem) void __cdecl MonsterDie(LPOBJ lpObj, LPOBJ lpTargetObj) { PCPoint.RewardsPointsKillMob(lpTargetObj,lpObj,PCPOINT); PCPoint.RewardsPointsKillMob(lpTargetObj,lpObj,WCOIN); // Original function gObjMonsterDieGiveItem(lpObj, lpTargetObj); }
// Monster die Handler (hooked replacement for gObjMonsterDieGiveItem) void __cdecl MonsterDie(LPOBJ lpObj, LPOBJ lpTargetObj) { PCPoint.RewardsPointsKillMob(lpTargetObj,lpObj,PCPOINT); PCPoint.RewardsPointsKillMob(lpTargetObj,lpObj,WCOIN); // Original function gObjMonsterDieGiveItem(lpObj, lpTargetObj); //MapSystem Module Drop if(MapSystem.Maps[lpTargetObj->MapNumber].Drop != 0) { lpObj->m_wItemDropRate += MapSystem.Maps[lpObj->MapNumber].Drop; } }
void __cdecl MonsterDie(LPOBJ lpObj, LPOBJ lpTargetObj) { if(OBJECT_MAXRANGE(lpTargetObj->m_Index) == FALSE) { return; } if(OBJECT_MAXRANGE(lpObj->m_Index) == FALSE) { return; } PCPoint.RewardsPointsKillMob(lpTargetObj,lpObj,PCPOINT); PCPoint.RewardsPointsKillMob(lpTargetObj,lpObj,WCOIN); int Proc = 0; if( MapSystem.Maps[lpTargetObj->MapNumber].Drop ) { Proc += MapSystem.Maps[lpObj->MapNumber].Drop; } int IsHappyHour = HappyHour.IsHappyHour(lpTargetObj->MapNumber); if(IsHappyHour) { Proc += HappyHour.HappyStruct[IsHappyHour].P_Drop; } Proc += PlayerSystem.GetBonus(lpTargetObj, b_DROP); if(Vip.Config.Enabled) { Proc += Vip.GetBonus(lpTargetObj, b_DROP); } lpObj->m_wItemDropRate += (lpObj->m_wItemDropRate*Proc)/100; if(lpObj->m_wItemDropRate > 100) { lpObj->m_wItemDropRate = 100; } gObjMonsterDieGiveItem(lpObj,lpTargetObj); }
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; } }