What is L2Playable?
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- ShinichiYao
- Advanced User
- Posts: 262
- Joined: Tue Jan 12, 2016 3:53 am
What is L2Playable?
I'm a little confused. Someone please explain this kind of Type, Mob? NPC? door? Guard? Attackable? moveable?...
- LasTravel
- Posts: 888
- Joined: Tue Jan 05, 2010 12:08 am
- Location: Spain
Re: What is L2Playable?
"This class represents all Playable characters in the world" L2PcInstance and L2Summon
- ShinichiYao
- Advanced User
- Posts: 262
- Joined: Tue Jan 12, 2016 3:53 am
Re: What is L2Playable?
So its anything that can be controlled by player, including also pet and airship?
- Zoey76
- L2j Inner Circle
- Posts: 7008
- Joined: Tue Aug 11, 2009 3:36 am
Re: What is L2Playable?
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.
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.34
| Eclipse Temurin 21
| MariaDB 11.3.2
| L2J Server 2.6.3.0 - High Five 
Join our Discord! 

- ShinichiYao
- Advanced User
- Posts: 262
- Joined: Tue Jan 12, 2016 3:53 am
Re: What is L2Playable?
Thanks for your explain
I have some difficulty reading this before, now its clear.

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;
}