Hi,
I'm trying to keep the skills after dying by mobs BUT it removes the small icon from the top left corner and if i change my armor it gets back. It also removes random dew icons while the affect still on the character.
char_battle.cpp - Dead -> Bitte melden Sie sich an, um diesen Link zu sehen.
char_affect.cpp - ClearAffect
Code
- void CHARACTER::ClearAffect(bool bSave, bool letBuffs)
- {
- TAffectFlag afOld = m_afAffectFlag;
- WORD wMovSpd = GetPoint(POINT_MOV_SPEED);
- WORD wAttSpd = GetPoint(POINT_ATT_SPEED);
- itertype(m_list_pkAffect) it = m_list_pkAffect.begin();
- while (it != m_list_pkAffect.end())
- {
- CAffect * pkAff = *it;
- if (bSave)
- {
- if ( IS_NO_CLEAR_ON_DEATH_AFFECT(pkAff->dwType) || IS_NO_SAVE_AFFECT(pkAff->dwType))
- {
- ++it;
- continue;
- }
- #ifdef ENABLE_LET_BUFFS
- if(letBuffs)
- {
- int iSkills[] = {
- SKILL_JEONGWI,
- SKILL_GEOMKYUNG,
- SKILL_CHUNKEON,
- SKILL_GWIGEOM,
- SKILL_TERROR,
- SKILL_JUMAGAP,
- SKILL_HOSIN,
- SKILL_REFLECT,
- SKILL_GICHEON,
- SKILL_KWAESOK,
- SKILL_JEUNGRYEOK,
- SKILL_JEOKRANG,
- SKILL_CHEONGRANG
- };
- for (int i = 0; i < _countof(iSkills); i++)
- {
- if (pkAff->dwType == iSkills[i])
- {
- ++it;
- continue;
- }
- }
- }
- #endif
- #ifdef ENABLE_NEW_AFFECT_POTION
- int iPotionAffects[] = {AFFECT_POTION_1, AFFECT_POTION_2, AFFECT_POTION_3, AFFECT_POTION_4, AFFECT_POTION_5, AFFECT_POTION_6};
- for (int i = 0; i < _countof(iPotionAffects); i++)
- {
- if (pkAff->dwType == iPotionAffects[i])
- {
- ++it;
- continue;
- }
- }
- #endif
- if (IsPC())
- {
- SendAffectRemovePacket(GetDesc(), GetPlayerID(), pkAff->dwType, pkAff->bApplyOn);
- }
- }
- ComputeAffect(pkAff, false);
- it = m_list_pkAffect.erase(it);
- CAffect::Release(pkAff);
- }
- if (afOld != m_afAffectFlag ||
- wMovSpd != GetPoint(POINT_MOV_SPEED) ||
- wAttSpd != GetPoint(POINT_ATT_SPEED))
- UpdatePacket();
- CheckMaximumPoints();
- if (m_list_pkAffect.empty())
- event_cancel(&m_pkAffectEvent);
- }
- What else should i do?
- Regards,
- Matteo