I play on the official server, the boss and monsters on the yohara map use it (not all). Alastor, nethis etc. But the reflection feature is not in skill damage, where the code is put is wrong
Also, the feature is always active, not when health is 25% (unrelated, but why can't I use react to any message anymore?)
I'm sorry, but I doubt you even know what you're doing. We should avoid copy/paste, know the logic of our changes and avoid unnecessary additions.
//protoreader and dump_proto source/itemcsvreader
Find:
"REVIVE",
Add Below:
"REFLECT",
/////
mob_proto - Add in monster AIFlag
REFLECT
////
//length.h
Find:
AIFLAG_REVIVE = (1 << 11),
Add below:
AIFLAG_REFLECT = (1 << 12),
//char.h
Find:
void SetRevive(bool mode);
Add Below:
bool IsReflecter() const;
//char_state.cpp
Find:
bool CHARACTER::IsReviver() const
{
...
}
Add Below:
bool CHARACTER::IsReflecter() const
{
return IS_SET(m_pointsInstant.dwAIFlag, AIFLAG_REFLECT);
}
//char_battle.cpp
Find:
if (GetPoint(POINT_REFLECT_MELEE))
{
int reflectDamage = dam * GetPoint(POINT_REFLECT_MELEE) / 100;
if (pAttacker->IsImmune(IMMUNE_REFLECT))
reflectDamage = int(reflectDamage / 3.0f + 0.5f);
pAttacker->Damage(this, reflectDamage, DAMAGE_TYPE_SPECIAL);
}
Abb Below:
if (IsMonster() && IsReflecter())
{
pAttacker->Damage(this, (dam * 5 / 100), DAMAGE_TYPE_SPECIAL);
}
Add below:
AIFLAG_REFLECT = (1 << 12),
//char.h
bool IsReflecter() const;
//char_state.cpp
bool CHARACTER::IsReflecter() const
{
return IS_SET(m_pointsInstant.dwAIFlag, AIFLAG_REFLECT);
}
//char_battle.cpp
Find:
if (GetPoint(POINT_REFLECT_MELEE))
{
int reflectDamage = dam * GetPoint(POINT_REFLECT_MELEE) / 100;
if (pAttacker->IsImmune(IMMUNE_REFLECT))
reflectDamage = int(reflectDamage / 3.0f + 0.5f);
pAttacker->Damage(this, reflectDamage, DAMAGE_TYPE_SPECIAL);
}
Abb Below:
if (IsMonster() && IsReflecter())
{
pAttacker->Damage(this, (dam * 5 / 100), DAMAGE_TYPE_SPECIAL);
}