L2JMobius

High Five wrong crops calc

Felcaster · 4 · 366

Offline Felcaster

  • Heir
  • **
    • Posts: 17
when I use "seed desert codran" (59-69) in Witch cata (x4 mobs), 60 - 69 mobs give only 1 crop.
Must be: 4xHP mobs must give more crops than x1HP mobs

P.S. with big difference between seed and mob lvl - calc is ok
For example the same "desert codran" give 7 crops from 75lvl mob, 8 from 76lvl and 10 from 78lvl (Forbidden Path cata)

Upd: I see quantity of crops depends only from lvl difference mob-crop and not depend from mob HP multiplier.
Seems formula is: crops=1 + (LVLmob - LVLseed upper threshold)
so this formula twice wrong


Online Naker

  • Count
  • *****
    • Posts: 450
  • Coding Dreams
when I use "seed desert codran" (59-69) in Witch cata (x4 mobs), 60 - 69 mobs give only 1 crop.
Must be: 4xHP mobs must give more crops than x1HP mobs

P.S. with big difference between seed and mob lvl - calc is ok
For example the same "desert codran" give 7 crops from 75lvl mob, 8 from 76lvl and 10 from 78lvl (Forbidden Path cata)

Upd: I see quantity of crops depends only from lvl difference mob-crop and not depend from mob HP multiplier.
Seems formula is: crops=1 + (LVLmob - LVLseed upper threshold)
so this formula twice wrong
Give the right formula and I will update it


Offline Felcaster

  • Heir
  • **
    • Posts: 17
I have IL java server with seems right formula.
At what file I can find formula? U can say where on HF |Mobius is this formula and how it look - I will search it on IL.
Or I can just test for example the same "desert codran" on mobs x4 60-78lvls and x1 and we will calculate formula


Offline Felcaster

  • Heir
  • **
    • Posts: 17
Code: [Select]

public IntIntHolder getHarvestedCrop()
{
// Get base count and apply strong-type multiplier.
int count = 1;
for (L2Skill skill : _owner.getTemplate().getSkills(NpcSkillType.PASSIVE))
{
if (skill.getId() >= 4303 && skill.getId() <= 4310)
{
count = skill.getId() - 4301;
break;
}
}

// Calculate monster and seed level modifier.
final int diff = _owner.getStatus().getLevel() - _seed.getLevel() - 5;
if (diff > 0)
count += diff;

// Calculate reward.
return new IntIntHolder(_seed.getCropId(), count * Config.RATE_DROP_MANOR);
}



what I found: gameserver\model\actor\container\monster\SeedState.java
x4 mob skill ID 4305
so 4305-4301=4. x4 multiplier for crops. correct calc for xHP mobs