Package l2p.gameserver.templates

Examples of l2p.gameserver.templates.StatsSet


    _npcs.add(npc);
  }

  public static void changeNobleName(int objId, String newName)
  {
    StatsSet noble = _nobles.get(objId);
    if(noble == null)
    {
      return;
    }
    noble.set(CHAR_NAME, newName);
    OlympiadDatabase.saveNobleData(objId);
  }
View Full Code Here


    OlympiadDatabase.saveNobleData(objId);
  }

  public static String getNobleName(int objId)
  {
    StatsSet noble = _nobles.get(objId);
    if(noble == null)
    {
      return null;
    }
    return noble.getString(CHAR_NAME);
  }
View Full Code Here

    return noble.getString(CHAR_NAME);
  }

  public static int getNobleClass(int objId)
  {
    StatsSet noble = _nobles.get(objId);
    if(noble == null)
    {
      return 0;
    }
    return noble.getInteger(CLASS_ID);
  }
View Full Code Here

    return noble.getInteger(CLASS_ID);
  }

  public static void manualSetNoblePoints(int objId, int points)
  {
    StatsSet noble = _nobles.get(objId);
    if(noble == null)
    {
      return;
    }
    noble.set(POINTS, points);
    OlympiadDatabase.saveNobleData(objId);
  }
View Full Code Here

            classId = id.getId();
            break;
          }
        }
      }
      StatsSet statDat = new StatsSet();
      statDat.set(CLASS_ID, classId);
      statDat.set(CHAR_NAME, noble.getName());
      statDat.set(POINTS, DEFAULT_POINTS);
      statDat.set(POINTS_PAST, 0);
      statDat.set(POINTS_PAST_STATIC, 0);
      statDat.set(COMP_DONE, 0);
      statDat.set(COMP_WIN, 0);
      statDat.set(COMP_LOOSE, 0);
      _nobles.put(noble.getObjectId(), statDat);
      OlympiadDatabase.saveNobleData();
    }
  }
View Full Code Here

      while(rset.next())
      {
        int cycle = _signsInstance.getCurrentCycle();
        int festivalId = rset.getInt("festivalId");
        int cabal = SevenSigns.getCabalNumber(rset.getString("cabal"));
        StatsSet festivalDat = new StatsSet();
        festivalDat.set("festivalId", festivalId);
        festivalDat.set("cabal", cabal);
        festivalDat.set("cycle", cycle);
        festivalDat.set("date", rset.getString("date"));
        festivalDat.set("score", rset.getInt("score"));
        festivalDat.set("members", rset.getString("members"));
        festivalDat.set("names", rset.getString("names"));
        if(cabal == SevenSigns.CABAL_DAWN)
        {
          festivalId += FESTIVAL_COUNT;
        }
        Map<Integer, StatsSet> tempData = _festivalData.get(cycle);
View Full Code Here

    if(!hasRegisteredBefore(player.getObjectId()))
    {
      return 0;
    }
    long stoneCount = 0;
    StatsSet currPlayer = _signsPlayerData.get(player.getObjectId());
    if(getPlayerCabal(player) == CABAL_DAWN)
    {
      stoneCount += currPlayer.getLong("dawn_red_stones");
      stoneCount += currPlayer.getLong("dawn_green_stones");
      stoneCount += currPlayer.getLong("dawn_blue_stones");
    }
    else
    {
      stoneCount += currPlayer.getLong("dusk_red_stones");
      stoneCount += currPlayer.getLong("dusk_green_stones");
      stoneCount += currPlayer.getLong("dusk_blue_stones");
    }
    return stoneCount;
  }
View Full Code Here

  public void rewardHighestRanked()
  {
    String[] partyMembers;
    for(int i = 0; i < FESTIVAL_COUNT; i++)
    {
      StatsSet overallData = getOverallHighestScoreData(i);
      if(overallData != null)
      {
        partyMembers = overallData.getString("members").split(",");
        for(String partyMemberId : partyMembers)
        {
          addReputationPointsForPartyMemberClan(partyMemberId);
        }
      }
View Full Code Here

      if(i >= FESTIVAL_COUNT)
      {
        festivalId -= FESTIVAL_COUNT;
      }
      // Create a new StatsSet with "default" data for Dusk
      StatsSet tempStats = new StatsSet();
      tempStats.set("festivalId", festivalId);
      tempStats.set("cycle", _signsInstance.getCurrentCycle());
      tempStats.set("date", "0");
      tempStats.set("score", 0);
      tempStats.set("members", "");
      if(i >= FESTIVAL_COUNT)
      {
        tempStats.set("cabal", SevenSigns.CABAL_DAWN);
      }
      else
      {
        tempStats.set("cabal", SevenSigns.CABAL_DUSK);
      }
      newData.put(i, tempStats);
    }
    // Add the newly created cycle data to the existing festival data, and subsequently save it to the database.
    _festivalData.put(_signsInstance.getCurrentCycle(), newData);
View Full Code Here

  {
    if(!hasRegisteredBefore(player.getObjectId()))
    {
      return 0;
    }
    StatsSet currPlayer = _signsPlayerData.get(player.getObjectId());
    if(getPlayerCabal(player) == CABAL_DAWN)
    {
      return currPlayer.getInteger("dawn_contribution_score");
    }
    return currPlayer.getInteger("dusk_contribution_score");
  }
View Full Code Here

TOP

Related Classes of l2p.gameserver.templates.StatsSet

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.