Automating Fishing.
This commit is contained in:
@ -20,6 +20,7 @@ package com.l2jserver.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
@ -41,11 +42,19 @@ public class RequestExAutoFish extends L2GameClientPacket
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance activeChar = getActiveChar();
|
||||
if ((activeChar == null) || activeChar.isFishing())
|
||||
if (activeChar == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
activeChar.useMagic(FISHING_SKILL.getSkill(), false, true);
|
||||
if (activeChar.isFishing())
|
||||
{
|
||||
activeChar.endFishing(true, false);// TODO: Correct Animation
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.YOU_CAST_YOUR_LINE_AND_START_TO_FISH);
|
||||
activeChar.useMagic(FISHING_SKILL.getSkill(), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -22,14 +22,14 @@ import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* @author -Wooden-
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExFishingEnd extends L2GameServerPacket
|
||||
{
|
||||
private final boolean _win;
|
||||
private final int _win;
|
||||
private final L2Character _activeChar;
|
||||
|
||||
public ExFishingEnd(boolean win, L2PcInstance character)
|
||||
public ExFishingEnd(int win, L2PcInstance character)
|
||||
{
|
||||
_win = win;
|
||||
_activeChar = character;
|
||||
@ -41,6 +41,6 @@ public class ExFishingEnd extends L2GameServerPacket
|
||||
writeC(0xFE);
|
||||
writeH(0x1F);
|
||||
writeD(_activeChar.getObjectId());
|
||||
writeC(_win ? 1 : 0);
|
||||
writeC(_win); // lose 0 - win 1 - quit 2
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user