Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×

Official Graphic On Off [REVERSED]


Recommended Posts

  • Honorable Member
2 minutes ago, ‚Point‘ said:

Thanks for the release, appreciate a lot!

Everything is working like a charm, execpt the Pet Show/Hide.

Any ideas on it?

https://metin2.download/picture/p1o80Gi6QMHR8dIjQh4Um7kGOlC33Ydm/.gif

Best Regards

.png

There is a special type for pets in the official proto, but we don't have them.

You can use this with a control function like IsPet or sth like that

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

  • Premium
1 hour ago, Mali said:

.png

There is a special type for pets in the official proto, but we don't have them.

You can use this with a control function like IsPet or sth like that

Thanks for your reply. To be honest i don't really know how to do this.
Could you give me an example please i you have time?
 

Best Regards

Link to comment
Share on other sites

  • Honorable Member
9 hours ago, ‚Point‘ said:

Thanks for your reply. To be honest i don't really know how to do this.
Could you give me an example please i you have time?
 

Best Regards

ActorInstance.h:

Spoiler
//Find
		bool IsPoly();

///Add
		bool IsPet() const;

 

ActorInstance.cpp:

Spoiler
//Find
bool CActorInstance::IsPoly()
{
	...
}

///Add
bool CActorInstance::IsPet() const
{
	//for 2014 default proto
	
	if (TYPE_NPC != m_eActorType)
		return false;

	switch (m_eRace)
	{
	case 34005:
	case 34006:
		return true;
	default:
		return false;
	}
}

//Find
	/*if (GetActorType() == EType::TYPE_PET || GetActorType() == EType::TYPE_PET_PAY)
		m_bRenderActor = CPythonGraphicOnOff::Instance().CanRenderPet();*/

///Change
	if (IsPet())
		m_bRenderActor = CPythonGraphicOnOff::Instance().CanRenderPet();

 

you add the vnum of the pets to the function

  • Love 1
Link to comment
Share on other sites

  • Premium
1 hour ago, Mali said:

ActorInstance.h:

  Hide contents
//Find
		bool IsPoly();

///Add
		bool IsPet() const;

 

ActorInstance.cpp:

  Hide contents
//Find
bool CActorInstance::IsPoly()
{
	...
}

///Add
bool CActorInstance::IsPet() const
{
	//for 2014 default proto
	
	if (TYPE_NPC != m_eActorType)
		return false;

	switch (m_eRace)
	{
	case 34005:
	case 34006:
		return true;
	default:
		return false;
	}
}

//Find
	/*if (GetActorType() == EType::TYPE_PET || GetActorType() == EType::TYPE_PET_PAY)
		m_bRenderActor = CPythonGraphicOnOff::Instance().CanRenderPet();*/

///Change
	if (IsPet())
		m_bRenderActor = CPythonGraphicOnOff::Instance().CanRenderPet();

 

you add the vnum of the pets to the function

Works perfect! Thanks a lot

Best Regards

  • Metin2 Dev 1
Link to comment
Share on other sites

Hello, Mali!

Sorry for off-topic, but I couldn't reach you anywhere 🙂

Why did you removed your repositories on GitHub? Is everything OK?

I'm curious because I had some links to your repos, for me to further implement on my project.

 

Again sorry for off-topic! If you want to contact me and talk, my Discord is: Toni#2548

Link to comment
Share on other sites

  • Honorable Member
13 minutes ago, duwen123 said:

Hello, Mali!

Hi

13 minutes ago, duwen123 said:

Why did you removed your repositories on GitHub? Is everything OK?

Yes, everything is OK. Thanks for asking.

I made such a decision, I had some reasons.

13 minutes ago, duwen123 said:

I'm curious because I had some links to your repos, for me to further implement on my project.

All my projects are in this forum and forum has my repos's backups:

Spoiler

 

 

My topics

 

Link to comment
Share on other sites



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