Sync with L2JServer Jan 28th 2015.
This commit is contained in:
@ -56,10 +56,6 @@ public final class Logout extends L2GameClientPacket
|
||||
|
||||
if ((player.getActiveEnchantItemId() != L2PcInstance.ID_NONE) || (player.getActiveEnchantAttrItemId() != L2PcInstance.ID_NONE))
|
||||
{
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
_log.fine("Player " + player.getName() + " tried to logout while enchanting.");
|
||||
}
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
}
|
||||
@ -86,11 +82,6 @@ public final class Logout extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
_log.fine("Player " + player.getName() + " tried to logout while fighting.");
|
||||
}
|
||||
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_EXIT_THE_GAME_WHILE_IN_COMBAT);
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
return;
|
||||
|
@ -60,12 +60,12 @@ public final class RequestGetItemFromPet extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
final L2PetInstance pet = (L2PetInstance) player.getPet();
|
||||
if (player.getActiveEnchantItemId() != L2PcInstance.ID_NONE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final L2PetInstance pet = (L2PetInstance) player.getPet();
|
||||
final L2ItemInstance item = pet.getInventory().getItemByObjectId(_objectId);
|
||||
if (item == null)
|
||||
{
|
||||
|
@ -18,7 +18,6 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.enums.PartyDistributionType;
|
||||
import com.l2jserver.gameserver.model.BlockList;
|
||||
import com.l2jserver.gameserver.model.L2Party;
|
||||
@ -179,23 +178,12 @@ public final class RequestJoinParty extends L2GameClientPacket
|
||||
// in case a leader change has happened, use party's mode
|
||||
target.sendPacket(new AskJoinParty(requestor.getName(), party.getDistributionType()));
|
||||
party.setPendingInvitation(true);
|
||||
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
_log.fine("sent out a party invitation to:" + target.getName());
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_ON_ANOTHER_TASK_PLEASE_TRY_AGAIN_LATER);
|
||||
sm.addString(target.getName());
|
||||
requestor.sendPacket(sm);
|
||||
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
_log.warning(requestor.getName() + " already received a party invitation");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -218,21 +206,10 @@ public final class RequestJoinParty extends L2GameClientPacket
|
||||
requestor.onTransactionRequest(target);
|
||||
target.sendPacket(new AskJoinParty(requestor.getName(), partyDistributionType));
|
||||
requestor.getParty().setPendingInvitation(true);
|
||||
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
_log.fine("sent out a party invitation to:" + target.getName());
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
requestor.sendPacket(SystemMessageId.WAITING_FOR_ANOTHER_REPLY);
|
||||
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
_log.warning(requestor.getName() + " already received a party invitation");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ public final class SetPrivateStoreListBuy extends L2GameClientPacket
|
||||
boolean canUse = false;
|
||||
for (L2ItemInstance item : player.getInventory().getItemsByItemId(itemId))
|
||||
{
|
||||
if ((enchantLevel == item.getEnchantLevel()) && (attackAttribute == item.getAttackElementType()) && (attackAttributeValue == item.getAttackElementPower()) && (appearanceId == item.getAppearanceId()) && (item.getElementDefAttr((byte) 0) == defenseAttributes[0]) && (item.getElementDefAttr((byte) 1) == defenseAttributes[1]) && (item.getElementDefAttr((byte) 2) == defenseAttributes[2]) && (item.getElementDefAttr((byte) 3) == defenseAttributes[3]) && (item.getElementDefAttr((byte) 4) == defenseAttributes[4]) && (item.getElementDefAttr((byte) 5) == defenseAttributes[5]))
|
||||
if ((enchantLevel == item.getEnchantLevel()) && (attackAttribute == item.getAttackElementType()) && (attackAttributeValue == item.getAttackElementPower()) && (appearanceId == item.getVisualId()) && (item.getElementDefAttr((byte) 0) == defenseAttributes[0]) && (item.getElementDefAttr((byte) 1) == defenseAttributes[1]) && (item.getElementDefAttr((byte) 2) == defenseAttributes[2]) && (item.getElementDefAttr((byte) 3) == defenseAttributes[3]) && (item.getElementDefAttr((byte) 4) == defenseAttributes[4]) && (item.getElementDefAttr((byte) 5) == defenseAttributes[5]))
|
||||
{
|
||||
canUse = true;
|
||||
break;
|
||||
|
@ -60,7 +60,7 @@ public final class RequestExTryToPut_Shape_Shifting_TargetItem extends L2GameCli
|
||||
player.sendPacket(new ExPut_Shape_Shifting_Extraction_Item_Result(0));
|
||||
return;
|
||||
}
|
||||
final boolean isSameType = ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.Armor) && item.isArmor()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.Weapon) && item.isWeapon()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.Accessory) && item.isArmor()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.All));
|
||||
final boolean isSameType = ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.ARMOR) && item.isArmor()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.WEAPON) && item.isWeapon()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.ACCESSORY) && item.isArmor()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.ALL));
|
||||
if (!isSameType)
|
||||
{
|
||||
player.sendPacket(new ExPut_Shape_Shifting_Extraction_Item_Result(0));
|
||||
|
@ -49,7 +49,7 @@ public final class RequestShape_Shifting_Item extends L2GameClientPacket
|
||||
final L2ItemInstance stone = player.getUsingAppearanceStone();
|
||||
final L2ItemInstance item = player.getAppearanceItem();
|
||||
final L2ItemInstance targetItem = player.getTargetAppearanceItem();
|
||||
final boolean needTargetItem = (stone != null) && (stone.getEtcItem().getAppearanceStone() != null) && (stone.getEtcItem().getAppearanceStone().getType().equals(StoneType.Blessed) || stone.getEtcItem().getAppearanceStone().getType().equals(StoneType.Normal)) ? true : false;
|
||||
final boolean needTargetItem = (stone != null) && (stone.getEtcItem().getAppearanceStone() != null) && (stone.getEtcItem().getAppearanceStone().getType().equals(StoneType.BLESSED) || stone.getEtcItem().getAppearanceStone().getType().equals(StoneType.NORMAL)) ? true : false;
|
||||
player.setUsingAppearanceStone(null);
|
||||
player.setAppearanceItem(null);
|
||||
player.setTargetAppearanceItem(null);
|
||||
@ -72,14 +72,14 @@ public final class RequestShape_Shifting_Item extends L2GameClientPacket
|
||||
int time = -1;
|
||||
switch (st.getType())
|
||||
{
|
||||
case Normal:
|
||||
case NORMAL:
|
||||
targetItemId = targetItem.getId();
|
||||
player.destroyItem("AppearanceStone", targetItem, null, true);
|
||||
break;
|
||||
case Blessed:
|
||||
case BLESSED:
|
||||
targetItemId = targetItem.getId();
|
||||
break;
|
||||
case Fixed:
|
||||
case FIXED:
|
||||
targetItemId = st.getTargetItem();
|
||||
time = (int) st.getTimeForAppearance();
|
||||
break;
|
||||
|
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.clientpackets.primeshop;
|
||||
|
||||
import com.l2jserver.gameserver.data.xml.impl.PrimeShopData;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
|
||||
|
||||
/**
|
||||
* @author Gnacik, UnAfraid
|
||||
*/
|
||||
public final class RequestBRBuyProduct extends L2GameClientPacket
|
||||
{
|
||||
private int _brId;
|
||||
private int _count;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_brId = readD();
|
||||
_count = readD();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player != null)
|
||||
{
|
||||
PrimeShopData.getInstance().buyItem(player, _brId, _count);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType()
|
||||
{
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.clientpackets.primeshop;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
|
||||
import com.l2jserver.gameserver.network.serverpackets.primeshop.ExBRGamePoint;
|
||||
|
||||
/**
|
||||
* @author Gnacik, UnAfraid
|
||||
*/
|
||||
public final class RequestBRGamePoint extends L2GameClientPacket
|
||||
{
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
// There is nothing to read.
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
L2PcInstance player = getClient().getActiveChar();
|
||||
if (player != null)
|
||||
{
|
||||
player.sendPacket(new ExBRGamePoint(player));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType()
|
||||
{
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.clientpackets.primeshop;
|
||||
|
||||
import com.l2jserver.gameserver.data.xml.impl.PrimeShopData;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
|
||||
|
||||
/**
|
||||
* @author Gnacik, UnAfraid
|
||||
*/
|
||||
public final class RequestBRProductInfo extends L2GameClientPacket
|
||||
{
|
||||
private int _brId;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_brId = readD();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
L2PcInstance player = getClient().getActiveChar();
|
||||
if (player != null)
|
||||
{
|
||||
PrimeShopData.getInstance().showProductInfo(player, _brId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType()
|
||||
{
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.clientpackets.primeshop;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jserver.gameserver.data.xml.impl.PrimeShopData;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
|
||||
import com.l2jserver.gameserver.network.serverpackets.primeshop.ExBRProductList;
|
||||
|
||||
/**
|
||||
* @author Gnacik, UnAfraid
|
||||
*/
|
||||
public final class RequestBRProductList extends L2GameClientPacket
|
||||
{
|
||||
private int _type;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_type = readD();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player != null)
|
||||
{
|
||||
|
||||
switch (_type)
|
||||
{
|
||||
case 0: // Home page
|
||||
{
|
||||
player.sendPacket(new ExBRProductList(player, 0, PrimeShopData.getInstance().getPrimeItems().values()));
|
||||
break;
|
||||
}
|
||||
case 1: // History
|
||||
{
|
||||
break;
|
||||
}
|
||||
case 2: // Favorites
|
||||
{
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
_log.log(Level.WARNING, player + " send unhandled product list type: " + _type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType()
|
||||
{
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J Server is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.clientpackets.primeshop;
|
||||
|
||||
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
|
||||
|
||||
/**
|
||||
* @author Gnacik, UnAfraid
|
||||
*/
|
||||
public final class RequestBRRecentProductList extends L2GameClientPacket
|
||||
{
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
// Nothing to read
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
// L2PcInstance player = getClient().getActiveChar();
|
||||
// TODO: Implement it.
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType()
|
||||
{
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user