Jump to content

Recommended Posts

  • Active+ Member

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 43
  • Good 7
  • Love 4
  • Love 4
Link to comment
Share on other sites

Announcements



×
×
  • 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.