Support for Mystic Tavern globe NPCs.

This commit is contained in:
MobiusDev
2019-02-07 03:33:28 +00:00
parent c29ff56305
commit fefe92b121
26 changed files with 86 additions and 56 deletions

View File

@@ -106,11 +106,14 @@ public class L2NpcAction implements IActionHandler
else
{
final L2Npc npc = (L2Npc) target;
// Turn NPC to the player.
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
if (npc.hasRandomAnimation())
if (!activeChar.isSitting()) // Needed for Mystic Tavern Globe
{
npc.onRandomAnimation(Rnd.get(8));
// Turn NPC to the player.
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
if (npc.hasRandomAnimation())
{
npc.onRandomAnimation(Rnd.get(8));
}
}
// Open a chat window on client with the text of the L2Npc
if (npc.getVariables().getBoolean("eventmob", false))

View File

@@ -505,7 +505,7 @@ public class L2Npc extends L2Character
{
return false;
}
else if (player.isSitting())
else if (player.isSitting() && (getId() != 34200)) // Mystic Tavern Globe requires player sitting
{
return false;
}

View File

@@ -2850,7 +2850,7 @@ public final class L2PcInstance extends L2Playable
{
if (checkCast && isCastingNow())
{
sendMessage("Cannot sit while casting");
sendMessage("Cannot sit while casting.");
return;
}