- typedef enum RESET_EFST_TYPE {
- RESET_EFST_DEAD = 0x0,
- RESET_EFST_DISPEL = 0x1, // sage dispel, also used by LG_INSPIRATION
- RESET_EFST_PRETEND_DEAD = 0x2, // used by gospel
- RESET_EFST_TAROT = 0x3, // resets same as RESET_EFST_PRETEND_DEAD - except for EFST_TRICKDEAD
- RESET_EFST_ALL = 0x4, // from clearbuff npc command
- RESET_EFST_DEBUFF = 0x5, // from EFST_REFRESH
- RESET_EFST_CLEARANCE = 0x6,
- RESET_EFST_GC_NEWPOISON = 0x7, // ESTATE::IsGC_Poison seems to be a stub ? also related to LG_INSPIRATION?
- RESET_EFST_WANDERERandMINSTREL_OVERLAPDENY = 0x8, // unused ???
- RESET_MADOGEAR = 0x9,
- RESET_EFST_WANDERERandMINSTREL_OVERLAPDENY_GROUP_NONE = 0xa, // unused ???
- RESET_EFST_WANDERERandMINSTREL_OVERLAPDENY_GROUP_A = 0xb,
- RESET_EFST_WANDERERandMINSTREL_OVERLAPDENY_GROUP_B = 0xc,
- } RESET_EFST_TYPE;
- void CActor::ResetAllEffective(int resetType)
- {
- // m_effectiveList type is std::map<int, EFFECTIVE_INFO>
- // EFFECTIVE_INFO is just time, val1-3, and some other stuff that's not relevant
- for (auto it = m_effectiveList.begin(); it != m_effectiveList.end(); ++it)
- {
- ESTATE* stateInfo;
- int efst = it->first;
- EFFECTIVE_INFO info = it->second;
- int efst_time = info->time;
- bool removed = false;
- if (!info->val)
- continue;
- if ( (efst == EFST_PROVOKE || efst == EFST_PROVOKE_MDEF) && efst_time != 9999)
- {
- ResetEffective(efst, 0);
- continue;
- }
- stateInfo = EStatestateInfoMgr::GetPtr(stateInfo, EStatestateInfoMgr::m_cpSelf, efst);
- if (stateInfo == nullptr)
- continue;
- switch (resetType)
- {
- case RESET_EFST_DEAD:
- removed = stateInfo->m_isResetDead;
- break;
- case RESET_EFST_DISPEL:
- removed = stateInfo->m_isResetDispel;
- break;
- case RESET_EFST_TAROT:
- if (efst == EFST_TRICKDEAD)
- continue;
- // fallthrough
- case RESET_EFST_PRETEND_DEAD:
- removed = stateInfo->IsResetPretendDead();
- break;
- case RESET_EFST_ALL:
- removed = true;
- break;
- case RESET_EFST_DEBUFF:
- removed = stateInfo->m_isDeBuff;
- break;
- case RESET_EFST_CLEARANCE:
- removed = stateInfo->m_isResetCLEARANCE;
- break;
- case RESET_EFST_GC_NEWPOISON:
- removed = stateInfo->IsGC_POISON()
- break;
- case RESET_MADOGEAR:
- removed = stateInfo->m_isResetMADOGEAR;
- break;
- case RESET_EFST_WANDERERandMINSTREL_OVERLAPDENY_GROUP_A:
- case RESET_EFST_WANDERERandMINSTREL_OVERLAPDENY_GROUP_B:
- removed = (resetType == stateInfo->IsWANDERERandMINSTRELoverlapDeny());
- continue;
- }
- if (removed)
- ResetEffective(efst, 0);
- }
- if (resetType == RESET_EFST_CLEARANCE && GetType() == PC_TYPE)
- {
- if (m_pcSkill.m_spiritsTime.size() > 0)
- m_pcSkill.ResetSpirits(m_pcSkill);
- ResetMilleniumShield(m_pcSkill);
- }
- }
- void ESTATE_REFRESH::SetComplete(CActor *in_cpActor, const int in_Time, const int in_Val1, const int in_Val2, const int in_Val3)
- {
- in_cpActor->ResetHandicapState(in_cpActor, BODY_STUN);
- in_cpActor->ResetHandicapState(in_cpActor, BODY_SLEEP);
- in_cpActor->ResetHandicapState(in_cpActor, HEALTH_CURSE);
- in_cpActor->ResetHandicapState(in_cpActor, BODY_STONECURSE);
- in_cpActor->ResetHandicapState(in_cpActor, HEALTH_POISON);
- in_cpActor->ResetHandicapState(in_cpActor, HEALTH_BLIND);
- in_cpActor->ResetHandicapState(in_cpActor, HEALTH_SILENCE);
- in_cpActor->ResetHandicapState(in_cpActor, HEALTH_BLOODING);
- in_cpActor->ResetHandicapState(in_cpActor, HEALTH_CONFUSION);
- in_cpActor->ResetHandicapState(in_cpActor, BODY_FREEZING);
- in_cpActor->ResetHandicapState(in_cpActor, HANDICAPSTATE_DEEPSLEEP);
- in_cpActor->ResetHandicapState(in_cpActor, BODY_BURNNING);
- in_cpActor->ResetHandicapState(in_cpActor, HANDICAPSTATE_FROSTMISTY);
- in_cpActor->ResetHandicapState(in_cpActor, HANDICAPSTATE_COLD);
- in_cpActor->ResetEffective(EFST_TOXIN, 0);
- in_cpActor->ResetEffective(EFST_PARALYSE, 0);
- in_cpActor->ResetEffective(EFST_VENOMBLEED, 0);
- in_cpActor->ResetEffective(EFST_MAGICMUSHROOM, 0);
- in_cpActor->ResetEffective(EFST_DEATHHURT, 0);
- in_cpActor->ResetEffective(EFST_PYREXIA, 0);
- in_cpActor->ResetEffective(EFST_OBLIVIONCURSE, 0);
- in_cpActor->ResetEffective(EFST_MARSHOFABYSS, 0);
- in_cpActor->ResetEffective(EFST_MANDRAGORA, 0);
- in_cpActor->ResetAllEffective(RESET_EFST_DEBUFF);
- }