Support for Mystic Tavern globe NPCs.
This commit is contained in:
+7
-4
@@ -106,11 +106,14 @@ public class L2NpcAction implements IActionHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) target;
|
final L2Npc npc = (L2Npc) target;
|
||||||
// Turn NPC to the player.
|
if (!activeChar.isSitting()) // Needed for Mystic Tavern Globe
|
||||||
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
|
|
||||||
if (npc.hasRandomAnimation())
|
|
||||||
{
|
{
|
||||||
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
|
// Open a chat window on client with the text of the L2Npc
|
||||||
if (npc.getVariables().getBoolean("eventmob", false))
|
if (npc.getVariables().getBoolean("eventmob", false))
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ public class L2Npc extends L2Character
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (player.isSitting())
|
else if (player.isSitting() && (getId() != 34200)) // Mystic Tavern Globe requires player sitting
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2844,7 +2844,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (checkCast && isCastingNow())
|
if (checkCast && isCastingNow())
|
||||||
{
|
{
|
||||||
sendMessage("Cannot sit while casting");
|
sendMessage("Cannot sit while casting.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-4
@@ -106,11 +106,14 @@ public class L2NpcAction implements IActionHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) target;
|
final L2Npc npc = (L2Npc) target;
|
||||||
// Turn NPC to the player.
|
if (!activeChar.isSitting()) // Needed for Mystic Tavern Globe
|
||||||
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
|
|
||||||
if (npc.hasRandomAnimation())
|
|
||||||
{
|
{
|
||||||
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
|
// Open a chat window on client with the text of the L2Npc
|
||||||
if (npc.getVariables().getBoolean("eventmob", false))
|
if (npc.getVariables().getBoolean("eventmob", false))
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ public class L2Npc extends L2Character
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (player.isSitting())
|
else if (player.isSitting() && (getId() != 34200)) // Mystic Tavern Globe requires player sitting
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2850,7 +2850,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (checkCast && isCastingNow())
|
if (checkCast && isCastingNow())
|
||||||
{
|
{
|
||||||
sendMessage("Cannot sit while casting");
|
sendMessage("Cannot sit while casting.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-4
@@ -106,11 +106,14 @@ public class L2NpcAction implements IActionHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) target;
|
final L2Npc npc = (L2Npc) target;
|
||||||
// Turn NPC to the player.
|
if (!activeChar.isSitting()) // Needed for Mystic Tavern Globe
|
||||||
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
|
|
||||||
if (npc.hasRandomAnimation())
|
|
||||||
{
|
{
|
||||||
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
|
// Open a chat window on client with the text of the L2Npc
|
||||||
if (npc.getVariables().getBoolean("eventmob", false))
|
if (npc.getVariables().getBoolean("eventmob", false))
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ public class L2Npc extends L2Character
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (player.isSitting())
|
else if (player.isSitting() && (getId() != 34200)) // Mystic Tavern Globe requires player sitting
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2852,7 +2852,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (checkCast && isCastingNow())
|
if (checkCast && isCastingNow())
|
||||||
{
|
{
|
||||||
sendMessage("Cannot sit while casting");
|
sendMessage("Cannot sit while casting.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
-4
@@ -106,11 +106,14 @@ public class L2NpcAction implements IActionHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) target;
|
final L2Npc npc = (L2Npc) target;
|
||||||
// Turn NPC to the player.
|
if (!activeChar.isSitting()) // Needed for Mystic Tavern Globe
|
||||||
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
|
|
||||||
if (npc.hasRandomAnimation())
|
|
||||||
{
|
{
|
||||||
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
|
// Open a chat window on client with the text of the L2Npc
|
||||||
if (npc.getVariables().getBoolean("eventmob", false))
|
if (npc.getVariables().getBoolean("eventmob", false))
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ public class L2Npc extends L2Character
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (player.isSitting())
|
else if (player.isSitting() && (getId() != 34200)) // Mystic Tavern Globe requires player sitting
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2843,7 +2843,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (checkCast && isCastingNow())
|
if (checkCast && isCastingNow())
|
||||||
{
|
{
|
||||||
sendMessage("Cannot sit while casting");
|
sendMessage("Cannot sit while casting.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-4
@@ -106,11 +106,14 @@ public class L2NpcAction implements IActionHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) target;
|
final L2Npc npc = (L2Npc) target;
|
||||||
// Turn NPC to the player.
|
if (!activeChar.isSitting()) // Needed for Mystic Tavern Globe
|
||||||
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
|
|
||||||
if (npc.hasRandomAnimation())
|
|
||||||
{
|
{
|
||||||
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
|
// Open a chat window on client with the text of the L2Npc
|
||||||
if (npc.getVariables().getBoolean("eventmob", false))
|
if (npc.getVariables().getBoolean("eventmob", false))
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ public class L2Npc extends L2Character
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (player.isSitting())
|
else if (player.isSitting() && (getId() != 34200)) // Mystic Tavern Globe requires player sitting
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2843,7 +2843,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (checkCast && isCastingNow())
|
if (checkCast && isCastingNow())
|
||||||
{
|
{
|
||||||
sendMessage("Cannot sit while casting");
|
sendMessage("Cannot sit while casting.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-4
@@ -106,11 +106,14 @@ public class L2NpcAction implements IActionHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) target;
|
final L2Npc npc = (L2Npc) target;
|
||||||
// Turn NPC to the player.
|
if (!activeChar.isSitting()) // Needed for Mystic Tavern Globe
|
||||||
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
|
|
||||||
if (npc.hasRandomAnimation())
|
|
||||||
{
|
{
|
||||||
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
|
// Open a chat window on client with the text of the L2Npc
|
||||||
if (npc.getVariables().getBoolean("eventmob", false))
|
if (npc.getVariables().getBoolean("eventmob", false))
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ public class L2Npc extends L2Character
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (player.isSitting())
|
else if (player.isSitting() && (getId() != 34200)) // Mystic Tavern Globe requires player sitting
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2843,7 +2843,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (checkCast && isCastingNow())
|
if (checkCast && isCastingNow())
|
||||||
{
|
{
|
||||||
sendMessage("Cannot sit while casting");
|
sendMessage("Cannot sit while casting.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
-4
@@ -106,11 +106,14 @@ public class L2NpcAction implements IActionHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) target;
|
final L2Npc npc = (L2Npc) target;
|
||||||
// Turn NPC to the player.
|
if (!activeChar.isSitting()) // Needed for Mystic Tavern Globe
|
||||||
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
|
|
||||||
if (npc.hasRandomAnimation())
|
|
||||||
{
|
{
|
||||||
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
|
// Open a chat window on client with the text of the L2Npc
|
||||||
if (npc.getVariables().getBoolean("eventmob", false))
|
if (npc.getVariables().getBoolean("eventmob", false))
|
||||||
|
|||||||
+1
-1
@@ -2819,7 +2819,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (checkCast && isCastingNow())
|
if (checkCast && isCastingNow())
|
||||||
{
|
{
|
||||||
sendMessage("Cannot sit while casting");
|
sendMessage("Cannot sit while casting.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
-4
@@ -106,11 +106,14 @@ public class L2NpcAction implements IActionHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) target;
|
final L2Npc npc = (L2Npc) target;
|
||||||
// Turn NPC to the player.
|
if (!activeChar.isSitting()) // Needed for Mystic Tavern Globe
|
||||||
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
|
|
||||||
if (npc.hasRandomAnimation())
|
|
||||||
{
|
{
|
||||||
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
|
// Open a chat window on client with the text of the L2Npc
|
||||||
if (npc.getVariables().getBoolean("eventmob", false))
|
if (npc.getVariables().getBoolean("eventmob", false))
|
||||||
|
|||||||
+1
-1
@@ -2820,7 +2820,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (checkCast && isCastingNow())
|
if (checkCast && isCastingNow())
|
||||||
{
|
{
|
||||||
sendMessage("Cannot sit while casting");
|
sendMessage("Cannot sit while casting.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
-4
@@ -106,11 +106,14 @@ public class L2NpcAction implements IActionHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) target;
|
final L2Npc npc = (L2Npc) target;
|
||||||
// Turn NPC to the player.
|
if (!activeChar.isSitting()) // Needed for Mystic Tavern Globe
|
||||||
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
|
|
||||||
if (npc.hasRandomAnimation())
|
|
||||||
{
|
{
|
||||||
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
|
// Open a chat window on client with the text of the L2Npc
|
||||||
if (npc.getVariables().getBoolean("eventmob", false))
|
if (npc.getVariables().getBoolean("eventmob", false))
|
||||||
|
|||||||
+1
-1
@@ -2820,7 +2820,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (checkCast && isCastingNow())
|
if (checkCast && isCastingNow())
|
||||||
{
|
{
|
||||||
sendMessage("Cannot sit while casting");
|
sendMessage("Cannot sit while casting.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
-4
@@ -106,11 +106,14 @@ public class L2NpcAction implements IActionHandler
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) target;
|
final L2Npc npc = (L2Npc) target;
|
||||||
// Turn NPC to the player.
|
if (!activeChar.isSitting()) // Needed for Mystic Tavern Globe
|
||||||
activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
|
|
||||||
if (npc.hasRandomAnimation())
|
|
||||||
{
|
{
|
||||||
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
|
// Open a chat window on client with the text of the L2Npc
|
||||||
if (npc.getVariables().getBoolean("eventmob", false))
|
if (npc.getVariables().getBoolean("eventmob", false))
|
||||||
|
|||||||
+1
-1
@@ -2820,7 +2820,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
if (checkCast && isCastingNow())
|
if (checkCast && isCastingNow())
|
||||||
{
|
{
|
||||||
sendMessage("Cannot sit while casting");
|
sendMessage("Cannot sit while casting.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user