Jump to content

Recommended Posts

char_battle.cpp:
bool CHARACTER::Attack(LPCHARACTER pkVictim, BYTE bType)

    if (pkVictim->GetShopOwner())
        return false;

I added this code to prevent hitting private shops.But it doenst work.I can still hit and kill players shops .What is wrong ?

Link to comment
https://metin2.dev/topic/7822-prevent-hitting-private-shops/
Share on other sites

GetShopOwner() will return the owner of the current shop opened.

Use this:

if (pkVictim->GetMyShop())
    return false;

 

Thank you very much Cataclismo :) It really worked.I wish I know C++. It is hard to learn for beginners :(

if (pkVictim->GetMyShop())
    return false;

This code worked but some weird thing happened.It prevents straight hits but doesnt prevent some skills like: warriors dash and sura's remove magic

What can be the problem ? Thanks.

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.