What is L2Playable?

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
ShinichiYao
Advanced User
Advanced User
Posts: 262
Joined: Tue Jan 12, 2016 3:53 am

What is L2Playable?

Post by ShinichiYao »

I'm a little confused. Someone please explain this kind of Type, Mob? NPC? door? Guard? Attackable? moveable?...
User avatar
LasTravel
Posts: 888
Joined: Tue Jan 05, 2010 12:08 am
Location: Spain

Re: What is L2Playable?

Post by LasTravel »

"This class represents all Playable characters in the world" L2PcInstance and L2Summon
User avatar
ShinichiYao
Advanced User
Advanced User
Posts: 262
Joined: Tue Jan 12, 2016 3:53 am

Re: What is L2Playable?

Post by ShinichiYao »

So its anything that can be controlled by player, including also pet and airship?
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7005
Joined: Tue Aug 11, 2009 3:36 am

Re: What is L2Playable?

Post by Zoey76 »

L2Playable is the parent class for L2PcInstance, the player, and L2Summon which is the parent class for L2Pet and L2Servitor.

There shouldn't be any L2Playable class in L2J, and L2Summon class should extend L2Npc, but this is how it was designed several years ago and even when we plan to change it in the future, is not a top priority.

Regards.
Powered by Eclipse 4.30 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.2.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
User avatar
ShinichiYao
Advanced User
Advanced User
Posts: 262
Joined: Tue Jan 12, 2016 3:53 am

Re: What is L2Playable?

Post by ShinichiYao »

Thanks for your explain :clap:

I have some difficulty reading this before, now its clear.

Code: Select all

// Even though there's no path found (remember geonodes aren't perfect),
// the mob is attacking and right now we set it so that the mob will go
// after target anyway, is dz is small enough.
// With cellpathfinding this approach could be changed but would require taking
// off the geonodes and some more checks.
// Summons will follow their masters no matter what.
// Currently minions also must move freely since L2AttackableAI commands them to move along with their leader
if (isPlayer() || (!isPlayable() && !isMinion() && (Math.abs(z - curZ) > 140)) || (isSummon() && !((L2Summon) this).getFollowStatus()))
{
	getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
	return;
}
Post Reply