Форум администраторов игровых серверов

Форум администраторов игровых серверов (https://forum.zone-game.info/TT.php)
-   Lineage II (https://forum.zone-game.info/forumdisplay.php?f=34)
-   -   L2Emu-RT rev.508 Правка исходников. Изменение стоимости отмены Augmentation. (https://forum.zone-game.info/showthread.php?t=4609)

Aristocrat 09.09.2009 12:15

L2Emu-RT rev.508 Правка исходников. Изменение стоимости отмены Augmentation.
 
Здравствуйте уважаемые форумчане.

Подскажите пожалуйста, где можно изменить стоимость отмены Augmentation в сборке L2Emu-RT rev.508
Поправил файл:
L2EmuProject-Game\src\main\java\net\l2emuproject\gameserver\net work\clientpackets\RequestConfirmCancelItem.java

[SPOILER]
Код:

/*
 * This program 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.
 *
 * This program 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 net.l2emuproject.gameserver.network.clientpackets;

import net.l2emuproject.gameserver.model.L2ItemInstance;
import net.l2emuproject.gameserver.model.actor.instance.L2PcInstance;
import net.l2emuproject.gameserver.network.SystemMessageId;
import net.l2emuproject.gameserver.network.serverpackets.ExPutItemResultForVariationCancel;
import net.l2emuproject.gameserver.templates.item.L2Item;

/**
 * Format(ch) d
 * @author  -Wooden-
 */
public final class RequestConfirmCancelItem extends L2GameClientPacket
{
        private static final String        _C__D0_2D_REQUESTCONFIRMCANCELITEM        = "[C] D0:2D RequestConfirmCancelItem";

        private int                                        _itemId;

        /**
        * @param buf
        * @param client
        */
        @Override
        protected void readImpl()
        {
                _itemId = readD();
        }

        /**
        * @see net.l2emuproject.gameserver.network.clientpackets.ClientBasePacket#runImpl()
        */
        @Override
        protected void runImpl()
        {
                L2PcInstance activeChar = getClient().getActiveChar();
                if (activeChar == null)
                        return;

                L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_itemId);

                if (item == null)
                        return;

                if (!item.isAugmented())
                {
                        activeChar.sendPacket(SystemMessageId.AUGMENTATION_REMOVAL_CAN_ONLY_BE_DONE_ON_AN_AUGMENTED_ITEM);
                        return;
                }

                int price = 0;
                switch (item.getItem().getItemGrade())
                {
                case L2Item.CRYSTAL_C:
                        if (item.getCrystalCount() < 1720)
                                price = 1;
                        else if (item.getCrystalCount() < 2452)
                                price = 1;
                        else
                                price = 1;
                        break;
                case L2Item.CRYSTAL_B:
                        if (item.getCrystalCount() < 1746)
                                price = 3;
                        else
                                price = 3;
                        break;
                case L2Item.CRYSTAL_A:
                        if (item.getCrystalCount() < 2160)
                                price = 5;
                        else if (item.getCrystalCount() < 2824)
                                price = 5;
                        else
                                price = 5;
                        break;
                case L2Item.CRYSTAL_S:
                        price = 7;
                        break;
                case L2Item.CRYSTAL_S80:
                        price = 10;
                        break;
                // any other item type is not augmentable
                default:
                        return;
                }

                activeChar.sendPacket(new ExPutItemResultForVariationCancel(_itemId, price));
        }

        /**
        * @see net.l2emuproject.gameserver.BasePacket#getType()
        */
        @Override
        public String getType()
        {
                return _C__D0_2D_REQUESTCONFIRMCANCELITEM;
        }
}

[/SPOILER]
При обращении к кузнецу с, например, S80 оружием, он пишет стоимость отмены в 7 аден, но при этом, забирает 480 000 аден. Как можно сделать, чтобы стоимость услуги отмены была изменена не только де-юре, но и де-факто?) Где можно еще посмотреть?

Заранее спасибо.

ZaiMen 23.10.2009 18:06

Re: L2Emu-RT rev.508 Правка исходников. Изменение стоимости отмены Augmentation.
 
Цитата:

Сообщение от Aristocrat (Сообщение 40595)
Здравствуйте уважаемые форумчане.

Подскажите пожалуйста, где можно изменить стоимость отмены Augmentation в сборке L2Emu-RT rev.508
Поправил файл:
L2EmuProject-Game\src\main\java\net\l2emuproject\gameserver\net work\clientpackets\RequestConfirmCancelItem.java

[SPOILER]
Код:

/*
 * This program 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.
 *
 * This program 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 net.l2emuproject.gameserver.network.clientpackets;

import net.l2emuproject.gameserver.model.L2ItemInstance;
import net.l2emuproject.gameserver.model.actor.instance.L2PcInstance;
import net.l2emuproject.gameserver.network.SystemMessageId;
import net.l2emuproject.gameserver.network.serverpackets.ExPutItemResultForVariationCancel;
import net.l2emuproject.gameserver.templates.item.L2Item;

/**
 * Format(ch) d
 * @author  -Wooden-
 */
public final class RequestConfirmCancelItem extends L2GameClientPacket
{
        private static final String        _C__D0_2D_REQUESTCONFIRMCANCELITEM        = "[C] D0:2D RequestConfirmCancelItem";

        private int                                        _itemId;

        /**
        * @param buf
        * @param client
        */
        @Override
        protected void readImpl()
        {
                _itemId = readD();
        }

        /**
        * @see net.l2emuproject.gameserver.network.clientpackets.ClientBasePacket#runImpl()
        */
        @Override
        protected void runImpl()
        {
                L2PcInstance activeChar = getClient().getActiveChar();
                if (activeChar == null)
                        return;

                L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_itemId);

                if (item == null)
                        return;

                if (!item.isAugmented())
                {
                        activeChar.sendPacket(SystemMessageId.AUGMENTATION_REMOVAL_CAN_ONLY_BE_DONE_ON_AN_AUGMENTED_ITEM);
                        return;
                }

                int price = 0;
                switch (item.getItem().getItemGrade())
                {
                case L2Item.CRYSTAL_C:
                        if (item.getCrystalCount() < 1720)
                                price = 1;
                        else if (item.getCrystalCount() < 2452)
                                price = 1;
                        else
                                price = 1;
                        break;
                case L2Item.CRYSTAL_B:
                        if (item.getCrystalCount() < 1746)
                                price = 3;
                        else
                                price = 3;
                        break;
                case L2Item.CRYSTAL_A:
                        if (item.getCrystalCount() < 2160)
                                price = 5;
                        else if (item.getCrystalCount() < 2824)
                                price = 5;
                        else
                                price = 5;
                        break;
                case L2Item.CRYSTAL_S:
                        price = 7;
                        break;
                case L2Item.CRYSTAL_S80:
                        price = 10;
                        break;
                // any other item type is not augmentable
                default:
                        return;
                }

                activeChar.sendPacket(new ExPutItemResultForVariationCancel(_itemId, price));
        }

        /**
        * @see net.l2emuproject.gameserver.BasePacket#getType()
        */
        @Override
        public String getType()
        {
                return _C__D0_2D_REQUESTCONFIRMCANCELITEM;
        }
}

[/SPOILER]
При обращении к кузнецу с, например, S80 оружием, он пишет стоимость отмены в 7 аден, но при этом, забирает 480 000 аден. Как можно сделать, чтобы стоимость услуги отмены была изменена не только де-юре, но и де-факто?) Где можно еще посмотреть?

Заранее спасибо.

В настройках посмотри там всяко есть


Текущее время: 04:51. Часовой пояс GMT +3.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot