Package gnu.trove.map.hash

Examples of gnu.trove.map.hash.TIntIntHashMap$TValueView


          int id2 = Integer.parseInt(skillElement.attributeValue("id"));
          int level2 = Integer.parseInt(skillElement.attributeValue("level"));
          int chance2 = skillElement.attributeValue("chance") == null ? 0 : Integer.parseInt(skillElement.attributeValue("chance"));
          boolean canAttackDoor = Boolean.parseBoolean(skillElement.attributeValue("can_attack_door"));
          CubicTemplate.ActionType type = CubicTemplate.ActionType.valueOf(skillElement.attributeValue("action_type"));
          TIntIntHashMap set = new TIntIntHashMap();
          for (Iterator<?> chanceIterator = skillElement.elementIterator(); chanceIterator.hasNext();)
          {
            Element chanceElement = (Element) chanceIterator.next();
            int min = Integer.parseInt(chanceElement.attributeValue("min"));
            int max = Integer.parseInt(chanceElement.attributeValue("max"));
            int value = Integer.parseInt(chanceElement.attributeValue("value"));
            for (int i = min; i <= max; i++)
            {
              set.put(i, value);
            }
          }
          if ((chance2 == 0) && set.isEmpty())
          {
            warn("Wrong skill chance. Cubic: " + id + "/" + level);
          }
          Skill skill = SkillTable.getInstance().getInfo(id2, level2);
          if (skill != null)
View Full Code Here


  }
 
  @Override
  public String onKill(NpcInstance npc, QuestState st)
  {
    TIntIntHashMap moblist = new TIntIntHashMap();
    if ((npc == null) || (st == null))
    {
      return null;
    }
    int cond = st.getCond();
    if ((cond >= 2) && (cond < 9))
    {
      int ONE = st.getInt("one");
      int TWO = st.getInt("two");
      int THREE = st.getInt("three");
      int FOUR = st.getInt("four");
      int FIVE = st.getInt("five");
      int SIX = st.getInt("six");
      int SEVEN = st.getInt("seven");
      int EIGHT = st.getInt("eight");
      if ((npc.getNpcId() == 25837) && (cond == 2))
      {
        ONE++;
        st.set("one", String.valueOf(ONE));
        st.setCond(3);
        st.playSound("ItemSound.quest_middle");
      }
      else if ((npc.getNpcId() == 25840) && (cond == 3))
      {
        TWO++;
        st.set("two", String.valueOf(TWO));
        st.setCond(4);
        st.playSound("ItemSound.quest_middle");
      }
      else if ((npc.getNpcId() == 25843) && (cond == 4))
      {
        THREE++;
        st.set("three", String.valueOf(THREE));
        st.setCond(5);
        st.playSound("ItemSound.quest_middle");
      }
      else if ((npc.getNpcId() == 25841) && (cond == 5))
      {
        FOUR++;
        st.set("four", String.valueOf(FOUR));
        st.setCond(6);
        st.playSound("ItemSound.quest_middle");
      }
      if (cond == 6)
      {
        if (npc.getNpcId() == 25838)
        {
          FIVE++;
          st.set("five", String.valueOf(FIVE));
        }
        else if (npc.getNpcId() == 25839)
        {
          SIX++;
          st.set("six", String.valueOf(SIX));
        }
        if ((FIVE > 0) && (SIX > 0))
        {
          st.setCond(7);
          st.playSound("ItemSound.quest_middle");
        }
      }
      else if ((npc.getNpcId() == 25846) && (cond == 7))
      {
        SEVEN++;
        st.set("seven", String.valueOf(SEVEN));
        st.setCond(8);
        st.playSound("ItemSound.quest_middle");
      }
      else if ((npc.getNpcId() == 25824) && (cond == 8))
      {
        EIGHT++;
        st.set("eight", String.valueOf(EIGHT));
        st.setCond(9);
        st.playSound("ItemSound.quest_middle");
      }
      moblist.put(25837, ONE);
      moblist.put(25840, TWO);
      moblist.put(25845, THREE);
      moblist.put(25841, FOUR);
      moblist.put(25838, FIVE);
      moblist.put(25839, SIX);
      moblist.put(25846, SEVEN);
      moblist.put(25825, EIGHT);
    }
    return null;
  }
View Full Code Here

    {
      return null;
    }
    if (st.getCond() == 2)
    {
      TIntIntHashMap moblist = new TIntIntHashMap();
      int _1 = st.getInt("1");
      if (((npc.getNpcId() >= 23044) && (npc.getNpcId() <= 23068)) || ((npc.getNpcId() >= 23101) && (npc.getNpcId() <= 23112) && (_1 < 10) && Rnd.chance(10)))
      {
        _1++;
        st.set("1", String.valueOf(_1));
      }
      moblist.put(1033349, _1);
      st.getPlayer().sendPacket(new ExQuestNpcLogList(st));
      if (_1 >= 10)
      {
        st.setCond(3);
        st.playSound("ItemSound.quest_middle");
View Full Code Here

TOP

Related Classes of gnu.trove.map.hash.TIntIntHashMap$TValueView

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.