Castle trap animations.

This commit is contained in:
MobiusDev
2016-06-14 18:57:45 +00:00
parent 842ecc6af0
commit f37b8d756a
4 changed files with 40 additions and 59 deletions

View File

@ -59,7 +59,7 @@ public abstract class L2ZoneType extends ListenersContainer
private char _classType;
private InstanceType _target = InstanceType.L2Character; // default all chars
private boolean _allowStore;
private boolean _enabled;
protected boolean _enabled;
private AbstractZoneSettings _settings;
protected L2ZoneType(int id)

View File

@ -22,17 +22,18 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.entity.Castle;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import com.l2jmobius.gameserver.model.zone.ZoneId;
import com.l2jmobius.gameserver.network.serverpackets.OnEventTrigger;
/**
* another type of zone where your speed is changed
* @author kerberos
* @author kerberos, Pandragon
*/
public class L2SwampZone extends L2ZoneType
{
private double _move_bonus;
private int _castleId;
private Castle _castle;
private int _eventId;
public L2SwampZone(int id)
{
@ -44,6 +45,9 @@ public class L2SwampZone extends L2ZoneType
// no castle by default
_castleId = 0;
_castle = null;
// no event by default
_eventId = 0;
}
@Override
@ -57,6 +61,10 @@ public class L2SwampZone extends L2ZoneType
{
_castleId = Integer.parseInt(value);
}
else if (name.equals("eventId"))
{
_eventId = Integer.parseInt(value);
}
else
{
super.setParameter(name, value);
@ -95,6 +103,10 @@ public class L2SwampZone extends L2ZoneType
character.setInsideZone(ZoneId.SWAMP, true);
if (character.isPlayer())
{
if (_eventId > 0)
{
character.sendPacket(new OnEventTrigger(_eventId, true));
}
character.getActingPlayer().broadcastUserInfo();
}
}
@ -108,6 +120,10 @@ public class L2SwampZone extends L2ZoneType
character.setInsideZone(ZoneId.SWAMP, false);
if (character.isPlayer())
{
if (_eventId > 0)
{
character.sendPacket(new OnEventTrigger(_eventId, false));
}
character.getActingPlayer().broadcastUserInfo();
}
}