Most visitors online was 8830 , on 6 Feb 2024
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!Add a channel column to the db in that table, 0 for all channels.
Then just check the channel when going through those.
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 ~ 2010 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package server.life;
import java.nio.channels.Channel;
/**
*
* @author LightPepsi
*/
public class MonsterGlobalDropEntry {
public MonsterGlobalDropEntry(int itemId, int chance, int continent, byte dropType, int Minimum, int Maximum, short questid, int Channel) {
this.itemId = itemId;
this.chance = chance;
this.dropType = dropType;
this.questid = questid;
this.Minimum = Minimum;
this.Maximum = Maximum;
this.channel = Channel;
}
public byte dropType;
public int itemId, chance, Minimum, Maximum;
public short questid;
public int channel;
}
final List<MonsterGlobalDropEntry> globalEntry = mi.getGlobalDrop();
// Global Drops
for (final MonsterGlobalDropEntry de : globalEntry) {
if (Randomizer.nextInt(999999) < de.chance) {
if (droptype == 3) {
pos.x = (int) (mobpos + (d % 2 == 0 ? (40 * (d + 1) / 2) : -(40 * (d / 2))));
} else {
pos.x = (int) (mobpos + ((d % 2 == 0) ? (25 * (d + 1) / 2) : -(25 * (d / 2))));
}
if (de.itemId == 0) {
//chr.getCashShop().gainCash(1, 80);
} else {
if (ItemConstants.getInventoryType(de.itemId) == MapleInventoryType.EQUIP) {
idrop = ii.randomizeStats((Equip) ii.getEquipById(de.itemId));
} else {
idrop = new Item(de.itemId, (short) 0, (short) (de.Maximum != 1 ? Randomizer.nextInt(de.Maximum - de.Minimum) + de.Minimum : 1));
}
[B]spawnDrop(idrop, calcDropPos(pos, mob.getPosition()), mob, chr, droptype, de.questid);[/B]
d++;
}
}
}
for (final MonsterGlobalDropEntry de : globalEntry) {
[B]if (de.channel != 0 && de.channel != this.channel) {
continue;
}[/B]
if (Randomizer.nextInt(999999) < de.chance) {
for (final MonsterGlobalDropEntry de : globalEntry) {
[B]if (de.channel == 0 || de.channel == this.channel) {[/B]
if (Randomizer.nextInt(999999) < de.chance) {
//~snip~
}
[B]}[/B]
}