Autor Wiadomość
Nigga
PostWysłany: Wto 14:04, 25 Mar 2008    Temat postu: [CODE] New Thunder




Kod:

void CGame::DoAbaddonThunderDamageHandler()
{
int iResult;
register int i;

if (m_bIsApocalypseMode != TRUE) return;
if (iDice(1, 100) != 1) return;
for (i = 0; i < DEF_MAXCLIENTS; i++) {
 if (m_pClientList[i] != NULL) {
 if (m_pClientList[i]->m_iAdminUserLevel > 0) return;
  if (memcmp(m_pClientList[i]->m_cMapName, "abaddon", 7) == 0) {
   iResult = iDice(1,20) + 100;
   if ((m_pClientList[i]->m_cMagicEffectStatus[DEF_MAGICTYPE_PROTECT] == 2) ||
    (m_pClientList[i]->m_cMagicEffectStatus[DEF_MAGICTYPE_PROTECT] == 5)) {
    iResult /= 2;
   }
   SendNotifyMsg(NULL, i, DEF_NOTIFY_0BE5, NULL, NULL, NULL, NULL);
   m_pClientList[i]->m_iHP -= iResult;
   if (m_pClientList[i]->m_iHP <= 0) {
    ClientKilledHandler(i, NULL, NULL, iResult);
   }
   else if (iResult > 0) {
    SendNotifyMsg(NULL, i, DEF_NOTIFY_HP, NULL, NULL, NULL, NULL);
    SendEventToNearClient_TypeA(i, DEF_OWNERTYPE_PLAYER, MSGID_EVENT_MOTION, DEF_OBJECTDAMAGE, iResult, NULL, NULL);
    if (m_pClientList[i]->m_bSkillUsingStatus[19] != TRUE) {
      m_pMapList[m_pClientList[i]->m_cMapIndex]->ClearOwner(0, i, DEF_OWNERTYPE_PLAYER, m_pClientList[i]->m_sX, m_pClientList[i]->m_sY);
      m_pMapList[m_pClientList[i]->m_cMapIndex]->SetOwner(i, DEF_OWNERTYPE_PLAYER, m_pClientList[i]->m_sX, m_pClientList[i]->m_sY);
    }
    if (m_pClientList[i]->m_cMagicEffectStatus[DEF_MAGICTYPE_HOLDOBJECT] != 0) {
     SendNotifyMsg(NULL, i, DEF_NOTIFY_MAGICEFFECTOFF, DEF_MAGICTYPE_HOLDOBJECT, m_pClientList[i]->m_cMagicEffectStatus[DEF_MAGICTYPE_HOLDOBJECT], NULL, NULL);
     bRemoveFromDelayEventList(i, DEF_OWNERTYPE_PLAYER, DEF_MAGICTYPE_HOLDOBJECT);
    }
   }
  }
 }
}
}

Powered by phpBB © 2001,2002 phpBB Group