Package com.l2jfrozen.gameserver.model

Examples of com.l2jfrozen.gameserver.model.L2ShortCut


      case 0x01: // item
      case 0x03: // action
      case 0x04: // macro
      case 0x05: // recipe
      {
        L2ShortCut sc = new L2ShortCut(_slot, _page, _type, _id, -1, _unk);
        sendPacket(new ShortCutRegister(sc));
        activeChar.registerShortCut(sc);
        break;
      }
      case 0x02: // skill
      {
        int level = activeChar.getSkillLevel(_id);
        if (level > 0)
        {
          L2ShortCut sc = new L2ShortCut(_slot, _page, _type, _id, level, _unk);
          sendPacket(new ShortCutRegister(sc));
          activeChar.registerShortCut(sc);
        }
        break;
      }
View Full Code Here


      for(L2ShortCut sc : allShortCuts)
      {
        if(sc.getId() == _id && sc.getType() == L2ShortCut.TYPE_SKILL)
        {
          L2ShortCut newsc = new L2ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), _level, 1);
          player.sendPacket(new ShortCutRegister(newsc));
          player.registerShortCut(newsc);
        }
      }
    }
View Full Code Here

    if (Config.PVP_PK_TITLE)
      newChar.setTitle(Config.PVP_TITLE_PREFIX + "0" + Config.PK_TITLE_PREFIX + "0 ");

    // Shortcuts
    newChar.registerShortCut(new L2ShortCut(0, 0, 3, 2, -1, 1)); // Attack
    newChar.registerShortCut(new L2ShortCut(3, 0, 3, 5, -1, 1)); // Take
    newChar.registerShortCut(new L2ShortCut(10, 0, 3, 0, -1, 1)); // Sit

    ItemTable itemTable = ItemTable.getInstance();
    L2Item[] items = template.getItems();

    for (L2Item item2 : items)
    {
      L2ItemInstance item = newChar.getInventory().addItem("Init", item2.getItemId(), 1, newChar, null);

      if (item.getItemId() == 5588)
        newChar.registerShortCut(new L2ShortCut(11, 0, 1, item.getObjectId(), -1, 1)); // Tutorial Book shortcut

      if (item.isEquipable())
        if(newChar.getActiveWeaponItem() == null || !(item.getItem().getType2() != L2Item.TYPE2_WEAPON))
          newChar.getInventory().equipItemAndRecord(item);
    }

    L2SkillLearn[] startSkills = SkillTreeTable.getInstance().getAvailableSkills(newChar, newChar.getClassId());

    for(L2SkillLearn startSkill : startSkills)
    {
      newChar.addSkill(SkillTable.getInstance().getInfo(startSkill.getId(), startSkill.getLevel()), true);

      if(startSkill.getId() == 1001 || startSkill.getId() == 1177)
        newChar.registerShortCut(new L2ShortCut(1, 0, 2, startSkill.getId(), 1, 1));

      if(startSkill.getId() == 1216)
        newChar.registerShortCut(new L2ShortCut(10, 0, 2, startSkill.getId(), 1, 1));

      if(Config.DEBUG)
        _log.fine("DEBUG "+getType()+": Adding starter skill:" + startSkill.getId() + " / " + startSkill.getLevel());
    }
View Full Code Here

    for(L2ShortCut sc : allShortCuts)
    {
      if(sc.getId() == _skillId && sc.getType() == L2ShortCut.TYPE_SKILL)
      {
        L2ShortCut newsc = new L2ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), _skillLvl, 1);
        player.sendPacket(new ShortCutRegister(newsc));
        player.registerShortCut(newsc);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.L2ShortCut

Copyright © 2018 www.massapicom. 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.