Jump to content

Recommended Posts

  • Active+ Member
// Search
bool g_isEmpireNameMode=false;

// Add under
static DWORD gs_dwDamagePrefixCriticalCRC = 0;
static DWORD gs_dwDamagePrefixPenetrationCRC = 0;
static DWORD gs_dwDamagePrefixMixCRC = 0;


// Search
    DWORD index = 0;
    DWORD num = 0;
// Add under
    const DWORD originalDamage = damage;


// Search func
void CInstanceBase::ProcessDamage()

// Add at the end of the function
    const bool isCritical = (flag & DAMAGE_CRITICAL) != 0;
    const bool isPenetrate = (flag & DAMAGE_PENETRATE) != 0;
    if (isCritical || isPenetrate)
    {
        DWORD* pdwPrefixCRC = NULL;
        const char* c_szPrefixEffectPath = NULL;
        if (isCritical && isPenetrate)
        {
            pdwPrefixCRC = &gs_dwDamagePrefixMixCRC;
            c_szPrefixEffectPath = "d:/ymir work/effect/affect/damage_mix.mse";
        }
        else if (isCritical)
        {
            pdwPrefixCRC = &gs_dwDamagePrefixCriticalCRC;
            c_szPrefixEffectPath = "d:/ymir work/effect/affect/damage_critical.mse";
        }
        else
        {
            pdwPrefixCRC = &gs_dwDamagePrefixPenetrationCRC;
            c_szPrefixEffectPath = "d:/ymir work/effect/affect/damage_penetration.mse";
        }
        if (pdwPrefixCRC && *pdwPrefixCRC == 0)
        {
            if (!rkEftMgr.RegisterEffect2(c_szPrefixEffectPath, pdwPrefixCRC, true))
                TraceError("CInstanceBase::ProcessDamage - RegisterEffect2 failed (%s)", c_szPrefixEffectPath);
        }
        if (pdwPrefixCRC && *pdwPrefixCRC)
        {
            DWORD digitCount = 0;
            DWORD tempDamage = originalDamage;
            constexpr float fPrefixPadding = 18.0f;
            while (tempDamage > 0)
            {
                ++digitCount;
                tempDamage /= 10;
            }
            D3DXMATRIX matrix, matTrans;
            D3DXMatrixIdentity(&matrix);
            matrix._41 = v3Pos.x;
            matrix._42 = v3Pos.y;
            matrix._43 = v3Pos.z;
            D3DXMatrixTranslation(&matrix, v3Pos.x, v3Pos.y, v3Pos.z);
            D3DXMatrixMultiply(&matrix, &pCamera->GetInverseViewMatrix(), &matrix);
            D3DXMatrixTranslation(&matTrans, (FONT_WIDTH * digitCount) + fPrefixPadding, 0, 0);
            matTrans._41 = -matTrans._41;
            matrix = matTrans * matrix;
            D3DXMatrixMultiply(&matrix, &pCamera->GetViewMatrix(), &matrix);
            rkEftMgr.CreateEffect(*pdwPrefixCRC, D3DXVECTOR3(matrix._41, matrix._42, matrix._43), v3Rot);
        }
    }
Spoiler

.png


.png


.png

 

This is the hidden content, please

 

 

  • Metin2 Dev 18
  • Eyes 1
  • Good 3
  • muscle 1
  • Love 2
  • Love 12
Link to comment
https://metin2.dev/topic/34480-official-damage-info/
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.