- r101 fixed error for friend memo (SQL).
- Fixed Awakening social action. - Implemented configs for awakening to skip or not Seize of Destiny quest and Scroll of Afterlife item. - Fixed mentee getting 2 letters with 2 headphones and fixed skill error, when adding mentee. - Implemented Change Attribute stone engine.
This commit is contained in:
@ -161,6 +161,7 @@ import handlers.itemhandlers.BlessedSpiritShot;
|
||||
import handlers.itemhandlers.Book;
|
||||
import handlers.itemhandlers.Bypass;
|
||||
import handlers.itemhandlers.Calculator;
|
||||
import handlers.itemhandlers.ChangeAttribute;
|
||||
import handlers.itemhandlers.CharmOfCourage;
|
||||
import handlers.itemhandlers.Elixir;
|
||||
import handlers.itemhandlers.EnchantAttribute;
|
||||
@ -464,6 +465,7 @@ public class MasterHandler
|
||||
Book.class,
|
||||
Bypass.class,
|
||||
Calculator.class,
|
||||
ChangeAttribute.class,
|
||||
CharmOfCourage.class,
|
||||
Elixir.class,
|
||||
EnchantAttribute.class,
|
||||
|
55
trunk/dist/game/data/scripts/handlers/itemhandlers/ChangeAttribute.java
vendored
Normal file
55
trunk/dist/game/data/scripts/handlers/itemhandlers/ChangeAttribute.java
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* 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 handlers.itemhandlers;
|
||||
|
||||
import com.l2jserver.gameserver.handler.IItemHandler;
|
||||
import com.l2jserver.gameserver.model.actor.L2Playable;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExChangeAttributeItemList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
*/
|
||||
public class ChangeAttribute implements IItemHandler
|
||||
{
|
||||
@Override
|
||||
public boolean useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)
|
||||
{
|
||||
if (!(playable instanceof L2PcInstance))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
final L2PcInstance activeChar = (L2PcInstance) playable;
|
||||
if (activeChar.isCastingNow())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (activeChar.isEnchanting())
|
||||
{
|
||||
activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_IS_IN_PROGRESS_PLEASE_TRY_AGAIN_AFTER_ENDING_THE_PREVIOUS_TASK));
|
||||
return false;
|
||||
}
|
||||
|
||||
activeChar.setActiveEnchantAttrItemId(item.getId());
|
||||
activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_IS_IN_PROGRESS_PLEASE_TRY_AGAIN_AFTER_ENDING_THE_PREVIOUS_TASK));
|
||||
activeChar.sendPacket(new ExChangeAttributeItemList(activeChar, item.getObjectId()));
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user