示例#1
0
 /**
  * Refreshes the action bar.
  *
  * @param slot The slots to refresh.
  */
 public void refresh(int... slot) {
   int maskData = (barIndex + 1) << 5;
   if (locked) {
     maskData |= 0x10; // 35651680 //35651696 // bar 3
   }
   player.getVars().setVarValueInt(682, maskData);
   if (slot.length < 1) {
     slot = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
   }
   for (int s : slot) {
     Keybind k = getActiveBar().getSlots()[s];
     if (s == 12 || s == 13) {
       player.getVars().setVarValueInt(s == 12 ? 4413 : 4414, k != null ? k.getClientId() : 0);
       player.getVars().setVarValueInt(s == 12 ? 4427 : 4428, k != null ? k.getItemId() : -1);
     } else {
       player.getVars().setVarValueInt(727 + s, k != null ? k.getClientId() : 0);
       player.getVars().setVarValueInt(751 + s, 0);
       player.getVars().setVarValueInt(811 + s, k != null ? k.getItemId() : -1);
       player.getVars().setVarValueInt(835 + s, -1);
     } // 2097152			   2195454   11108350
     player
         .getDispatcher()
         .sendWidgetEvents(
             1430, SLOT_CHILD_IDS[s], -1, -1, k == null ? 2098176 : (locked ? 2195454 : 11108350));
   }
   player.getVars().setVarValueInt(679, player.getCombatSchedule().getAdrenaline() * 10);
 }
示例#2
0
 public NpcType getType(Player player) {
   return Virtue.getInstance()
       .getConfigProvider()
       .getNpcTypes()
       .getMultiNPC(player.getVars(), Virtue.getInstance().getConfigProvider(), typeId);
 }