Sync with L2jServer HighFive Mar 12th 2015.
This commit is contained in:
@ -61,7 +61,7 @@ public final class Beleth extends AbstractNpcAI
|
|||||||
{
|
{
|
||||||
// NPCs
|
// NPCs
|
||||||
private static final int BELETH_ID_1 = 29118;
|
private static final int BELETH_ID_1 = 29118;
|
||||||
private static final int BELETH_ID_2 = 29119;
|
private static final int BELETH_ID_2 = 29119; // Fake Beleth
|
||||||
protected static L2Npc CAMERA;
|
protected static L2Npc CAMERA;
|
||||||
protected static L2Npc CAMERA2;
|
protected static L2Npc CAMERA2;
|
||||||
protected static L2Npc CAMERA3;
|
protected static L2Npc CAMERA3;
|
||||||
@ -119,28 +119,6 @@ public final class Beleth extends AbstractNpcAI
|
|||||||
ThreadPoolManager.getInstance().scheduleGeneral(new Spawn(1), DEBUG ? 10000 : 300000);
|
ThreadPoolManager.getInstance().scheduleGeneral(new Spawn(1), DEBUG ? 10000 : 300000);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class Cast implements Runnable
|
|
||||||
{
|
|
||||||
SkillHolder _skill;
|
|
||||||
L2Npc _npc;
|
|
||||||
|
|
||||||
public Cast(SkillHolder skill, L2Npc npc)
|
|
||||||
{
|
|
||||||
_skill = skill;
|
|
||||||
_npc = npc;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
if ((_npc != null) && !_npc.isDead() && !_npc.isCastingNow())
|
|
||||||
{
|
|
||||||
_npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
|
||||||
_npc.doCast(_skill.getSkill());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class Spawn implements Runnable
|
private static class Spawn implements Runnable
|
||||||
{
|
{
|
||||||
private int _taskId = 0;
|
private int _taskId = 0;
|
||||||
@ -225,7 +203,7 @@ public final class Beleth extends AbstractNpcAI
|
|||||||
int y = (int) ((150 * Math.sin(i * 1.046666667)) + 213059);
|
int y = (int) ((150 * Math.sin(i * 1.046666667)) + 213059);
|
||||||
L2Npc minion = addSpawn(BELETH_ID_2, new Location(x, y, -9357, 49152, BELETH.getInstanceId()));
|
L2Npc minion = addSpawn(BELETH_ID_2, new Location(x, y, -9357, 49152, BELETH.getInstanceId()));
|
||||||
minion.setShowSummonAnimation(true);
|
minion.setShowSummonAnimation(true);
|
||||||
minion.decayMe();
|
minion.deleteMe();
|
||||||
MINIONS.add(minion);
|
MINIONS.add(minion);
|
||||||
}
|
}
|
||||||
ThreadPoolManager.getInstance().scheduleGeneral(new Spawn(12), 6800);
|
ThreadPoolManager.getInstance().scheduleGeneral(new Spawn(12), 6800);
|
||||||
@ -261,9 +239,9 @@ public final class Beleth extends AbstractNpcAI
|
|||||||
break;
|
break;
|
||||||
case 19:
|
case 19:
|
||||||
ZONE.broadcastPacket(new SpecialCamera(CAMERA3, 40, 260, 0, 0, 4000, 0, 0, 1, 0, 0));
|
ZONE.broadcastPacket(new SpecialCamera(CAMERA3, 40, 260, 0, 0, 4000, 0, 0, 1, 0, 0));
|
||||||
for (L2Npc blth : MINIONS)
|
for (L2Npc fakeBeleth : MINIONS)
|
||||||
{
|
{
|
||||||
blth.spawnMe();
|
fakeBeleth.spawnMe();
|
||||||
}
|
}
|
||||||
ThreadPoolManager.getInstance().scheduleGeneral(new Spawn(20), 3000);
|
ThreadPoolManager.getInstance().scheduleGeneral(new Spawn(20), 3000);
|
||||||
break;
|
break;
|
||||||
@ -285,9 +263,9 @@ public final class Beleth extends AbstractNpcAI
|
|||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
BELETH.deleteMe();
|
BELETH.deleteMe();
|
||||||
for (L2Npc bel : MINIONS)
|
for (L2Npc fakeBeleth : MINIONS)
|
||||||
{
|
{
|
||||||
bel.deleteMe();
|
fakeBeleth.deleteMe();
|
||||||
}
|
}
|
||||||
MINIONS.clear();
|
MINIONS.clear();
|
||||||
ThreadPoolManager.getInstance().scheduleGeneral(new Spawn(25), 1000);
|
ThreadPoolManager.getInstance().scheduleGeneral(new Spawn(25), 1000);
|
||||||
@ -376,6 +354,15 @@ public final class Beleth extends AbstractNpcAI
|
|||||||
DoorData.getInstance().getDoor(20240001).openMe();
|
DoorData.getInstance().getDoor(20240001).openMe();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "CAST":
|
||||||
|
{
|
||||||
|
if (!npc.isDead() && !npc.isCastingNow())
|
||||||
|
{
|
||||||
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
|
||||||
|
npc.doCast(FIREBALL.getSkill());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@ -527,7 +514,7 @@ public final class Beleth extends AbstractNpcAI
|
|||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
|
||||||
double speed = npc.isRunning() ? npc.getRunSpeed() : npc.getWalkSpeed();
|
double speed = npc.isRunning() ? npc.getRunSpeed() : npc.getWalkSpeed();
|
||||||
int time = (int) (((distance2 - 890) / speed) * 1000);
|
int time = (int) (((distance2 - 890) / speed) * 1000);
|
||||||
ThreadPoolManager.getInstance().scheduleGeneral(new Cast(FIREBALL, npc), time);
|
startQuestTimer("CAST", time, npc, null);
|
||||||
}
|
}
|
||||||
else if (distance2 < 890)
|
else if (distance2 < 890)
|
||||||
{
|
{
|
||||||
@ -697,28 +684,28 @@ public final class Beleth extends AbstractNpcAI
|
|||||||
xm[i] = (int) ((1700 * Math.cos((i * 1.57) + 0.78)) + 16323);
|
xm[i] = (int) ((1700 * Math.cos((i * 1.57) + 0.78)) + 16323);
|
||||||
ym[i] = (int) ((1700 * Math.sin((i * 1.57) + 0.78)) + 213170);
|
ym[i] = (int) ((1700 * Math.sin((i * 1.57) + 0.78)) + 213170);
|
||||||
npc = addSpawn(BELETH_ID_2, new Location(xm[i], ym[i], -9357, 49152));
|
npc = addSpawn(BELETH_ID_2, new Location(xm[i], ym[i], -9357, 49152));
|
||||||
npc.setIsOverloaded(true);
|
npc.setIsImmobilized(true);
|
||||||
MINIONS.add(npc);
|
MINIONS.add(npc);
|
||||||
}
|
}
|
||||||
xm[4] = (xm[0] + xm[1]) / 2;
|
xm[4] = (xm[0] + xm[1]) / 2;
|
||||||
ym[4] = (ym[0] + ym[1]) / 2;
|
ym[4] = (ym[0] + ym[1]) / 2;
|
||||||
npc = addSpawn(BELETH_ID_2, new Location(xm[4], ym[4], -9357, 49152));
|
npc = addSpawn(BELETH_ID_2, new Location(xm[4], ym[4], -9357, 49152));
|
||||||
npc.setIsOverloaded(true);
|
npc.setIsImmobilized(true);
|
||||||
MINIONS.add(npc);
|
MINIONS.add(npc);
|
||||||
xm[5] = (xm[1] + xm[2]) / 2;
|
xm[5] = (xm[1] + xm[2]) / 2;
|
||||||
ym[5] = (ym[1] + ym[2]) / 2;
|
ym[5] = (ym[1] + ym[2]) / 2;
|
||||||
npc = addSpawn(BELETH_ID_2, new Location(xm[5], ym[5], -9357, 49152));
|
npc = addSpawn(BELETH_ID_2, new Location(xm[5], ym[5], -9357, 49152));
|
||||||
npc.setIsOverloaded(true);
|
npc.setIsImmobilized(true);
|
||||||
MINIONS.add(npc);
|
MINIONS.add(npc);
|
||||||
xm[6] = (xm[2] + xm[3]) / 2;
|
xm[6] = (xm[2] + xm[3]) / 2;
|
||||||
ym[6] = (ym[2] + ym[3]) / 2;
|
ym[6] = (ym[2] + ym[3]) / 2;
|
||||||
npc = addSpawn(BELETH_ID_2, new Location(xm[6], ym[6], -9357, 49152));
|
npc = addSpawn(BELETH_ID_2, new Location(xm[6], ym[6], -9357, 49152));
|
||||||
npc.setIsOverloaded(true);
|
npc.setIsImmobilized(true);
|
||||||
MINIONS.add(npc);
|
MINIONS.add(npc);
|
||||||
xm[7] = (xm[3] + xm[0]) / 2;
|
xm[7] = (xm[3] + xm[0]) / 2;
|
||||||
ym[7] = (ym[3] + ym[0]) / 2;
|
ym[7] = (ym[3] + ym[0]) / 2;
|
||||||
npc = addSpawn(BELETH_ID_2, new Location(xm[7], ym[7], -9357, 49152));
|
npc = addSpawn(BELETH_ID_2, new Location(xm[7], ym[7], -9357, 49152));
|
||||||
npc.setIsOverloaded(true);
|
npc.setIsImmobilized(true);
|
||||||
MINIONS.add(npc);
|
MINIONS.add(npc);
|
||||||
xm[8] = (xm[0] + xm[4]) / 2;
|
xm[8] = (xm[0] + xm[4]) / 2;
|
||||||
ym[8] = (ym[0] + ym[4]) / 2;
|
ym[8] = (ym[0] + ym[4]) / 2;
|
||||||
|
@ -1513,7 +1513,7 @@
|
|||||||
<set name="material" val="STEEL" />
|
<set name="material" val="STEEL" />
|
||||||
<set name="weight" val="1580" />
|
<set name="weight" val="1580" />
|
||||||
<set name="price" val="143356000" />
|
<set name="price" val="143356000" />
|
||||||
<set name="change_weaponId" val="16043" />
|
<set name="change_weaponId" val="16052" />
|
||||||
<set name="soulshots" val="1" />
|
<set name="soulshots" val="1" />
|
||||||
<set name="spiritshots" val="1" />
|
<set name="spiritshots" val="1" />
|
||||||
<set name="element_enabled" val="true" />
|
<set name="element_enabled" val="true" />
|
||||||
@ -1547,7 +1547,7 @@
|
|||||||
<set name="material" val="STEEL" />
|
<set name="material" val="STEEL" />
|
||||||
<set name="weight" val="1800" />
|
<set name="weight" val="1800" />
|
||||||
<set name="price" val="143356000" />
|
<set name="price" val="143356000" />
|
||||||
<set name="change_weaponId" val="16052" />
|
<set name="change_weaponId" val="16043" />
|
||||||
<set name="soulshots" val="1" />
|
<set name="soulshots" val="1" />
|
||||||
<set name="spiritshots" val="1" />
|
<set name="spiritshots" val="1" />
|
||||||
<set name="element_enabled" val="true" />
|
<set name="element_enabled" val="true" />
|
||||||
|
@ -792,7 +792,7 @@
|
|||||||
<set name="operateType" val="ACTIVE_INSTANT" />
|
<set name="operateType" val="ACTIVE_INSTANT" />
|
||||||
<set name="reuseDelay" val="5000" />
|
<set name="reuseDelay" val="5000" />
|
||||||
<set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
|
<set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
|
||||||
<set name="targetType" val="ONE" />
|
<set name="targetType" val="AURA" />
|
||||||
<set name="trait" val="DERANGEMENT" />
|
<set name="trait" val="DERANGEMENT" />
|
||||||
<enchant1 name="magicLvl" val="#enchMagicLvl" />
|
<enchant1 name="magicLvl" val="#enchMagicLvl" />
|
||||||
<enchant1 name="power" val="#ench1Power" />
|
<enchant1 name="power" val="#ench1Power" />
|
||||||
|
@ -621,7 +621,7 @@ public interface IXmlReader
|
|||||||
* Simple XML error handler.
|
* Simple XML error handler.
|
||||||
* @author Zoey76
|
* @author Zoey76
|
||||||
*/
|
*/
|
||||||
class XMLErrorHandler implements ErrorHandler
|
static class XMLErrorHandler implements ErrorHandler
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void warning(SAXParseException e) throws SAXParseException
|
public void warning(SAXParseException e) throws SAXParseException
|
||||||
|
@ -2535,10 +2535,6 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
|
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
|
|
||||||
if (isPlayer() && (getActingPlayer().getAgathionId() != 0))
|
|
||||||
{
|
|
||||||
getActingPlayer().setAgathionId(0);
|
|
||||||
}
|
|
||||||
calculateRewards(killer);
|
calculateRewards(killer);
|
||||||
|
|
||||||
// Send the Server->Client packet StatusUpdate with current HP and MP to all other L2PcInstance to inform
|
// Send the Server->Client packet StatusUpdate with current HP and MP to all other L2PcInstance to inform
|
||||||
|
@ -410,7 +410,7 @@ public abstract class AbstractOlympiadGame
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
player.setIsPendingRevive(false);
|
||||||
player.setInstanceId(0);
|
player.setInstanceId(0);
|
||||||
player.teleToLocation(loc);
|
player.teleToLocation(loc);
|
||||||
player.unsetLastLocation();
|
player.unsetLastLocation();
|
||||||
|
@ -53,8 +53,8 @@ public class ExOlympiadSpelledInfo extends L2GameServerPacket
|
|||||||
{
|
{
|
||||||
if ((info != null) && info.isInUse())
|
if ((info != null) && info.isInUse())
|
||||||
{
|
{
|
||||||
writeD(info.getSkill().getId());
|
writeD(info.getSkill().getDisplayId());
|
||||||
writeH(info.getSkill().getLevel());
|
writeH(info.getSkill().getDisplayLevel());
|
||||||
writeD(0x00);
|
writeD(0x00);
|
||||||
writeH(info.getTime());
|
writeH(info.getTime());
|
||||||
}
|
}
|
||||||
|
@ -50,8 +50,8 @@ public class PartySpelled extends L2GameServerPacket
|
|||||||
{
|
{
|
||||||
if ((info != null) && info.isInUse())
|
if ((info != null) && info.isInUse())
|
||||||
{
|
{
|
||||||
writeD(info.getSkill().getId());
|
writeD(info.getSkill().getDisplayId());
|
||||||
writeH(info.getSkill().getLevel());
|
writeH(info.getSkill().getDisplayLevel());
|
||||||
writeD(0x00);
|
writeD(0x00);
|
||||||
writeH(info.getTime());
|
writeH(info.getTime());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user