all i did here was fix a few minor errors, full credit to acid-x on this 1.
Code: Select all
// Cancellation Magic , Also Inhabitation Casting
case DEF_MAGICTYPE_CANCELLATION:
m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->GetOwner(&sOwnerH,
&cOwnerType, dX, dY);
if ( (cOwnerType == DEF_OWNERTYPE_PLAYER) && (m_pClientList[sOwnerH] != NULL)
&& (m_pClientList[sOwnerH]->m_iHP > 0) && (m_pClientList[iClientH]->m_iAdminUserLevel < 1) ) {
// Removes Invisibility Flag 0x0010
SetInvisibilityFlag(sOwnerH, cOwnerType, FALSE);
// Removes Illusion Flag 0x01000000
SetIllusionFlag(sOwnerH, cOwnerType, FALSE);
// Removes Defense Shield Flag 0x02000000
// Removes Great Defense Shield Flag 0x02000000
SetDefenseShieldFlag(sOwnerH, cOwnerType, FALSE);
// Removes Absolute Magic Protection Flag 0x04000000
// Removes Protection From Magic Flag 0x04000000
SetMagicProtectionFlag(sOwnerH, cOwnerType, FALSE);
// Removes Protection From Arrow Flag 0x08000000
SetProtectionFromArrowFlag(sOwnerH, cOwnerType, FALSE);
// Removes Illusion Movement Flag 0x00200000
SetIllusionMovementFlag(sOwnerH, cOwnerType, FALSE);
// Removes Berserk Flag 0x0020
SetBerserkFlag(sOwnerH, cOwnerType, FALSE);
// Removes Inhibition Casting Flag
// SetInhibitionCastingFlag(sOwnerH,cOwnerType, FALSE);
/* if (m_pClientList[iClientH]-
>m_iStatus & 0x0040)
bRemoveFromDelayEventList(sOwnerH, DEF_OWNERTYPE_PLAYER,
DEF_MAGICTYPE_INHIBITCASTING);
bRegisterDelayEvent(DEF_DELAYEVENTTYPE_MAGICRELEASE,
DEF_MAGICTYPE_INHIBITCASTING, dwTime + (m_pMagicConfigList[sType]->m_dwLastTime),
sOwnerH, cOwnerType, NULL, NULL, NULL, m_pMagicConfigList[sType]-
>m_sValue4, NULL, NULL);*/
if (m_pClientList[iClientH]->m_iStatus & 0x0010)
bRemoveFromDelayEventList(sOwnerH,
DEF_OWNERTYPE_PLAYER, DEF_MAGICTYPE_INVISIBILITY);
bRegisterDelayEvent(DEF_DELAYEVENTTYPE_MAGICRELEASE,
DEF_MAGICTYPE_INVISIBILITY, dwTime + (m_pMagicConfigList[sType]->m_dwLastTime),
sOwnerH, cOwnerType, NULL, NULL, NULL, m_pMagicConfigList[sType]->m_sValue4, NULL, NULL);
if (m_pClientList[iClientH]->m_iStatus & 0x0020)
bRemoveFromDelayEventList(sOwnerH,
DEF_OWNERTYPE_PLAYER, DEF_MAGICTYPE_BERSERK);
bRegisterDelayEvent(DEF_DELAYEVENTTYPE_MAGICRELEASE,
DEF_MAGICTYPE_BERSERK, dwTime + (m_pMagicConfigList[sType]->m_dwLastTime),
sOwnerH, cOwnerType, NULL, NULL, NULL, m_pMagicConfigList[sType]->m_sValue4, NULL, NULL);
if ( (m_pClientList[iClientH]->m_iStatus & 0x08000000) || (m_pClientList[iClientH]->m_iStatus & 0x04000000) || (m_pClientList[iClientH]->m_iStatus & 0x02000000))
bRemoveFromDelayEventList(sOwnerH,
DEF_OWNERTYPE_PLAYER, DEF_MAGICTYPE_PROTECT);
bRegisterDelayEvent(DEF_DELAYEVENTTYPE_MAGICRELEASE,
DEF_MAGICTYPE_PROTECT, dwTime + (m_pMagicConfigList[sType]->m_dwLastTime),
sOwnerH, cOwnerType, NULL, NULL, NULL, m_pMagicConfigList[sType]->m_sValue4, NULL, NULL);
if ((m_pClientList[iClientH]->m_iStatus & 0x01000000) || (m_pClientList[iClientH]->m_iStatus & 0x00200000))
bRemoveFromDelayEventList(sOwnerH,
DEF_OWNERTYPE_PLAYER, DEF_MAGICTYPE_CONFUSE);
bRegisterDelayEvent(DEF_DELAYEVENTTYPE_MAGICRELEASE,
DEF_MAGICTYPE_CONFUSE, dwTime + (m_pMagicConfigList[sType]->m_dwLastTime),
sOwnerH, cOwnerType, NULL, NULL, NULL, m_pMagicConfigList[sType]->m_sValue4, NULL, NULL);
// Update Client
SendEventToNearClient_TypeA(sOwnerH, DEF_OWNERTYPE_PLAYER,
MSGID_EVENT_MOTION, DEF_OBJECTNULLACTION, NULL, NULL, NULL);
}
break;