Untitled
unknown
plain_text
2 years ago
3.7 kB
8
Indexable
see this code system
// Next is a bit complicated. Find the following part and compare it to yours make if fit together with the sash
for (int i = 0; i < ITEM_ATTRIBUTE_MAX_NUM; ++i)
{
if (GetAttributeType(i))
{
const TPlayerItemAttribute& ia = GetAttribute(i);
#ifdef ENABLE_AURA_SYSTEM
if (ia.bType == APPLY_SKILL)
{
if (m_pProto->bType == ITEM_COSTUME && m_pProto->bSubType == COSTUME_AURA)
{
if (ia.sValue <= 0)
continue;
float fValue = ia.sValue * fAuraDrainPer;
int iValue = static_cast<int>((fValue < 1.0f) ? ceilf(fValue) : truncf(fValue));
m_pOwner->ApplyPoint(ia.bType, bAdd ? iValue : iValue ^ 0x00800000);
}
else
m_pOwner->ApplyPoint(ia.bType, bAdd ? ia.sValue : ia.sValue ^ 0x00800000);
}
else
{
if (m_pProto->bType == ITEM_COSTUME && m_pProto->bSubType == COSTUME_AURA)
{
if (ia.sValue <= 0)
continue;
float fValue = ia.sValue * fAuraDrainPer;
int iValue = static_cast<int>((fValue < 1.0f) ? ceilf(fValue) : truncf(fValue));
m_pOwner->ApplyPoint(ia.bType, bAdd ? iValue : -iValue);
}
else
m_pOwner->ApplyPoint(ia.bType, bAdd ? ia.sValue : -ia.sValue);
}
#else
if (ia.bType == APPLY_SKILL)
m_pOwner->ApplyPoint(ia.bType, bAdd ? ia.sValue : ia.sValue ^ 0x00800000);
else
m_pOwner->ApplyPoint(ia.bType, bAdd ? ia.sValue : -ia.sValue);
#endif
}
}
}
im make this
#ifdef ENABLE_ACCE_COSTUME_SYSTEM
if (GetType() == ITEM_COSTUME && GetSubType() == COSTUME_ACCE)
value = CalcAcceBonus(value);
#endif
#ifdef ENABLE_AURA_SYSTEM
if (ia.bType == APPLY_SKILL)
{
if (m_pProto->bType == ITEM_COSTUME && m_pProto->bSubType == COSTUME_AURA)
{
if (ia.sValue <= 0)
continue;
float fValue = ia.sValue * fAuraDrainPer;
int iValue = static_cast<int>((fValue < 1.0f) ? ceilf(fValue) : truncf(fValue));
m_pOwner->ApplyPoint(ia.bType, bAdd ? iValue : iValue ^ 0x00800000);
}
else
m_pOwner->ApplyPoint(ia.bType, bAdd ? value : value ^ 0x00800000);
}
else
{
if (m_pProto->bType == ITEM_COSTUME && m_pProto->bSubType == COSTUME_AURA)
{
if (ia.sValue <= 0)
continue;
float fValue = ia.sValue * fAuraDrainPer;
int iValue = static_cast<int>((fValue < 1.0f) ? ceilf(fValue) : truncf(fValue));
m_pOwner->ApplyPoint(ia.bType, bAdd ? iValue : -iValue);
}
else
m_pOwner->ApplyPoint(ia.bType, bAdd ? value : -value);
}
#else
if (ia.bType == APPLY_SKILL)
m_pOwner->ApplyPoint(ia.bType, bAdd ? value : value ^ 0x00800000);
else
m_pOwner->ApplyPoint(ia.bType, bAdd ? value : -value);
#endifEditor is loading...
Leave a Comment