DeathDropItem.java 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Copyright (C) 2004-2014 L2J Server
  3. *
  4. * This file is part of L2J Server.
  5. *
  6. * L2J Server is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J Server is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package com.l2jserver.gameserver.model.drops;
  20. import com.l2jserver.Config;
  21. import com.l2jserver.gameserver.model.actor.L2Character;
  22. /**
  23. * @author Nos
  24. */
  25. public class DeathDropItem extends GeneralDropItem
  26. {
  27. /**
  28. * @param itemId the item id
  29. * @param min the min count
  30. * @param max the max count
  31. * @param chance the chance of this drop item
  32. */
  33. public DeathDropItem(int itemId, long min, long max, double chance)
  34. {
  35. super(itemId, min, max, chance);
  36. }
  37. /*
  38. * (non-Javadoc)
  39. * @see com.l2jserver.gameserver.model.drops.GeneralDropItem#getMin(com.l2jserver.gameserver.model.actor.L2Character, com.l2jserver.gameserver.model.actor.L2Character)
  40. */
  41. @Override
  42. public long getMin(L2Character victim, L2Character killer)
  43. {
  44. return (long) (super.getMin(victim, killer) * Config.RATE_DEATH_DROP_AMOUNT_MULTIPLIER);
  45. }
  46. /*
  47. * (non-Javadoc)
  48. * @see com.l2jserver.gameserver.model.drops.GeneralDropItem#getMax(com.l2jserver.gameserver.model.actor.L2Character, com.l2jserver.gameserver.model.actor.L2Character)
  49. */
  50. @Override
  51. public long getMax(L2Character victim, L2Character killer)
  52. {
  53. return (long) (super.getMax(victim, killer) * Config.RATE_DEATH_DROP_AMOUNT_MULTIPLIER);
  54. }
  55. /*
  56. * (non-Javadoc)
  57. * @see com.l2jserver.gameserver.model.drops.GeneralDropItem#getChance(com.l2jserver.gameserver.model.actor.L2Character, com.l2jserver.gameserver.model.actor.L2Character)
  58. */
  59. @Override
  60. public double getChance(L2Character victim, L2Character killer)
  61. {
  62. return super.getChance(victim, killer) * Config.RATE_DEATH_DROP_CHANCE_MULTIPLIER;
  63. }
  64. }