Jump to content

Recommended Posts

  • Premium

Hello,

 

I Have installed and tried to add a feature to the Element image on target system

(https://metin2.dev/topic/17159-v175-element-image-on-target/).

I wanted to have something like official : multiple element images on target displayed at the same time

if the character targeted have different element bonus.

So (A)I have come up with this for the char.cpp part :

 

Spoiler
#ifdef ENABLE_ELEMENT_TARGET
    p.dwElement = 0;
    if (m_pkChrTarget)
    {
        if (m_pkChrTarget->IsPC())
        {
            if (m_pkChrTarget->GetPoint(POINT_ENCHANT_FIRE) > 0)
                p.dwElement |= RACE_FLAG_ATT_FIRE;
            if (m_pkChrTarget->GetPoint(POINT_ENCHANT_ICE) > 0)
                p.dwElement |= RACE_FLAG_ATT_ICE;
            if (m_pkChrTarget->GetPoint(POINT_ENCHANT_WIND) > 0)
                p.dwElement |= RACE_FLAG_ATT_WIND;
            if (m_pkChrTarget->GetPoint(POINT_ENCHANT_EARTH) > 0)
                p.dwElement |= RACE_FLAG_ATT_EARTH;
            if (m_pkChrTarget->GetPoint(POINT_ENCHANT_DARK) > 0)
                p.dwElement |= RACE_FLAG_ATT_DARK;
            if (m_pkChrTarget->GetPoint(POINT_ENCHANT_ELECT) > 0)
                p.dwElement |= RACE_FLAG_ATT_ELEC;
        }
    }
#endif

 

 

After adapting the python part the system works as intended but I wanted to have an opinion regarding this.

is this a bad way ? I don't see " |= " being used that much around other files.

 

Thanks for any replies,

 

Best regards ARiver.

Link to comment
https://metin2.dev/topic/33889-multiples-elemental-images-on-target/
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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.