- Joined
- Jul 24, 2008
- Messages
- 16
- Reaction score
- 0
this is for ppl that has screwed up droprate (mostly for people using sean's repack).
this is the old code before he changed it around 5.6.
repackers that based off seanpack has screwed up droprates too thats why i posted this.
and also lets you change the droprates on world.properties again
in MapleMap.java find:
Code:
private void dropFromMonster(MapleCharacter dropOwner, MapleMonster monster) {
if (dropsDisabled)
return;
/*
* drop logic: decide based on monster what the max drop count is get drops (not allowed: multiple mesos,
* multiple items of same type exception: event drops) calculate positions
*/
int maxDrops;
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
final boolean isBoss = monster.isBoss();
if (isBoss) {
maxDrops = 15; // boss droprate
} else {
maxDrops = 50; // mob droprate
}
List<Integer> toDrop = new ArrayList<Integer>();
for (int i = 0; i < maxDrops; i++) {
toDrop.add(monster.getDrop());
}
Set<Integer> alreadyDropped = new HashSet<Integer>();
for (int i = 0; i < toDrop.size(); i++) {
if (toDrop.get(i) == -1) {
if (alreadyDropped.contains(-1) && !isBoss) {
toDrop.remove(i);
i--;
} else {
alreadyDropped.add(-1);
}
} else {
MapleInventoryType type = ii.getInventoryType(toDrop.get(i));
if (alreadyDropped.contains((int) type.getType()) && !isBoss) {
toDrop.remove(i);
i--;
} else {
alreadyDropped.add((int) type.getType());
}
}
}
Code:
private void dropFromMonster(MapleCharacter dropOwner, MapleMonster monster) {
if (dropsDisabled)
return;
/*
* drop logic: decide based on monster what the max drop count is get drops (not allowed: multiple mesos,
* multiple items of same type exception: event drops) calculate positions
*/
int maxDrops;
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
final boolean isBoss = monster.isBoss();
if (isBoss) {
maxDrops = 10 * ChannelServer.getInstance(channel).getBossDropRate();
} else {
maxDrops = 10 * ChannelServer.getInstance(channel).getDropRate();
}
List<Integer> toDrop = new ArrayList<Integer>();
for (int i = 0; i < maxDrops; i++) {
toDrop.add(monster.getDrop());
}
Set<Integer> alreadyDropped = new HashSet<Integer>();
for (int i = 0; i < toDrop.size(); i++)
{
if (alreadyDropped.contains(toDrop.get(i)) && !isBoss) // Check the drop list whether it contains same item regardless of how many items
{
toDrop.remove(i); //remove if it contains the same
i--;
}
in ChannelServer.java add:
Code:
dropRate = Integer.parseInt(props.getProperty("net.sf.odinms.world.drop"));
bossdropRate = Integer.parseInt(props.getProperty("net.sf.odinms.world.bossdrop"));
Code:
mesoRate = Integer.parseInt(props.getProperty("net.sf.odinms.world.meso"));
in world.properties add:
Code:
# drop factor
net.sf.odinms.world.drop=(droprate)
# bossdrop factor
net.sf.odinms.world.bossdrop=(bossdroprate)
under:
Code:
# meso factor
net.sf.odinms.world.meso=(mesorate)
and recompile
Last edited: