Jump to content

Recommended Posts

  • Bot

Hello,

Today I will present you two new features for affect.

  • Real time affects: Long time ago a client of mine wanted some of his affects to be real time. As you may know the affects in metin2 are consumed only if you are online (except premium, but that is another story). The easier way to achieve this was to create a new variable inside the affect called bIsRealTime, set it to 1 and store the duration as unix time instead of seconds.
    You can use this new functionality by adding True at the end of the AddAffect function call and everything will work automaticaly. 
     
  • Update affect: In a version some time ago the official servers added this new functionality to only update an affect. This is used for the Summer Event Roulette minigame to update the collected souls count in real time in client. I didn't create a easy way to use this because it depends on what you update for the affect. Here is an example of how I used it on this event to update lApplyValue:
    			CAffect * pAffect = pkChar->FindAffect(AFFECT_LATE_SUMMER_EVENT_BUFF);
    
    			if(pAffect)
    			{
    				pAffect->lApplyValue += 1;
    				pAffect->bIsUpdate = true;
    	
    				// Update the client
    				SendAffectAddPacket(pkChar->GetDesc(), pAffect);
    			}

 


Download link: 

This is the hidden content, please

 

Edited by Abel(Tiger)
  • Metin2 Dev 63
  • Good 10
  • Love 5
  • Love 18

english_banner.gif

Link to comment
https://metin2.dev/topic/31192-affect-addons/
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.