Client Timestamp update + Cosmetic NPCs & H Beacon patch + Log rework

Fixed Music command not playing soundtracks at all.
Fixed stylish scripts stucking player NPC interactions in certain cases.
Reviewed client mistimed view on items, quest expirations, BBS threads, etc.
Fixed Homing Beacon skill provoking autoflag in mobs with same objectid in different maps.
Solved DB leak cases with removing pets from inventory.
Reviewed logging throughout the source, aiming to normalize the varied-spaced log content within the facilities.
Fixed a bug that would occur when trying to reaccess Horntail expedition.
This commit is contained in:
ronancpl
2019-01-07 12:10:41 -02:00
parent 35ea13420e
commit b47dd03a3e
110 changed files with 511 additions and 585 deletions

View File

@@ -26,6 +26,7 @@ package client.command.commands.gm3;
import client.command.Command;
import client.MapleClient;
import client.MapleCharacter;
import constants.GameConstants;
import tools.MaplePacketCreator;
public class MusicCommand extends Command {
@@ -33,181 +34,42 @@ public class MusicCommand extends Command {
setDescription("");
}
private static String getSongList() {
String songList = "Song:\r\n";
for (String s : GameConstants.GAME_SONGS) {
songList += (" " + s + "\r\n");
}
return songList;
}
@Override
public void execute(MapleClient c, String[] params) {
final String[] songs = {
"Jukebox/Congratulation",
"Bgm00/SleepyWood",
"Bgm00/FloralLife",
"Bgm00/GoPicnic",
"Bgm00/Nightmare",
"Bgm00/RestNPeace",
"Bgm01/AncientMove",
"Bgm01/MoonlightShadow",
"Bgm01/WhereTheBarlogFrom",
"Bgm01/CavaBien",
"Bgm01/HighlandStar",
"Bgm01/BadGuys",
"Bgm02/MissingYou",
"Bgm02/WhenTheMorningComes",
"Bgm02/EvilEyes",
"Bgm02/JungleBook",
"Bgm02/AboveTheTreetops",
"Bgm03/Subway",
"Bgm03/Elfwood",
"Bgm03/BlueSky",
"Bgm03/Beachway",
"Bgm03/SnowyVillage",
"Bgm04/PlayWithMe",
"Bgm04/WhiteChristmas",
"Bgm04/UponTheSky",
"Bgm04/ArabPirate",
"Bgm04/Shinin'Harbor",
"Bgm04/WarmRegard",
"Bgm05/WolfWood",
"Bgm05/DownToTheCave",
"Bgm05/AbandonedMine",
"Bgm05/MineQuest",
"Bgm05/HellGate",
"Bgm06/FinalFight",
"Bgm06/WelcomeToTheHell",
"Bgm06/ComeWithMe",
"Bgm06/FlyingInABlueDream",
"Bgm06/FantasticThinking",
"Bgm07/WaltzForWork",
"Bgm07/WhereverYouAre",
"Bgm07/FunnyTimeMaker",
"Bgm07/HighEnough",
"Bgm07/Fantasia",
"Bgm08/LetsMarch",
"Bgm08/ForTheGlory",
"Bgm08/FindingForest",
"Bgm08/LetsHuntAliens",
"Bgm08/PlotOfPixie",
"Bgm09/DarkShadow",
"Bgm09/TheyMenacingYou",
"Bgm09/FairyTale",
"Bgm09/FairyTalediffvers",
"Bgm09/TimeAttack",
"Bgm10/Timeless",
"Bgm10/TimelessB",
"Bgm10/BizarreTales",
"Bgm10/TheWayGrotesque",
"Bgm10/Eregos",
"Bgm11/BlueWorld",
"Bgm11/Aquarium",
"Bgm11/ShiningSea",
"Bgm11/DownTown",
"Bgm11/DarkMountain",
"Bgm12/AquaCave",
"Bgm12/DeepSee",
"Bgm12/WaterWay",
"Bgm12/AcientRemain",
"Bgm12/RuinCastle",
"Bgm12/Dispute",
"Bgm13/CokeTown",
"Bgm13/Leafre",
"Bgm13/Minar'sDream",
"Bgm13/AcientForest",
"Bgm13/TowerOfGoddess",
"Bgm14/DragonLoad",
"Bgm14/HonTale",
"Bgm14/CaveOfHontale",
"Bgm14/DragonNest",
"Bgm14/Ariant",
"Bgm14/HotDesert",
"Bgm15/MureungHill",
"Bgm15/MureungForest",
"Bgm15/WhiteHerb",
"Bgm15/Pirate",
"Bgm15/SunsetDesert",
"Bgm16/Duskofgod",
"Bgm16/FightingPinkBeen",
"Bgm16/Forgetfulness",
"Bgm16/Remembrance",
"Bgm16/Repentance",
"Bgm16/TimeTemple",
"Bgm17/MureungSchool1",
"Bgm17/MureungSchool2",
"Bgm17/MureungSchool3",
"Bgm17/MureungSchool4",
"Bgm18/BlackWing",
"Bgm18/DrillHall",
"Bgm18/QueensGarden",
"Bgm18/RaindropFlower",
"Bgm18/WolfAndSheep",
"Bgm19/BambooGym",
"Bgm19/CrystalCave",
"Bgm19/MushCatle",
"Bgm19/RienVillage",
"Bgm19/SnowDrop",
"Bgm20/GhostShip",
"Bgm20/NetsPiramid",
"Bgm20/UnderSubway",
"Bgm21/2021year",
"Bgm21/2099year",
"Bgm21/2215year",
"Bgm21/2230year",
"Bgm21/2503year",
"Bgm21/KerningSquare",
"Bgm21/KerningSquareField",
"Bgm21/KerningSquareSubway",
"Bgm21/TeraForest",
"BgmEvent/FunnyRabbit",
"BgmEvent/FunnyRabbitFaster",
"BgmEvent/wedding",
"BgmEvent/weddingDance",
"BgmEvent/wichTower",
"BgmGL/amoria",
"BgmGL/Amorianchallenge",
"BgmGL/chapel",
"BgmGL/cathedral",
"BgmGL/Courtyard",
"BgmGL/CrimsonwoodKeep",
"BgmGL/CrimsonwoodKeepInterior",
"BgmGL/GrandmastersGauntlet",
"BgmGL/HauntedHouse",
"BgmGL/NLChunt",
"BgmGL/NLCtown",
"BgmGL/NLCupbeat",
"BgmGL/PartyQuestGL",
"BgmGL/PhantomForest",
"BgmJp/Feeling",
"BgmJp/BizarreForest",
"BgmJp/Hana",
"BgmJp/Yume",
"BgmJp/Bathroom",
"BgmJp/BattleField",
"BgmJp/FirstStepMaster",
"BgmMY/Highland",
"BgmMY/KualaLumpur",
"BgmSG/BoatQuay_field",
"BgmSG/BoatQuay_town",
"BgmSG/CBD_field",
"BgmSG/CBD_town",
"BgmSG/Ghostship",
"BgmUI/ShopBgm",
"BgmUI/Title"
};
MapleCharacter player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !music <song>");
for (String s : songs) {
player.yellowMessage(s);
}
String sendMsg = "";
sendMsg += "Syntax: #r!music <song>#k\r\n\r\n";
sendMsg += getSongList();
c.announce(MaplePacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
return;
}
String song = joinStringFrom(params, 0);
for (String s : songs) {
if (s.equals(song)) {
for (String s : GameConstants.GAME_SONGS) {
if (s.equalsIgnoreCase(song)) { // thanks Masterrulax for finding an issue here
player.getMap().broadcastMessage(MaplePacketCreator.musicChange(s));
player.yellowMessage("Now playing song " + song + ".");
break;
player.yellowMessage("Now playing song " + s + ".");
return;
}
}
player.yellowMessage("Song not found, please enter a song below.");
for (String s : songs) {
player.yellowMessage(s);
}
String sendMsg = "";
sendMsg += "Song not found, please enter a song below.\r\n\r\n";
sendMsg += getSongList();
c.announce(MaplePacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
}
}