Package items

Source Code of items.SpecialXMas

package items;

import l2p.extensions.scripts.ScriptFile;
import l2p.gameserver.handler.IItemHandler;
import l2p.gameserver.handler.ItemHandler;
import l2p.gameserver.model.L2Playable;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.items.L2ItemInstance;
import l2p.gameserver.serverpackets.ShowXMasSeal;

public class SpecialXMas implements IItemHandler, ScriptFile
{
  private static int[] _itemIds = {5555};

  public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)
  {
    if(!playable.isPlayer())
    {
      return;
    }
    L2Player activeChar = (L2Player) playable;
    int itemId = item.getItemId();
    if(itemId == 5555) // Token of Love
    {
      ShowXMasSeal SXS = new ShowXMasSeal(5555);
      activeChar.broadcastPacket(SXS);
    }
  }

  public int[] getItemIds()
  {
    return _itemIds;
  }

  public void onLoad()
  {
    ItemHandler.getInstance().registerItemHandler(this);
  }

  public void onReload()
  {
  }

  public void onShutdown()
  {
  }
}
TOP

Related Classes of items.SpecialXMas

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.