Warehouse troubles

byEvanthe

Интересующийся
Участник
Сообщения
119
Розыгрыши
0
Решения
1
Репутация
0
Реакции
9
Баллы
380
Хроники
  1. Chaotic Throne: High Five
Исходники
Присутствуют
Сборка
L2jSunrise
Hello, I have problems with warehouse. As admin, i can deposit/withdraw. But as a player, i can deposit, but i can't withdraw. What can be the problem? Bellow i attach will the code which i have :
P.S. Platform High Five! Thank you!
JavaScript:
 private void actionDepositClan(L2PcInstance player)
    {
        if (player.getClan() == null)
        {
            player.sendPacket(SystemMessageId.YOU_ARE_NOT_A_CLAN_MEMBER);
            return;
        }
        player.sendPacket(ActionFailed.STATIC_PACKET);
        player.setActiveWarehouse(player.getClan().getWarehouse());

        if (player.getClan().getLevel() == 0)
        {
            player.sendPacket(SystemMessageId.ONLY_LEVEL_1_CLAN_OR_HIGHER_CAN_USE_WAREHOUSE);
            return;
        }
        player.setIsUsingAioWh(true);
        player.setActiveWarehouse(player.getClan().getWarehouse());
        player.tempInventoryDisable();
        player.sendPacket(new WareHouseDepositList(player, WareHouseDepositList.CLAN));
    }

    private void actionDepositPrivate(L2PcInstance player)
    {
        player.sendPacket(ActionFailed.STATIC_PACKET);
        player.setActiveWarehouse(player.getWarehouse());
        if (player.getWarehouse().getSize() == player.getWareHouseLimit())
        {
            player.sendPacket(SystemMessageId.WAREHOUSE_FULL);
            return;
        }
        player.setIsUsingAioWh(true);
        player.tempInventoryDisable();
        player.sendPacket(new WareHouseDepositList(player, WareHouseDepositList.PRIVATE));
        showWarehousePage(player);
    }

    private void actionWithdrawPrivate(L2PcInstance player)
    {
        showPWithdrawWindow(player, SortedWareHouseWithdrawalList.WarehouseListType.ALL, SortedWareHouseWithdrawalList.A2Z);
        return;
    }

    private void actionWithdrawClan(L2PcInstance player)
    {
        showCWithdrawWindow(player, SortedWareHouseWithdrawalList.WarehouseListType.ALL, SortedWareHouseWithdrawalList.A2Z);
        return;
    }

    private static final void showCWithdrawWindow(L2PcInstance player, SortedWareHouseWithdrawalList.WarehouseListType itemtype, byte sortorder)
    {
        player.sendPacket(ActionFailed.STATIC_PACKET);

        if (!player.hasClanPrivilege(ClanPrivilege.CL_VIEW_WAREHOUSE))
        {
            player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_THE_RIGHT_TO_USE_CLAN_WAREHOUSE);
            return;
        }

        player.setActiveWarehouse(player.getClan().getWarehouse());

        if (player.getActiveWarehouse().getSize() == 0)
        {
            player.sendPacket(SystemMessageId.NO_ITEM_DEPOSITED_IN_WH);
            return;
        }

        if (itemtype != null)
        {
            player.sendPacket(new SortedWareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN, itemtype, sortorder));
        }
        else
        {
            player.sendPacket(new WareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN));
        }

        if (Config.DEBUG)
        {
            _log.info("Source: L2WarehouseInstance.java; Player: " + player.getName() + "; Command: showRetrieveWindowClan; Message: Showing stored items.");
        }
    }

    private static final void showPWithdrawWindow(L2PcInstance player, SortedWareHouseWithdrawalList.WarehouseListType itemtype, byte sortorder)
    {
        player.sendPacket(ActionFailed.STATIC_PACKET);
        player.setActiveWarehouse(player.getWarehouse());

        if (player.getActiveWarehouse().getSize() == 0)
        {
            player.sendPacket(SystemMessageId.NO_ITEM_DEPOSITED_IN_WH);
            return;
        }

        if (itemtype != null)
        {
            player.sendPacket(new SortedWareHouseWithdrawalList(player, WareHouseWithdrawalList.PRIVATE, itemtype, sortorder));
        }
        else
        {
            player.sendPacket(new WareHouseWithdrawalList(player, WareHouseWithdrawalList.PRIVATE));
        }

        if (Config.DEBUG)
        {
            _log.info("Source: L2WarehouseInstance.java; Player: " + player.getName() + "; Command: showRetrieveWindow; Message: Showing stored items.");
        }
        return;
    }
 
clan warehouse? check clan privilegies for player
Java:
        if (!player.hasClanPrivilege(ClanPrivilege.CL_VIEW_WAREHOUSE))
        {
            player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_THE_RIGHT_TO_USE_CLAN_WAREHOUSE);
            return;
        }
 
As admin Private/Clan Deposit/Withdraw, work
As player Private/Clan Deposit work, Withdraw, no
 
Назад
Сверху