Most visitors online was 12720 , on 2 May 2024
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature currently requires accessing the site using the built-in Safari browser.
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]
}