Jump to content

Metin2 | Deathmatch Event


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

This is the hidden content, please
( GitHub )

Spoiler

07213498aac84ffd461949600298cd358165a5.p

 

Hello , this is one of my first systems that i made for my pvp server 1-2 years ago and since then i was using it and it has no problems.

I'm not a system's developer i only made things for my servers and this one i want to share with you.

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 26
  • Cry 1
  • Confused 1
  • Good 9
  • Love 1
  • Love 26
Link to comment
Share on other sites

  • 3 weeks later...

my error - Help Plss: 

 

https://metin2.download/picture/7Bji8L87910svp5dAG2hU0D9rFD1vH5T/.png

 

deathmatch.cpp: In member function 'void CDeathMatchPvP::OnLogin(LPCHARACTER)':
deathmatch.cpp:18:18: error: 'STUN_DEATHMATCH' was not declared in this scope
    ch->AddAffect(STUN_DEATHMATCH, 0, 0, AFF_STUN, 60*60*60*365, 0, 1, 0);
                  ^~~~~~~~~~~~~~~
deathmatch.cpp:25:17: error: 'PK_MODE_DEATHMATCH' was not declared in this scope
   ch->SetPKMode(PK_MODE_DEATHMATCH);
                 ^~~~~~~~~~~~~~~~~~
deathmatch.cpp: In member function 'void FDeleteStun::operator()(LPENTITY)':
deathmatch.cpp:42:24: error: 'STUN_DEATHMATCH' was not declared in this scope
     if (ch->FindAffect(STUN_DEATHMATCH))
                        ^~~~~~~~~~~~~~~
gmake: *** [Makefile:183: .obj/deathmatch.o] Error 1
gmake: *** Waiting for unfinished jobs....

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
Link to comment
Share on other sites

9 hours ago, shaman21 said:

my error - Help Plss: 

 

https://metin2.download/picture/93bkdGZ764jwlWZX1wb5SfHZ0UrzRK8x/.png

 


deathmatch.cpp: In member function 'void CDeathMatchPvP::OnLogin(LPCHARACTER)':
deathmatch.cpp:18:18: error: 'STUN_DEATHMATCH' was not declared in this scope
    ch->AddAffect(STUN_DEATHMATCH, 0, 0, AFF_STUN, 60*60*60*365, 0, 1, 0);
                  ^~~~~~~~~~~~~~~
deathmatch.cpp:25:17: error: 'PK_MODE_DEATHMATCH' was not declared in this scope
   ch->SetPKMode(PK_MODE_DEATHMATCH);
                 ^~~~~~~~~~~~~~~~~~
deathmatch.cpp: In member function 'void FDeleteStun::operator()(LPENTITY)':
deathmatch.cpp:42:24: error: 'STUN_DEATHMATCH' was not declared in this scope
     if (ch->FindAffect(STUN_DEATHMATCH))
                        ^~~~~~~~~~~~~~~
gmake: *** [Makefile:183: .obj/deathmatch.o] Error 1
gmake: *** Waiting for unfinished jobs....

 

I've got this error too :( 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 2 weeks later...
  • 8 months later...
  • Management

 Dead Download Link 

 Moved Topic 

 

If someone has the archive of this topic, can you send it to us? Thank you!

 

Puss In Boots Please GIF by swerk

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • Premium
On 12/8/2020 at 10:48 AM, Aeolus said:

Any help please?

you don't have -DNDEBUG as a CFLAG in the makefile (which is ok for test server btw, also because this bug can make some pointers point to the hyperspace and cause crashes for systems that should work and you wouldn't understand how without that check).

Not only that, a CDeathMatchPvP class is being created, but never initialized on main.cpp, and has no constructor and destructor.

to fix:

 

in main.cpp, in the int main(int argc, char **argv) function, you have to declare the new class, ex:

CHorseNameManager	horsename_manager;
//after
CDeathMatchPvP	death_match_pvp;

//[...]
	OXEvent_manager.Initialize();
//add after:
	death_match_pvp.Initialize();
//[...]
	sys_log(0, "<shutdown> Shutting down ITEM_MANAGER...");
	item_manager.GracefulShutdown();
//add after:
	sys_log(0, "<shutdown> Shutting down DeathMatchPvP...");
	death_match_pvp.Destroy();

deathmatch.cpp:

 

  
#include "stdafx.h"
#include "utils.h"
#include "char.h"
#include "char_manager.h"
#include "affect.h"
#include "sectree_manager.h"
#include "packet.h"
#include "deathmatch.h"
#include "locale_service.h"
#include <fstream>
 
//add after
CDeathMatchPvP::CDeathMatchPvP()
: m_bEmpire(0)
{
}

CDeathMatchPvP::~CDeathMatchPvP()
{
	Destroy();
}

void CDeathMatchPvP::Initialize()
{
	m_map_char.clear(); //idk this shit isn't even used, why is it even declared again as a protected member of the class?
}

void CDeathMatchPvP::Destroy()
{
	m_map_char.clear(); //idk this shit isn't even used, why is it even declared again as a protected member of the class?
  	m_bEmpire = 0;
}

deathmatch.h:

class CDeathMatchPvP : public singleton<CDeathMatchPvP>
{
	private :
		std::map<DWORD, DWORD> m_map_char;
	public :
  //add here
		CDecorumManager();
		virtual ~CDecorumManager();
  		void Initialize();
  		void Destroy();

 

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.