Server broadcastMessage to worlds & MapleQuestItemFetcher update

Fixed a bug with the map drop mechanics sometimes permitting over the max drop count in certain circumstances.
Fixed server broadcastMessage always broadcasting packets at world 0, even if the caller is from another world id.
Improved the MapleQuestItemFetcher, now displaying expired quests alongside the reported info.
This commit is contained in:
ronancpl
2017-12-14 11:08:55 -02:00
parent b141efdbf2
commit c1126213cc
20 changed files with 99 additions and 83 deletions

View File

@@ -688,20 +688,20 @@ public class Server implements Runnable {
worlda.reloadGuildSummary();
}
public void broadcastMessage(final byte[] packet) {
for (Channel ch : getChannelsFromWorld(0)) {
public void broadcastMessage(int world, final byte[] packet) {
for (Channel ch : getChannelsFromWorld(world)) {
ch.broadcastPacket(packet);
}
}
public void broadcastGMMessage(final byte[] packet) {
for (Channel ch : getChannelsFromWorld(0)) {
public void broadcastGMMessage(int world, final byte[] packet) {
for (Channel ch : getChannelsFromWorld(world)) {
ch.broadcastGMPacket(packet);
}
}
public boolean isGmOnline() {
for (Channel ch : getChannelsFromWorld(0)) {
public boolean isGmOnline(int world) {
for (Channel ch : getChannelsFromWorld(world)) {
for (MapleCharacter player : ch.getPlayerStorage().getAllCharacters()) {
if (player.isGM()){
return true;