Class CField

java.lang.Object
tools.packet.CField

public class CField extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    achievementRatio(int amount)
    建構成就比率(ACHIEVEMENT_RATIO)更新的封包。
    static byte[]
    addAttackInfo(int type, int cid, int tbyte, int skill, int level, int display, byte speed, List<AttackPair> damage, int lvl, byte mastery, byte unk, int charge, Point pos, int ultLevel)
    建構攻擊資訊封包(近戰/遠距/掃射/魔法/能量的共用底層組裝器)。
    static byte[]
    addMessengerPlayer(String from, MapleCharacter chr, int position, int channel)
    建構傳送頻道中加入新成員的封包。
    static void
    將婚戒清單資訊寫入指定封包寫入器。
    static void
    將戒指清單資訊寫入指定封包寫入器。
    static final byte[]
    建構顯示俠盜(Aran)開場氣球特效的封包。
    static byte[]
    建構船艦回港(BOAT_MOVE, 效果 6/0)的封包。
    static byte[]
    boatEffect(int effect)
    建構船艦(BOAT_EFFECT)特效的封包。
    static byte[]
    建構船艦啟航(BOAT_EFFECT, 效果 8/2)的封包。
    static byte[]
    boatPacket(int effect, int mode)
    建構船艦移動(BOAT_MOVE)的封包。
    static byte[]
    cancelChair(int id)
    建構取消/切換坐椅的封包。
    static byte[]
    建構停用/取消內在能力(Inner Ability)的封包。
    static byte[]
    changeTeam(int cid, int type)
    建構變更隊伍(紅/藍方)的封包。
    static byte[]
    closeRangeAttack(int cid, int tbyte, int skill, int level, int display, byte speed, List<AttackPair> damage, boolean energy, int lvl, byte mastery, byte unk, int charge)
    建構近距離攻擊的封包。
    static byte[]
    coconutScore(int[] coconutscore)
    建構更新椰子大戰雙方比分的封包。
    static byte[]
    craftFinished(int cid, int craftID, int ranking, int itemId, int quantity, int exp)
    建構專業技能製作完成(CRAFT_COMPLETE)的封包。
    static byte[]
    craftMake(int cid, int something, int time)
    建構專業技能製作中(CRAFT_EFFECT)特效的封包。
    static byte[]
    createUltimate(int amount)
    建構製作終極技能書(Ultimate)結果的封包。
    static byte[]
    damagePlayer(int cid, int type, int damage, int monsteridfrom, byte direction, int skillid, int pDMG, boolean pPhysical, int pID, byte pType, Point pPos, byte offset, int offset_d, int fake)
    建構玩家受到傷害的封包。
    static byte[]
    建構停用機器人(Android)的封包。
    static byte[]
    destroyKite(int oid, boolean animation)
    建構移除風箏的封包。
    static byte[]
    建構移除反應爐的封包。
    static byte[]
    dragonBlink(int portalId)
    建構龍之瞬移(Dragon Blink)特效的封包。
    static byte[]
    dropItemFromMapObject(MapleMapItem drop, Point dropfrom, Point dropto, byte mod)
    建構地圖物件掉落道具的封包。
    static byte[]
    enablePVP(boolean enabled)
    建構啟用/停用 PVP 的封包。
    static byte[]
    建構進入雪球大戰地圖時的初始雪球狀態封包(便捷多載)。
    static byte[]
    environmentChange(String env, int mode)
    建構地圖環境(Boss 環境)變化的封包。
    static byte[]
    environmentMove(String env, int mode)
    建構移動/更新地圖環境物件的封包。
    static byte[]
    explodeDrop(int oid)
    建構地圖掉落物以「爆裂」方式消失的封包。
    static byte[]
    facialExpression(MapleCharacter from, int expression)
    建構顯示角色表情的封包。
    static byte[]
    familiarAttack(int cid, byte unk, List<Triple<Integer, Integer, List<Integer>>> attackPair)
    建構怪物寵物(Familiar)攻擊的封包。
    static byte[]
    followEffect(int initiator, int replier, Point toMap)
    建構組隊跟隨(FOLLOW_EFFECT)特效的封包。
    static byte[]
    gainForce(int oid, int count, int color)
    建構獲得能量(GAIN_FORCE)特效的封包。
    static byte[]
    GameMaster_Func(int value)
    建構 GM 特效(GM_EFFECT)的封包。
    static byte[]
    getBoosterFamiliar(int cid, int familiar, int id)
    建構顯示助力夥伴(Booster Familiar)的封包。
    static byte[]
    getBuffBar(long millis)
    建構顯示頭頂增益冷卻進度條的封包。
    static byte[]
    getBuffZoneEffect(int itemId)
    建構增益區域(Buff Zone)特效的封包。
    static byte[]
    建構搶旗(Capture the Flag)地圖兩處基地範圍與守衛位置的封包。
    static byte[]
    建構搶旗地圖兩面旗幟(仍在基地時)位置的封包。
    static byte[]
    getChannelChange(MapleClient c, String ip, int port)
    建構頻道切換(換頻)封包,指示客戶端連往新頻道的 IP/連接埠。
    static byte[]
    建構玩家進入遊戲時的初始角色資料(首次設定地圖)封包。
    static byte[]
    getChatText(int cidfrom, String text, boolean whiteBG, int show)
    建構一般聊天訊息(CHATTEXT,角色頭頂氣泡)的封包。
    static byte[]
    getClock(int time)
    建構倒數計時時鐘的封包。
    static byte[]
    getClockTime(int hour, int min, int sec)
    建構顯示當前時間(時分秒)的時鐘封包。
    static byte[]
    getFindReply(String target, int channel, boolean buddy)
    建構「尋找玩家」回覆——目標位於某個頻道的封包。
    static byte[]
    getFindReplyWithCS(String target, boolean buddy)
    建構「尋找玩家」回覆——目標位於商城(Cash Shop)的封包。
    static byte[]
    getFindReplyWithMap(String target, int mapid, boolean buddy)
    建構「尋找玩家」回覆——目標位於某張地圖的封包。
    static byte[]
    getFindReplyWithMTS(String target, boolean buddy)
    建構「尋找玩家」回覆——目標位於拍賣場(MTS)的封包。
    static byte[]
    建構跟隨(Follow)系統訊息的封包。
    static byte[]
    getFollowMsg(int opcode)
    建構跟隨(Follow)狀態訊息的封包。
    static byte[]
    getGameMessage(int colour, String msg)
    建構指定顏色的遊戲系統訊息封包。
    static byte[]
    getGameMessage(String msg, boolean white)
    建構遊戲系統訊息的封包(白色或暗紅色)。
    static byte[]
    建構同步角色快捷鍵配置(Keymap)的封包。
    static byte[]
    建構技能巨集(Skill Macro)設定的封包。
    static byte[]
    建構地圖移動平台(MOVE_PLATFORM)的封包。
    static byte[]
    將十六進位字串轉換為封包位元組陣列。
    static byte[]
    建構公用 NPC 清單(PUBLIC_NPC,例如次元之鏡、怪物公園計程車等)的封包。
    static byte[]
    建構清空公用 NPC 清單(PUBLIC_NPC,數量 0)的封包。
    static byte[]
    getPVPClock(int type, int time)
    建構 PVP 倒數時鐘的封包。
    static byte[]
    建構 PVP 參賽者隊伍歸屬明細的封包。
    static byte[]
    getPVPHPBar(int cid, int hp, int maxHp)
    建構 PVP HP 條的封包。
    static byte[]
    getPVPIceGage(int score)
    建構 PVP 冰凍量表(Ice Gage)的封包。
    static byte[]
    getPVPIceHPBar(int hp, int maxHp)
    建構 PVP 冰騎士(Ice Knight)血量條的封包。
    static byte[]
    getPVPKilled(String lastWords)
    建構 PVP 擊殺播報(含被擊殺者遺言)的封包。
    static byte[]
    getPVPMist(int cid, int mistSkill, int mistLevel, int damage)
    建構 PVP 毒霧/煙幕(PVP_MIST)的封包。
    static byte[]
    getPVPMode(int mode)
    建構切換 PVP 進行狀態(準備中/進行中/結束等)的封包。
    static byte[]
    getPVPPoints(int p1, int p2)
    建構更新 PVP 兩項分數(積分/點數)的封包。
    static byte[]
    getPVPResult(List<Pair<Integer, MapleCharacter>> flags, int exp, int winningTeam, int playerTeam)
    建構 PVP 結算畫面的封包。
    static byte[]
    getPVPScore(int score, boolean kill)
    建構更新 PVP 個人分數的封包。
    static byte[]
    建構 PVP 計分板的封包。
    static byte[]
    建構 PVP 隊伍名單的封包。
    static byte[]
    getPVPTransform(int type)
    建構 PVP 變身效果的封包。
    static byte[]
    getPVPType(int type, List<Pair<Integer,String>> players1, int team, boolean enabled, int lvl)
    建構設定 PVP 模式類型與參賽者名單的封包。
    static byte[]
    getRPSMode(byte mode, int mesos, int selection, int answer)
    建構剪刀石頭布小遊戲各階段狀態的封包。
    static byte[]
    getScrollEffect(int chr, Equip.ScrollResult scrollSuccess, boolean legendarySpirit, boolean whiteScroll)
    建構卷軸捲動結果特效(SHOW_SCROLL_EFFECT)的封包。
    static byte[]
    getServerIP(MapleClient c, byte[] ip, int port, int clientId)
    建構通知客戶端連線至指定遊戲伺服器位址(IP/連接埠)的封包。
    static byte[]
    建構定時炸彈攻擊的封包(固定彈飛距離與受傷值)。
    static byte[]
    建構同步地圖所有環境物件當前狀態的封包。
    static byte[]
    getWarpToMap(MapleMap to, int spawnPoint, MapleCharacter chr)
    建構將玩家傳送至指定地圖與重生點的封包。
    static byte[]
    getWhisper(String sender, int channel, String text)
    建構收到悄悄話(密語)的封包。
    static byte[]
    getWhisperReply(String target, byte reply)
    建構悄悄話送出結果回覆的封包。
    static byte[]
    harvestMessage(int oid, int msg)
    建構採集結果訊息的封包。
    static byte[]
    harvestResult(int cid, boolean success)
    建構採集結果(HARVESTED)的封包。
    static byte[]
    hitCoconut(boolean spawn, int id, int type)
    建構椰子被擊中 / 生成的封包(椰子大戰小遊戲)。
    static byte[]
    hitSnowBall(int team, int damage, int distance, int delay)
    建構雪球被擊中(推退)的封包(雪球大戰小遊戲)。
    static byte[]
    建構顯示內在能力(Inner Ability)相關訊息的封包。
    static byte[]
    instantMapWarp(byte portal)
    建構同地圖瞬間傳送(切換傳送點)的封包。
    static byte[]
    itemEffect(int characterid, int itemid)
    建構顯示角色道具特效的封包。
    static byte[]
    joinMessenger(int position)
    建構自身加入傳送頻道時的封包。
    static byte[]
    建構向左擊退效果的封包。
    static byte[]
    建構載入角色公會徽章(圖示)的封包。
    static byte[]
    建構載入角色公會名稱的封包。
    static byte[]
    magicAttack(int cid, int tbyte, int skill, int level, int display, byte speed, List<AttackPair> damage, int charge, int lvl, byte unk)
    建構魔法攻擊的封包。
    static byte[]
    makeExtractor(int cid, String cname, Point pos, int timeLeft, int itemId, int fee)
    建構在地圖上生成採集器(萃取機)的封包。
    static final byte[]
    MapEff(String path)
    建構播放指定路徑地圖特效的封包。
    static final byte[]
    MapNameDisplay(int mapid)
    建構顯示進入地圖名稱橫幅特效的封包。
    static byte[]
    messengerChat(String charname, String text)
    建構傳送頻道聊天訊息的封包。
    static byte[]
    messengerInvite(String from, int messengerid)
    建構傳送頻道(Messenger)邀請通知的封包。
    static byte[]
    messengerNote(String text, int mode, int mode2)
    建構傳送頻道系統提示(如成員上 / 下線)的封包。
    static byte[]
    建構機器人移動(ANDROID_MOVE)的封包。
    static byte[]
    建構龍移動(DRAGON_MOVE)的封包。
    static byte[]
    moveFamiliar(int cid, Point startPos, List<LifeMovementFragment> moves)
    建構怪物寵物(Familiar)移動的封包。
    static byte[]
    moveFollow(Point otherStart, Point myStart, Point otherEnd, List<LifeMovementFragment> moves)
    建構跟隨(Follow)移動同步的封包。
    static byte[]
    movePlayer(int cid, List<LifeMovementFragment> moves, Point startPos)
    建構其他玩家移動的封包。
    static byte[]
    multiChat(String name, String chattext, int mode)
    建構好友/組隊/公會頻道聊天訊息的封包。
    static byte[]
    建構切換地圖背景音樂的封包。
    static byte[]
    openBag(int index, int itemId, boolean firstTime)
    建構開啟道具袋(Bag)的封包。
    static byte[]
    pamsSongEffect(int cid)
    建構帕姆之歌(PAMS_SONG)特效的封包。
    static byte[]
    petAutoCure(int itemId)
    建構設定寵物自動解除異常狀態藥水的封包。
    static byte[]
    petAutoHP(int itemId)
    建構設定寵物自動補血藥水的封包。
    static byte[]
    petAutoMP(int itemId)
    建構設定寵物自動補魔藥水的封包。
    static byte[]
    playerDamaged(int cid, int dmg)
    建構玩家受傷(PLAYER_DAMAGED,例如地形/環境傷害)的封包。
    static byte[]
    建構播放指定音效的封包。
    static byte[]
    pvpAttack(int cid, int playerLevel, int skill, int skillLevel, int speed, int mastery, int projectile, int attackCount, int chargeTime, int stance, int direction, int range, int linkSkill, int linkSkillLevel, boolean movementSkill, boolean pushTarget, boolean pullTarget, List<AttackPair> attack)
    建構 PVP 攻擊(PVP_ATTACK)的封包。
    static byte[]
    pvpBlocked(int type)
    建構 PVP 無法加入提示的封包。
    static byte[]
    pvpCool(int cid, List<Integer> attack)
    建構 PVP 冷卻/連段(PVP_COOL)的封包。
    static byte[]
    建構快捷欄(QUICK_SLOT)設定的封包。
    static byte[]
    rangedAttack(int cid, byte tbyte, int skill, int level, int display, byte speed, int itemid, List<AttackPair> damage, Point pos, int lvl, byte mastery, byte unk)
    建構遠距離(弓弩/投擲)攻擊的封包。
    static byte[]
    rechargeCombo(int value)
    建構阿藍(Aran)連擊充能的封包。
    static byte[]
    建構登錄怪物寵物(Familiar)的封包。
    static byte[]
    建構移除機器人愛心(狀態資訊)的封包。
    static byte[]
    removeDoor(int oid, boolean animation)
    建構移除傳送門的封包。
    static byte[]
    removeDragon(int chrid)
    建構移除龍(DRAGON_REMOVE)的封包。
    static byte[]
    removeExtractor(int cid)
    建構移除採集器(萃取機)的封包。
    static byte[]
    removeFamiliar(int cid)
    建構移除怪物寵物(Familiar)的封包。
    static byte[]
    removeItemFromDuey(boolean remove, int Package)
    建構從快遞(Duey)移除包裹的封包。
    static byte[]
    removeItemFromMap(int oid, int animation, int cid)
    建構移除地圖掉落物的封包(便捷多載,slot 預設為 0)。
    static byte[]
    removeItemFromMap(int oid, int animation, int cid, int slot)
    建構移除地圖掉落物的封包。
    static byte[]
    建構移除地圖特效(地圖頭頂跑馬燈/活動公告)的封包。
    static byte[]
    removeMechDoor(MechDoor md, boolean animated)
    建構移除機械師傳送門的封包。
    static byte[]
    removeMessengerPlayer(int position)
    建構傳送頻道中移除成員的封包。
    static byte[]
    removeMist(int oid, boolean eruption)
    建構移除地圖霧區的封包。
    static byte[]
    建構從地圖移除玩家(REMOVE_PLAYER_FROM_MAP)的封包。
    static byte[]
    建構重新命名怪物寵物(Familiar)的封包。
    static byte[]
    建構重置搶旗狀態的封包。
    static byte[]
    建構雪球滾動 / 狀態更新的封包(雪球大戰小遊戲)。
    static byte[]
    sendDuey(byte operation, List<MapleDueyActions> packages)
    建構快遞(Duey)各操作狀態的封包。
    static byte[]
    建構時空裂痕(Chronosphere)錯誤提示的封包。
    static byte[]
    sendHint(String hint, int width, int height)
    建構顯示提示氣泡(Hint)的封包。
    static byte[]
    建構 PVP 地圖資訊(PVP_INFO)的封包。
    static byte[]
    sendPyramidKills(int amount)
    建構金字塔擊殺計數(PYRAMID_KILL_COUNT)的封包。
    static byte[]
    sendPyramidResult(byte rank, int amount)
    建構金字塔結算結果的封包。
    static byte[]
    sendPyramidUpdate(int amount)
    建構金字塔(古老的維那金字塔)進度更新的封包。
    static byte[]
    serverBlocked(int type)
    Possible values for type:
    1: You cannot move that channel.
    static byte[]
    setBoatState(int effect)
    建構設定船艦狀態(BOAT_STATE)的封包。
    static byte[]
    sheepRanchClothes(int cid, byte clothes)
    建構設定綿羊牧場玩家裝扮(陣營)的封包。
    static byte[]
    sheepRanchInfo(byte wolf, byte sheep)
    建構更新綿羊牧場狼 / 羊數量的封包。
    static byte[]
    showAndroidEmotion(int cid, int animation)
    建構機器人表情動畫(ANDROID_EMOTION)的封包。
    static byte[]
    建構顯示阿里安競技場記分板(ARIANT_SCOREBOARD)的封包。
    static byte[]
    showChair(int characterid, int itemid)
    建構顯示角色坐椅的封包。
    static byte[]
    showChaosHorntailShrine(boolean spawned, int time)
    建構顯示混沌闇黑龍王祭壇狀態的封包(便捷多載)。
    static byte[]
    showChaosZakumShrine(boolean spawned, int time)
    建構顯示混沌炎魔祭壇狀態的封包。
    static byte[]
    ShowChronosphere(int mf, int cs)
    建構顯示時空裂痕(Chronosphere)活動狀態的封包。
    static byte[]
    建構播放指定地圖特效的封包。
    static byte[]
    建構顯示裝備特效的封包(無隊伍參數版本)。
    static byte[]
    showEquipEffect(int team)
    建構顯示裝備特效(指定隊伍)的封包。
    static byte[]
    建構顯示 GM 活動說明(進場指示)的封包。
    static byte[]
    showHarvesting(int cid, int tool)
    建構顯示採集(挖礦/採藥)動作的封包。
    static byte[]
    showHorntailShrine(boolean spawned, int time)
    建構顯示闇黑龍王祭壇狀態的封包。
    static byte[]
    showMagnifyingEffect(int chr, short pos)
    建構放大鏡鑑定特效(SHOW_MAGNIFYING_EFFECT)的封包。
    static byte[]
    showNebuliteEffect(int chr, boolean success)
    建構星岩(Nebulite)鑲嵌特效(SHOW_NEBULITE_EFFECT)的封包。
    static byte[]
    showOXQuiz(int questionSet, int questionId, boolean askQuestion)
    建構 OX 問答(是非題)活動的封包。
    static byte[]
    showPotentialReset(boolean fireworks, int chr, boolean success, int itemid)
    建構潛在能力重設/煙火特效的封包。
    static byte[]
    showPQReward(int cid)
    建構顯示組隊任務(PQ)獎勵(SHOW_PQ_REWARD)的封包。
    static byte[]
    建構奈特金字塔(NETT_PYRAMID)特效的封包。
    static byte[]
    showTitle(int characterid, int itemid)
    建構顯示角色稱號的封包。
    static byte[]
    skillCancel(MapleCharacter from, int skillId)
    建構取消他人技能特效的封包。
    static byte[]
    skillCooldown(int sid, int time)
    建構技能冷卻時間的封包。
    static byte[]
    skillEffect(MapleCharacter from, int skillId, byte level, short display, byte unk)
    建構顯示他人技能特效的封包。
    static byte[]
    snowballMessage(int team, int message)
    建構雪球大戰系統訊息的封包。
    static byte[]
    建構生成機器人(Android / ANDROID_SPAWN)的封包。
    static byte[]
    spawnDoor(int oid, Point pos, boolean animation)
    建構在地圖上生成傳送門(牧師「天堂之門」)的封包。
    static byte[]
    建構生成龍(召喚師寵龍 / DRAGON_SPAWN)的封包。
    static byte[]
    spawnFamiliar(MonsterFamiliar mf, boolean spawn)
    建構生成或移除怪物寵物(Familiar)的封包。
    static byte[]
    建構登入歡迎畫面旗標(看板/公告旗幟)的封包。
    static byte[]
    spawnKite(int oid, int itemId, String message, String name, Point pos)
    建構在地圖上生成風箏的封包。
    static byte[]
    建構風箏生成失敗提示的封包。
    static byte[]
    spawnMechDoor(MechDoor md, boolean animated)
    建構在地圖上生成機械師傳送門的封包。
    static byte[]
    建構在地圖上生成毒霧 / 範圍霧區的封包。
    static byte[]
    建構在地圖上生成其他玩家(SPAWN_PLAYER)的封包。
    static byte[]
    建構在地圖上生成反應爐的封包。
    static byte[]
    startMapEffect(String msg, int itemid, boolean active)
    建構顯示/關閉地圖特效(地圖頭頂跑馬燈/活動公告)的封包。
    static byte[]
    建構停止時鐘(STOP_CLOCK)的封包。
    static byte[]
    strafeAttack(int cid, byte tbyte, int skill, int level, int display, byte speed, int itemid, List<AttackPair> damage, Point pos, int lvl, byte mastery, byte unk, int ultLevel)
    建構掃射(Strafe)攻擊的封包。
    static byte[]
    teslaTriangle(int cid, int sum1, int sum2, int sum3)
    建構閃電/特斯拉三角(TESLA_TRIANGLE)召喚物的封包。
    static byte[]
    建構測試用封包(硬編碼 opcode 0xA4,無內容)。
    static byte[]
    testCombo(int value)
    建構設定阿藍(Aran)連擊數的封包。
    static byte[]
    touchFamiliar(int cid, byte unk, int objectid, int type, int delay, int damage)
    建構怪物寵物(Familiar)碰觸目標的封包。
    static byte[]
    trembleEffect(int type, int delay)
    建構地圖震動特效的封包。
    static byte[]
    triggerReactor(MapleReactor reactor, int stance)
    建構反應爐被擊中時改變狀態的封包。
    static byte[]
    updateAndroidLook(int cid, short position, int itemId)
    建構更新機器人外觀(ANDROID_UPDATE,更換現金裝備)的封包。
    static byte[]
    updateAriantScore(String name, int score, boolean empty)
    建構更新阿利安特競技場單一玩家分數的封包。
    static byte[]
    建構更新阿利安特競技場全體玩家分數列表的封包。
    static byte[]
    建構更新角色外觀的封包。
    static byte[]
    建構更新怪物寵物(Familiar)疲勞值的封包。
    static byte[]
    updateHonour(int honourLevel, int honourExp, boolean levelup)
    建構更新角色名譽(Honour)等級與經驗的封包。
    static byte[]
    updateInnerPotential(byte ability, int skill, int level, int rank)
    建構更新/解鎖內在能力(Inner Ability)欄位的封包。
    static byte[]
    updateMessengerPlayer(String from, MapleCharacter chr, int position, int channel)
    建構更新傳送頻道既有成員資料的封包。
    static byte[]
    updatePartyMemberHP(int cid, int curhp, int maxhp)
    建構更新組隊成員 HP 的封包。
    static byte[]
    updateQuestFinish(int quest, int npc, int nextquest)
    建構任務完成的封包(進度代碼固定為 10)。
    static byte[]
    updateQuestInfo(MapleCharacter c, int quest, int npc, byte progress)
    建構更新任務資訊(進度)的封包。
    static byte[]
    建構更新女巫之塔鑰匙數量的封包。
    static byte[]
    useNebuliteFusion(int cid, int itemId, boolean success)
    建構星岩融合特效(SHOW_FUSION_EFFECT)的封包。
    static byte[]
    建構檢視目標角色可被偷取技能清單的封包(盜賊「偷取技能」用)。

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_BUFFMASK

      public static int DEFAULT_BUFFMASK
  • Constructor Details

    • CField

      public CField()
  • Method Details

    • getPacketFromHexString

      public static byte[] getPacketFromHexString(String hex)
      將十六進位字串轉換為封包位元組陣列。

      純工具方法,透過 HexTool.getByteArrayFromHexString(String) 解析, 主要用於以硬編碼 hex 字面值送出測試或固定格式封包。不查詢任何遊戲狀態。

      Parameters:
      hex - 十六進位字串(每位元組兩個十六進位字元,可含空白)
      Returns:
      封包位元組陣列
    • getServerIP

      public static byte[] getServerIP(MapleClient c, byte[] ip, int port, int clientId)
      建構通知客戶端連線至指定遊戲伺服器位址(IP/連接埠)的封包。

      序列化目標伺服器的 IP 位元組、連接埠與用戶端識別碼(clientId), 用於登入流程中將連線導向頻道伺服器。

      Parameters:
      c - 對應的客戶端連線
      ip - 目標伺服器 IP(已轉為位元組陣列)
      port - 目標伺服器連接埠
      clientId - 用戶端識別碼
      Returns:
      封包位元組陣列
    • getChannelChange

      public static byte[] getChannelChange(MapleClient c, String ip, int port)
      建構頻道切換(換頻)封包,指示客戶端連往新頻道的 IP/連接埠。

      將傳入的主機名稱 ip 解析為位址位元組(解析失敗時退回 127.0.0.1)後寫出, 連同連接埠一併序列化。用於玩家在頻道之間移動。

      Parameters:
      c - 對應的客戶端連線
      ip - 目標頻道伺服器主機名稱或位址字串
      port - 目標頻道伺服器連接埠
      Returns:
      封包位元組陣列
    • getPVPType

      public static byte[] getPVPType(int type, List<Pair<Integer,String>> players1, int team, boolean enabled, int lvl)
      建構設定 PVP 模式類型與參賽者名單的封包。

      寫出 PVP 類型 type、等級組別 lvl(0=菜鳥、1=鬥士…)與啟用旗標。 當 type > 0 時,另序列化本方隊伍與 players1 中每位玩家的 ID、名稱。

      Parameters:
      type - PVP 類型(0 表示不夾帶玩家名單)
      players1 - 參賽者清單,每筆為(角色 ID,角色名稱)
      team - 本方所屬隊伍
      enabled - 是否啟用
      lvl - 等級組別(0=菜鳥、1=鬥士等)
      Returns:
      封包位元組陣列
    • getPVPTransform

      public static byte[] getPVPTransform(int type)
      建構 PVP 變身效果的封包。
      Parameters:
      type - 變身類型
      Returns:
      封包位元組陣列
    • getPVPDetails

      public static byte[] getPVPDetails(List<Pair<Integer,Integer>> players)
      建構 PVP 參賽者隊伍歸屬明細的封包。

      逐筆寫出每位玩家的角色 ID 與所屬隊伍(0=無、1=紅、2=藍)。

      Parameters:
      players - 玩家清單,每筆為(角色 ID,隊伍編號)
      Returns:
      封包位元組陣列
    • enablePVP

      public static byte[] enablePVP(boolean enabled)
      建構啟用/停用 PVP 的封包。
      Parameters:
      enabled - true 寫出 1(啟用),false 寫出 2(停用)
      Returns:
      封包位元組陣列
    • getPVPScore

      public static byte[] getPVPScore(int score, boolean kill)
      建構更新 PVP 個人分數的封包。
      Parameters:
      score - 目前分數
      kill - 本次更新是否因擊殺而起(true 寫出 1)
      Returns:
      封包位元組陣列
    • getPVPResult

      public static byte[] getPVPResult(List<Pair<Integer, MapleCharacter>> flags, int exp, int winningTeam, int playerTeam)
      建構 PVP 結算畫面的封包。

      逐筆寫出 flags 中每位玩家的角色 ID、名稱、分數與隊伍標記,並夾帶經驗值 exp、 經驗加成倍率與勝負隊伍資訊。讀取各玩家的即時狀態(ID/名稱/隊伍)。

      Parameters:
      flags - 玩家清單,每筆為(分數,角色物件)
      exp - 結算發放的經驗值
      winningTeam - 獲勝隊伍編號
      playerTeam - 接收端玩家所屬隊伍
      Returns:
      封包位元組陣列
    • getPVPTeam

      public static byte[] getPVPTeam(List<Pair<Integer,String>> players)
      建構 PVP 隊伍名單的封包。

      逐筆寫出 players 中每位玩家的角色 ID 與名稱。

      Parameters:
      players - 玩家清單,每筆為(角色 ID,角色名稱)
      Returns:
      封包位元組陣列
    • getPVPScoreboard

      public static byte[] getPVPScoreboard(List<Pair<Integer, MapleCharacter>> flags, int type)
      建構 PVP 計分板的封包。

      逐筆寫出 flags 中每位玩家的角色 ID、名稱、分數與隊伍標記;當 type == 0 時隊伍標記固定寫 0(個人戰),否則寫出該玩家隊伍。讀取各玩家的即時狀態(ID/名稱/隊伍)。

      Parameters:
      flags - 玩家清單,每筆為(分數,角色物件)
      type - 計分板模式(0 為個人戰,不顯示隊伍)
      Returns:
      封包位元組陣列
    • getPVPPoints

      public static byte[] getPVPPoints(int p1, int p2)
      建構更新 PVP 兩項分數(積分/點數)的封包。
      Parameters:
      p1 - 第一項分數
      p2 - 第二項分數
      Returns:
      封包位元組陣列
    • getPVPKilled

      public static byte[] getPVPKilled(String lastWords)
      建構 PVP 擊殺播報(含被擊殺者遺言)的封包。
      Parameters:
      lastWords - 被擊殺者的遺言訊息
      Returns:
      封包位元組陣列
    • getPVPMode

      public static byte[] getPVPMode(int mode)
      建構切換 PVP 進行狀態(準備中/進行中/結束等)的封包。
      Parameters:
      mode - 模式值(11=開始倒數、0=已開始、4=結束、8=藍隊勝等)
      Returns:
      封包位元組陣列
    • getPVPIceHPBar

      public static byte[] getPVPIceHPBar(int hp, int maxHp)
      建構 PVP 冰騎士(Ice Knight)血量條的封包。
      Parameters:
      hp - 目前血量
      maxHp - 最大血量
      Returns:
      封包位元組陣列
    • getCaptureFlags

      public static byte[] getCaptureFlags(MapleMap map)
      建構搶旗(Capture the Flag)地圖兩處基地範圍與守衛位置的封包。

      map 讀取第 0、1 兩區的矩形範圍(MapleMap.getArea(int))與對應守衛座標 (map.getGuardians())並寫出。讀取地圖的即時設定。

      Parameters:
      map - 搶旗地圖
      Returns:
      封包位元組陣列
    • getCapturePosition

      public static byte[] getCapturePosition(MapleMap map)
      建構搶旗地圖兩面旗幟(仍在基地時)位置的封包。

      map 查詢旗幟道具 2910000/2910001 的座標;任一不在地圖上時以旗標 0 略過其座標。 讀取地圖的即時狀態。

      Parameters:
      map - 搶旗地圖
      Returns:
      封包位元組陣列
    • resetCapture

      public static byte[] resetCapture()
      建構重置搶旗狀態的封包。
      Returns:
      封包位元組陣列
    • viewSkills

      public static byte[] viewSkills(MapleCharacter chr)
      建構檢視目標角色可被偷取技能清單的封包(盜賊「偷取技能」用)。

      遍歷 chr 的技能,篩出符合其職業可學、且 GameConstants.canSteal(Skill) 允許偷取的技能 ID (去重後)寫出,並夾帶角色 ID 與職業。讀取角色的即時技能狀態。

      Parameters:
      chr - 被檢視(偷取)技能的目標角色
      Returns:
      封包位元組陣列
    • getMacros

      public static byte[] getMacros(SkillMacro[] macros)
      建構技能巨集(Skill Macro)設定的封包。

      掃描最多 5 組巨集,僅序列化非 null 者的名稱、喊話旗標與三個技能 ID,並於開頭寫出有效巨集數量。

      Parameters:
      macros - 技能巨集陣列(容量為 5,元素可為 null
      Returns:
      封包位元組陣列
    • innerPotentialMsg

      public static byte[] innerPotentialMsg(String msg)
      建構顯示內在能力(Inner Ability)相關訊息的封包。
      Parameters:
      msg - 要顯示的訊息文字
      Returns:
      封包位元組陣列
    • test

      public static byte[] test()
      建構測試用封包(硬編碼 opcode 0xA4,無內容)。

      僅供除錯/驗證之用,不對應正式功能。

      Returns:
      封包位元組陣列
    • updateInnerPotential

      public static byte[] updateInnerPotential(byte ability, int skill, int level, int rank)
      建構更新/解鎖內在能力(Inner Ability)欄位的封包。

      寫出內在能力欄位編號、技能 ID(7000000+)、等級(0 表示空白欄位)與品階(rank)。

      Parameters:
      ability - 內在能力欄位編號(1-3)
      skill - 內在能力技能 ID(7000000 起)
      level - 等級(0 表示空白欄位)
      rank - 品階
      Returns:
      封包位元組陣列
    • cancelInnerPotential

      public static byte[] cancelInnerPotential(int nType)
      建構停用/取消內在能力(Inner Ability)的封包。

      nType 決定尾段寫出格式:值為 1 時補寫一個 int,否則補寫一個 short。

      Parameters:
      nType - 取消類型(影響尾段寫出長度)
      Returns:
      封包位元組陣列
    • updateHonour

      public static byte[] updateHonour(int honourLevel, int honourExp, boolean levelup)
      建構更新角色名譽(Honour)等級與經驗的封包。
      Parameters:
      honourLevel - 名譽等級
      honourExp - 名譽經驗值
      levelup - 是否為升級(true 寫出 1,觸發升級表現)
      Returns:
      封包位元組陣列
    • getCharInfo

      public static byte[] getCharInfo(MapleCharacter chr)
      建構玩家進入遊戲時的初始角色資料(首次設定地圖)封包。

      沿用 WARP_TO_MAP opcode,寫出頻道、亂數產生器種子(chr.CRand())、 由 PacketHelper.addCharacterInfo(MaplePacketLittleEndianWriter, MapleCharacter) 序列化的完整角色資料,以及伺服器時間等欄位。 讀取角色的完整即時狀態。

      Parameters:
      chr - 進入遊戲的角色
      Returns:
      封包位元組陣列
    • getWarpToMap

      public static byte[] getWarpToMap(MapleMap to, int spawnPoint, MapleCharacter chr)
      建構將玩家傳送至指定地圖與重生點的封包。

      寫出目標地圖 ID to、重生點 spawnPoint、角色當前血量與伺服器時間。 讀取角色與地圖的即時狀態。

      Parameters:
      to - 目標地圖
      spawnPoint - 重生點索引
      chr - 被傳送的角色
      Returns:
      封包位元組陣列
    • spawnFlags

      public static byte[] spawnFlags(List<Pair<String,Integer>> flags)
      建構登入歡迎畫面旗標(看板/公告旗幟)的封包。

      逐筆寫出 flags 中每面旗標的名稱與數值;flagsnull 時數量寫 0。

      Parameters:
      flags - 旗標清單,每筆為(旗標名稱,旗標值);可為 null
      Returns:
      封包位元組陣列
    • serverBlocked

      public static byte[] serverBlocked(int type)
      Possible values for type:
      1: You cannot move that channel. Please try again later.
      2: You cannot go into the cash shop. Please try again later.
      3: The Item-Trading shop is currently unavailable, please try again later.
      4: You cannot go into the trade shop, due to the limitation of user count.
      5: You do not meet the minimum level requirement to access the Trade Shop.
    • pvpBlocked

      public static byte[] pvpBlocked(int type)
      建構 PVP 無法加入提示的封包。
      Parameters:
      type - 阻擋原因(9=因組隊無法加入、1=目前無法加入等)
      Returns:
      封包位元組陣列
    • showEquipEffect

      public static byte[] showEquipEffect()
      建構顯示裝備特效的封包(無隊伍參數版本)。
      Returns:
      封包位元組陣列
    • showEquipEffect

      public static byte[] showEquipEffect(int team)
      建構顯示裝備特效(指定隊伍)的封包。
      Parameters:
      team - 隊伍編號
      Returns:
      封包位元組陣列
    • multiChat

      public static byte[] multiChat(String name, String chattext, int mode)
      建構好友/組隊/公會頻道聊天訊息的封包。
      Parameters:
      name - 發話者名稱
      chattext - 聊天內容
      mode - 頻道類型(0=好友、1=組隊、2=公會)
      Returns:
      封包位元組陣列
    • getFindReplyWithCS

      public static byte[] getFindReplyWithCS(String target, boolean buddy)
      建構「尋找玩家」回覆——目標位於商城(Cash Shop)的封包。

      沿用 WHISPER opcode,依 buddy 區分回覆來源(好友清單寫 72,否則寫 9), 並以位置碼 2 表示目標在商城。

      Parameters:
      target - 被尋找的玩家名稱
      buddy - 是否來自好友清單查詢
      Returns:
      封包位元組陣列
    • getFindReplyWithMTS

      public static byte[] getFindReplyWithMTS(String target, boolean buddy)
      建構「尋找玩家」回覆——目標位於拍賣場(MTS)的封包。

      沿用 WHISPER opcode,依 buddy 區分回覆來源(好友清單寫 72,否則寫 9), 並以位置碼 0 表示目標在 MTS。

      Parameters:
      target - 被尋找的玩家名稱
      buddy - 是否來自好友清單查詢
      Returns:
      封包位元組陣列
    • getWhisper

      public static byte[] getWhisper(String sender, int channel, String text)
      建構收到悄悄話(密語)的封包。

      寫出發話者名稱、其所在頻道(以 channel - 1 寫出)與訊息內容。

      Parameters:
      sender - 發話者名稱
      channel - 發話者所在頻道(1 起算)
      text - 悄悄話內容
      Returns:
      封包位元組陣列
    • getWhisperReply

      public static byte[] getWhisperReply(String target, byte reply)
      建構悄悄話送出結果回覆的封包。
      Parameters:
      target - 悄悄話目標名稱
      reply - 結果碼(0x0=找不到角色、0x1=成功)
      Returns:
      封包位元組陣列
    • getFindReplyWithMap

      public static byte[] getFindReplyWithMap(String target, int mapid, boolean buddy)
      建構「尋找玩家」回覆——目標位於某張地圖的封包。

      沿用 WHISPER opcode,依 buddy 區分回覆來源(好友清單寫 72,否則寫 9), 以位置碼 1 表示目標在地圖並寫出地圖 ID。

      Parameters:
      target - 被尋找的玩家名稱
      mapid - 目標所在地圖 ID
      buddy - 是否來自好友清單查詢
      Returns:
      封包位元組陣列
    • getFindReply

      public static byte[] getFindReply(String target, int channel, boolean buddy)
      建構「尋找玩家」回覆——目標位於某個頻道的封包。

      沿用 WHISPER opcode,依 buddy 區分回覆來源(好友清單寫 72,否則寫 9), 以位置碼 3 表示目標在某頻道並寫出頻道(channel - 1)。

      Parameters:
      target - 被尋找的玩家名稱
      channel - 目標所在頻道(1 起算)
      buddy - 是否來自好友清單查詢
      Returns:
      封包位元組陣列
    • MapEff

      public static final byte[] MapEff(String path)
      建構播放指定路徑地圖特效的封包。

      等同以 mode=3 呼叫 environmentChange(String, int)

      Parameters:
      path - 特效資源路徑
      Returns:
      封包位元組陣列
    • MapNameDisplay

      public static final byte[] MapNameDisplay(int mapid)
      建構顯示進入地圖名稱橫幅特效的封包。

      "maplemap/enter/" + mapid 為資源路徑、mode=3 呼叫 environmentChange(String, int)

      Parameters:
      mapid - 地圖 ID
      Returns:
      封包位元組陣列
    • Aran_Start

      public static final byte[] Aran_Start()
      建構顯示俠盜(Aran)開場氣球特效的封包。

      以資源路徑 "Aran/balloon"mode=4 呼叫 environmentChange(String, int)

      Returns:
      封包位元組陣列
    • musicChange

      public static byte[] musicChange(String song)
      建構切換地圖背景音樂的封包。

      mode=6 呼叫 environmentChange(String, int)

      Parameters:
      song - 音樂資源路徑
      Returns:
      封包位元組陣列
    • showEffect

      public static byte[] showEffect(String effect)
      建構播放指定地圖特效的封包。

      mode=3 呼叫 environmentChange(String, int)

      Parameters:
      effect - 特效資源路徑
      Returns:
      封包位元組陣列
    • playSound

      public static byte[] playSound(String sound)
      建構播放指定音效的封包。

      mode=4 呼叫 environmentChange(String, int)

      Parameters:
      sound - 音效資源路徑
      Returns:
      封包位元組陣列
    • environmentChange

      public static byte[] environmentChange(String env, int mode)
      建構地圖環境(Boss 環境)變化的封包。

      沿用 BOSS_ENV opcode,寫出模式碼與環境資源路徑。為多個便利包裝方法 (MapEff(String)MapNameDisplay(int)Aran_Start()musicChange(String)showEffect(String)playSound(String))的底層實作。

      Parameters:
      env - 環境資源路徑
      mode - 環境變化模式碼
      Returns:
      封包位元組陣列
    • trembleEffect

      public static byte[] trembleEffect(int type, int delay)
      建構地圖震動特效的封包。

      沿用 BOSS_ENV opcode(子類型 1),寫出震動類型與延遲。

      Parameters:
      type - 震動類型
      delay - 震動延遲(毫秒)
      Returns:
      封包位元組陣列
    • environmentMove

      public static byte[] environmentMove(String env, int mode)
      建構移動/更新地圖環境物件的封包。

      沿用 MOVE_ENV opcode,寫出環境資源路徑與模式值。

      Parameters:
      env - 環境資源路徑
      mode - 模式值
      Returns:
      封包位元組陣列
    • getUpdateEnvironment

      public static byte[] getUpdateEnvironment(MapleMap map)
      建構同步地圖所有環境物件當前狀態的封包。

      遍歷 map 的環境集合(map.getEnvironment()),逐筆寫出環境名稱與其狀態值。 讀取地圖的即時環境狀態。

      Parameters:
      map - 來源地圖
      Returns:
      封包位元組陣列
    • startMapEffect

      public static byte[] startMapEffect(String msg, int itemid, boolean active)
      建構顯示/關閉地圖特效(地圖頭頂跑馬燈/活動公告)的封包。

      activetrue 時啟用特效並寫出訊息文字;為 false 時關閉特效(不寫訊息)。 一律寫出觸發特效的道具 ID。removeMapEffect() 即以 active=false 呼叫本方法。

      Parameters:
      msg - 公告訊息文字(僅 activetrue 時寫出)
      itemid - 觸發特效的道具 ID
      active - 是否啟用特效
      Returns:
      封包位元組陣列
    • removeMapEffect

      public static byte[] removeMapEffect()
      建構移除地圖特效(地圖頭頂跑馬燈/活動公告)的封包。

      實作上等同呼叫 startMapEffect(String, int, boolean) 並以 active=false 關閉特效。

      Returns:
      封包位元組陣列
    • GameMaster_Func

      public static byte[] GameMaster_Func(int value)
      建構 GM 特效(GM_EFFECT)的封包。

      序列化單一位元組 value 後補 17 個零位元組;用於觸發 GM 相關的客戶端視覺/狀態效果。

      Parameters:
      value - GM 特效類型值
      Returns:
      封包位元組陣列
    • showOXQuiz

      public static byte[] showOXQuiz(int questionSet, int questionId, boolean askQuestion)
      建構 OX 問答(是非題)活動的封包。

      序列化是否提問旗標、題庫組別與題號;客戶端據此顯示對應的 OX 題目。

      Parameters:
      questionSet - 題庫組別
      questionId - 題號
      askQuestion - true 表示提出問題,false 表示結束/不提問
      Returns:
      封包位元組陣列
    • showEventInstructions

      public static byte[] showEventInstructions()
      建構顯示 GM 活動說明(進場指示)的封包。
      Returns:
      封包位元組陣列
    • getPVPClock

      public static byte[] getPVPClock(int type, int time)
      建構 PVP 倒數時鐘的封包。

      時鐘類型固定為 3(附帶額外的 type 位元組),倒數秒數以 int 序列化。

      Parameters:
      type - PVP 時鐘子類型
      time - 倒數秒數(秒)
      Returns:
      封包位元組陣列
    • getClock

      public static byte[] getClock(int time)
      建構倒數計時時鐘的封包。

      時鐘類型固定為 2(以剩餘秒數倒數),秒數以 int 序列化。

      Parameters:
      time - 倒數秒數(秒)
      Returns:
      封包位元組陣列
    • getClockTime

      public static byte[] getClockTime(int hour, int min, int sec)
      建構顯示當前時間(時分秒)的時鐘封包。

      時鐘類型固定為 1(顯示絕對時間),分別序列化時、分、秒三個位元組。

      Parameters:
      hour - 時
      min - 分
      sec - 秒
      Returns:
      封包位元組陣列
    • boatEffect

      public static byte[] boatEffect(int effect)
      建構船艦(BOAT_EFFECT)特效的封包。

      以 short 序列化 effect(例如巴洛谷船艦動畫值)。

      Parameters:
      effect - 船艦特效值
      Returns:
      封包位元組陣列
    • boatGo

      public static byte[] boatGo()
      建構船艦啟航(BOAT_EFFECT, 效果 8/2)的封包。
      Returns:
      封包位元組陣列
    • boatBack

      public static byte[] boatBack()
      建構船艦回港(BOAT_MOVE, 效果 6/0)的封包。
      Returns:
      封包位元組陣列
    • boatPacket

      public static byte[] boatPacket(int effect, int mode)
      建構船艦移動(BOAT_MOVE)的封包。

      序列化 effectmode 兩個位元組以控制船艦動畫:

      • 效果 6 / 模式 0 —— 船回港
      • 效果 8 / 模式 2 —— 船啟航
      • 效果 10 / 模式 4 或 5 —— 出現 / 消失
      • 效果 12 / 模式 6 —— 船抵達
      Parameters:
      effect - 船艦動畫效果值
      mode - 動畫模式值
      Returns:
      封包位元組陣列
    • setBoatState

      public static byte[] setBoatState(int effect)
      建構設定船艦狀態(BOAT_STATE)的封包。

      序列化狀態 effect 後固定補上一個值為 1 的位元組。狀態 0/1/6 表示抵達,2/3/4/5 表示啟程。

      Parameters:
      effect - 船艦狀態值
      Returns:
      封包位元組陣列
    • stopClock

      public static byte[] stopClock()
      建構停止時鐘(STOP_CLOCK)的封包。

      由操作碼加上單一 00 位元組組成,使客戶端移除畫面上的倒數時鐘。

      Returns:
      封包位元組陣列
    • showAriantScoreBoard

      public static byte[] showAriantScoreBoard()
      建構顯示阿里安競技場記分板(ARIANT_SCOREBOARD)的封包。
      Returns:
      封包位元組陣列
    • sendPyramidUpdate

      public static byte[] sendPyramidUpdate(int amount)
      建構金字塔(古老的維那金字塔)進度更新的封包。
      Parameters:
      amount - 目前累計分數/數量
      Returns:
      封包位元組陣列
    • sendPyramidResult

      public static byte[] sendPyramidResult(byte rank, int amount)
      建構金字塔結算結果的封包。

      序列化評等 rank 與最終分數 amount

      Parameters:
      rank - 評等
      amount - 最終分數/數量
      Returns:
      封包位元組陣列
    • quickSlot

      public static byte[] quickSlot(String skil)
      建構快捷欄(QUICK_SLOT)設定的封包。

      skil 為以逗號分隔的 8 個整數字串;當為 null 時僅寫入旗標 0(請求客戶端回報快捷欄設定), 否則寫入旗標 1 並依序序列化 8 個快捷欄項目。

      Parameters:
      skil - 逗號分隔的 8 個快捷欄項目字串,或 null 表示請求回報
      Returns:
      封包位元組陣列
    • getMovingPlatforms

      public static byte[] getMovingPlatforms(MapleMap map)
      建構地圖移動平台(MOVE_PLATFORM)的封包。

      讀取 map 的所有 MapleNodes.MaplePlatform,逐一序列化其名稱、起點、SN 序列、 速度與座標範圍等資訊,使客戶端重現移動平台動畫。

      Parameters:
      map - 來源地圖,提供平台清單
      Returns:
      封包位元組陣列
    • sendPyramidKills

      public static byte[] sendPyramidKills(int amount)
      建構金字塔擊殺計數(PYRAMID_KILL_COUNT)的封包。
      Parameters:
      amount - 擊殺數量
      Returns:
      封包位元組陣列
    • sendPVPMaps

      public static byte[] sendPVPMaps()
      建構 PVP 地圖資訊(PVP_INFO)的封包。

      序列化每場最大人數與 20 張地圖的當前人數佔位,末端附上 PVP 1.5 活動標記。內容為固定佔位值。

      Returns:
      封包位元組陣列
    • gainForce

      public static byte[] gainForce(int oid, int count, int color)
      建構獲得能量(GAIN_FORCE)特效的封包。

      序列化來源物件 oid、能量數量與顏色,使客戶端對指定物件顯示能量增益動畫。

      Parameters:
      oid - 來源物件 ID
      count - 能量數量
      color - 能量顏色
      Returns:
      封包位元組陣列
    • achievementRatio

      public static byte[] achievementRatio(int amount)
      建構成就比率(ACHIEVEMENT_RATIO)更新的封包。
      Parameters:
      amount - 成就比率值
      Returns:
      封包位元組陣列
    • getPublicNPCInfo

      public static byte[] getPublicNPCInfo()
      建構公用 NPC 清單(PUBLIC_NPC,例如次元之鏡、怪物公園計程車等)的封包。

      讀取 GameConstants.publicNpcIdsGameConstants.publicNpcs,逐一序列化每個公用 NPC 的 名稱(空字串)、NPC ID、類型索引、所需等級與滑鼠移入時的說明文字。

      Returns:
      封包位元組陣列
    • getPublicNPCInfo2

      public static byte[] getPublicNPCInfo2()
      建構清空公用 NPC 清單(PUBLIC_NPC,數量 0)的封包。
      Returns:
      封包位元組陣列
    • spawnPlayerMapobject

      public static byte[] spawnPlayerMapobject(MapleCharacter chr)
      建構在地圖上生成其他玩家(SPAWN_PLAYER)的封包。

      為遠端用戶序列化完整的角色顯示資訊,包含角色 ID、等級、名稱、究極冒險者稱號、所屬公會名稱與徽章、 透過 SecondaryStat::DecodeForRemote 序列化的 buff 遮罩與數值、外觀、座標與動作、寵物、騎乘與 載具狀態等。從傳入的 chr 讀取大量角色狀態。

      Parameters:
      chr - 要生成的目標角色
      Returns:
      封包位元組陣列
    • removePlayerFromMap

      public static byte[] removePlayerFromMap(int cid)
      建構從地圖移除玩家(REMOVE_PLAYER_FROM_MAP)的封包。
      Parameters:
      cid - 要移除的角色 ID
      Returns:
      封包位元組陣列
    • getChatText

      public static byte[] getChatText(int cidfrom, String text, boolean whiteBG, int show)
      建構一般聊天訊息(CHATTEXT,角色頭頂氣泡)的封包。

      序列化發話者角色 ID、白底旗標、訊息文字與顯示模式。

      Parameters:
      cidfrom - 發話者角色 ID
      text - 訊息文字
      whiteBG - true 顯示為白底氣泡
      show - 顯示模式
      Returns:
      封包位元組陣列
    • getScrollEffect

      public static byte[] getScrollEffect(int chr, Equip.ScrollResult scrollSuccess, boolean legendarySpirit, boolean whiteScroll)
      建構卷軸捲動結果特效(SHOW_SCROLL_EFFECT)的封包。

      scrollSuccess 序列化結果碼(詛咒=2、成功=1、失敗=0),並附上傳說之靈旗標。

      Parameters:
      chr - 使用卷軸的角色 ID
      scrollSuccess - 卷軸結果(Equip.ScrollResult)
      legendarySpirit - 是否為傳說之靈技能捲動
      whiteScroll - 是否使用白色卷軸(防爆)
      Returns:
      封包位元組陣列
    • showMagnifyingEffect

      public static byte[] showMagnifyingEffect(int chr, short pos)
      建構放大鏡鑑定特效(SHOW_MAGNIFYING_EFFECT)的封包。
      Parameters:
      chr - 使用放大鏡的角色 ID
      pos - 被鑑定裝備的欄位位置
      Returns:
      封包位元組陣列
    • showPotentialReset

      public static byte[] showPotentialReset(boolean fireworks, int chr, boolean success, int itemid)
      建構潛在能力重設/煙火特效的封包。

      fireworks 選擇操作碼(SHOW_FIREWORKS_EFFECTSHOW_POTENTIAL_RESET), 並序列化成功旗標與道具 ID。

      Parameters:
      fireworks - true 使用煙火特效操作碼,false 使用潛在能力重設操作碼
      chr - 角色 ID
      success - 是否成功
      itemid - 使用的道具 ID
      Returns:
      封包位元組陣列
    • showNebuliteEffect

      public static byte[] showNebuliteEffect(int chr, boolean success)
      建構星岩(Nebulite)鑲嵌特效(SHOW_NEBULITE_EFFECT)的封包。

      序列化成功旗標,並附上對應的英文提示字串(成功/失敗)。

      Parameters:
      chr - 角色 ID
      success - 是否鑲嵌成功
      Returns:
      封包位元組陣列
    • useNebuliteFusion

      public static byte[] useNebuliteFusion(int cid, int itemId, boolean success)
      建構星岩融合特效(SHOW_FUSION_EFFECT)的封包。
      Parameters:
      cid - 角色 ID
      itemId - 融合產生的道具 ID
      success - 是否融合成功
      Returns:
      封包位元組陣列
    • pvpAttack

      public static byte[] pvpAttack(int cid, int playerLevel, int skill, int skillLevel, int speed, int mastery, int projectile, int attackCount, int chargeTime, int stance, int direction, int range, int linkSkill, int linkSkillLevel, boolean movementSkill, boolean pushTarget, boolean pullTarget, List<AttackPair> attack)
      建構 PVP 攻擊(PVP_ATTACK)的封包。

      序列化攻擊者角色 ID、等級、技能與等級、連結技能、方向與位移/拉扯旗標、動作、速度、熟練度、投射物、 蓄力時間、攻擊範圍,以及每個被攻擊目標(AttackPair)的物件 ID、座標與各段傷害值;傷害值超過 Integer.MAX_VALUE 時上限為 Integer.MAX_VALUE

      Parameters:
      cid - 攻擊者角色 ID
      playerLevel - 攻擊者等級
      skill - 技能 ID
      skillLevel - 技能等級
      speed - 攻擊速度
      mastery - 熟練度
      projectile - 投射物道具 ID
      attackCount - 攻擊次數
      chargeTime - 蓄力時間
      stance - 顯示動作
      direction - 攻擊方向
      range - 攻擊範圍
      linkSkill - 連結技能 ID(與 skill 不同時序列化)
      linkSkillLevel - 連結技能等級
      movementSkill - 是否為位移技能
      pushTarget - 是否擊退目標
      pullTarget - 是否拉近目標
      attack - 各目標與其傷害段的攻擊配對清單
      Returns:
      封包位元組陣列
    • getPVPMist

      public static byte[] getPVPMist(int cid, int mistSkill, int mistLevel, int damage)
      建構 PVP 毒霧/煙幕(PVP_MIST)的封包。

      序列化施放者角色 ID、煙幕技能與等級、傷害值,並附上固定的技能延遲與持續時間。

      Parameters:
      cid - 施放者角色 ID
      mistSkill - 煙幕技能 ID
      mistLevel - 煙幕技能等級
      damage - 每跳傷害值
      Returns:
      封包位元組陣列
    • pvpCool

      public static byte[] pvpCool(int cid, List<Integer> attack)
      建構 PVP 冷卻/連段(PVP_COOL)的封包。

      序列化施放者角色 ID 與一組整數清單(逐一以 int 寫入)。

      Parameters:
      cid - 施放者角色 ID
      attack - 整數清單
      Returns:
      封包位元組陣列
    • teslaTriangle

      public static byte[] teslaTriangle(int cid, int sum1, int sum2, int sum3)
      建構閃電/特斯拉三角(TESLA_TRIANGLE)召喚物的封包。

      序列化擁有者角色 ID 與三個召喚物物件 ID。

      Parameters:
      cid - 擁有者角色 ID
      sum1 - 第一個召喚物物件 ID
      sum2 - 第二個召喚物物件 ID
      sum3 - 第三個召喚物物件 ID
      Returns:
      封包位元組陣列
    • followEffect

      public static byte[] followEffect(int initiator, int replier, Point toMap)
      建構組隊跟隨(FOLLOW_EFFECT)特效的封包。

      序列化發起者與回應者角色 ID;當 replier 為 0(取消跟隨)時,依 toMap 是否為 null 決定是否附帶變更地圖的目標座標。

      Parameters:
      initiator - 發起跟隨的角色 ID
      replier - 回應跟隨的角色 ID,0 表示取消
      toMap - 取消跟隨時要移動到的座標,或 null 表示不變更
      Returns:
      封包位元組陣列
    • showPQReward

      public static byte[] showPQReward(int cid)
      建構顯示組隊任務(PQ)獎勵(SHOW_PQ_REWARD)的封包。

      序列化角色 ID 後寫入 6 個佔位位元組。

      Parameters:
      cid - 角色 ID
      Returns:
      封包位元組陣列
    • craftMake

      public static byte[] craftMake(int cid, int something, int time)
      建構專業技能製作中(CRAFT_EFFECT)特效的封包。
      Parameters:
      cid - 角色 ID
      something - 製作相關參數
      time - 製作所需時間
      Returns:
      封包位元組陣列
    • craftFinished

      public static byte[] craftFinished(int cid, int craftID, int ranking, int itemId, int quantity, int exp)
      建構專業技能製作完成(CRAFT_COMPLETE)的封包。

      序列化角色 ID、製作配方 ID、評等、產出道具 ID 與數量,以及獲得的經驗值。

      Parameters:
      cid - 角色 ID
      craftID - 製作配方 ID
      ranking - 製作評等
      itemId - 產出道具 ID
      quantity - 產出數量
      exp - 獲得的經驗值
      Returns:
      封包位元組陣列
    • harvestResult

      public static byte[] harvestResult(int cid, boolean success)
      建構採集結果(HARVESTED)的封包。
      Parameters:
      cid - 角色 ID
      success - 是否採集成功
      Returns:
      封包位元組陣列
    • playerDamaged

      public static byte[] playerDamaged(int cid, int dmg)
      建構玩家受傷(PLAYER_DAMAGED,例如地形/環境傷害)的封包。
      Parameters:
      cid - 角色 ID
      dmg - 傷害值
      Returns:
      封包位元組陣列
    • showPyramidEffect

      public static byte[] showPyramidEffect(int chr)
      建構奈特金字塔(NETT_PYRAMID)特效的封包。
      Parameters:
      chr - 角色 ID
      Returns:
      封包位元組陣列
    • pamsSongEffect

      public static byte[] pamsSongEffect(int cid)
      建構帕姆之歌(PAMS_SONG)特效的封包。
      Parameters:
      cid - 角色 ID
      Returns:
      封包位元組陣列
    • spawnDragon

      public static byte[] spawnDragon(MapleDragon d)
      建構生成龍(召喚師寵龍 / DRAGON_SPAWN)的封包。

      MapleDragon 讀取擁有者角色 ID、座標、動作與職業 ID 並序列化。

      Parameters:
      d - 龍物件
      Returns:
      封包位元組陣列
    • removeDragon

      public static byte[] removeDragon(int chrid)
      建構移除龍(DRAGON_REMOVE)的封包。
      Parameters:
      chrid - 龍擁有者的角色 ID
      Returns:
      封包位元組陣列
    • moveDragon

      public static byte[] moveDragon(MapleDragon d, Point startPos, List<LifeMovementFragment> moves)
      建構龍移動(DRAGON_MOVE)的封包。

      序列化擁有者角色 ID 與起始座標,並透過 PacketHelper.serializeMovementList(MaplePacketLittleEndianWriter, List) 寫入移動軌跡。

      Parameters:
      d - 龍物件
      startPos - 起始座標
      moves - 移動軌跡片段清單
      Returns:
      封包位元組陣列
    • spawnAndroid

      public static byte[] spawnAndroid(MapleCharacter cid, MapleAndroid android)
      建構生成機器人(Android / ANDROID_SPAWN)的封包。

      序列化擁有者角色 ID、機器人類型(由道具 ID 推算,1-4,公主型為 5)、座標、動作、髮型、臉型與名稱, 並逐一寫入機器人裝備欄(-1200 至 -1206)上的道具 ID。從傳入的 cid 讀取其機器人裝備欄。

      Parameters:
      cid - 擁有機器人的角色
      android - 機器人物件
      Returns:
      封包位元組陣列
    • moveAndroid

      public static byte[] moveAndroid(int cid, Point pos, List<LifeMovementFragment> res)
      建構機器人移動(ANDROID_MOVE)的封包。

      序列化擁有者角色 ID 與座標,並透過 PacketHelper.serializeMovementList(MaplePacketLittleEndianWriter, List) 寫入移動軌跡。

      Parameters:
      cid - 擁有者角色 ID
      pos - 起始座標
      res - 移動軌跡片段清單
      Returns:
      封包位元組陣列
    • showAndroidEmotion

      public static byte[] showAndroidEmotion(int cid, int animation)
      建構機器人表情動畫(ANDROID_EMOTION)的封包。
      Parameters:
      cid - 擁有者角色 ID
      animation - 表情動畫編號(例如 8 嘔吐、11 親吻、17 眨眼)
      Returns:
      封包位元組陣列
    • updateAndroidLook

      public static byte[] updateAndroidLook(int cid, short position, int itemId)
      建構更新機器人外觀(ANDROID_UPDATE,更換現金裝備)的封包。

      position 計算裝備欄旗標(1 << (|position| - 1200)),並序列化新的現金道具 ID。

      Parameters:
      cid - 擁有者角色 ID
      position - 機器人裝備欄位置
      itemId - 新的現金道具 ID
      Returns:
      封包位元組陣列
    • deactivateAndroid

      public static byte[] deactivateAndroid(int cid)
      建構停用機器人(Android)的封包。
      Parameters:
      cid - 角色 ID
      Returns:
      封包位元組陣列
    • removeAndroidHeart

      public static byte[] removeAndroidHeart()
      建構移除機器人愛心(狀態資訊)的封包。
      Returns:
      封包位元組陣列
    • removeFamiliar

      public static byte[] removeFamiliar(int cid)
      建構移除怪物寵物(Familiar)的封包。
      Parameters:
      cid - 角色 ID
      Returns:
      封包位元組陣列
    • spawnFamiliar

      public static byte[] spawnFamiliar(MonsterFamiliar mf, boolean spawn)
      建構生成或移除怪物寵物(Familiar)的封包。

      spawntrue 時,序列化該寵物的怪物 ID、疲勞值、最大疲勞值 (活力 × 300)、名稱、座標、站立方向與足板。

      Parameters:
      mf - 怪物寵物物件
      spawn - true 生成、false 移除
      Returns:
      封包位元組陣列
    • moveFamiliar

      public static byte[] moveFamiliar(int cid, Point startPos, List<LifeMovementFragment> moves)
      建構怪物寵物(Familiar)移動的封包。
      Parameters:
      cid - 角色 ID
      startPos - 起始座標
      moves - 移動片段清單
      Returns:
      封包位元組陣列
    • touchFamiliar

      public static byte[] touchFamiliar(int cid, byte unk, int objectid, int type, int delay, int damage)
      建構怪物寵物(Familiar)碰觸目標的封包。
      Parameters:
      cid - 角色 ID
      unk - 未知旗標
      objectid - 目標物件 ID
      type - 碰觸類型
      delay - 延遲
      damage - 傷害值
      Returns:
      封包位元組陣列
    • familiarAttack

      public static byte[] familiarAttack(int cid, byte unk, List<Triple<Integer, Integer, List<Integer>>> attackPair)
      建構怪物寵物(Familiar)攻擊的封包。

      逐一序列化每組攻擊對:目標物件 ID、攻擊資訊與多筆傷害值。

      Parameters:
      cid - 角色 ID
      unk - 未知旗標
      attackPair - 攻擊對清單(目標 ID、攻擊資訊、傷害值清單)
      Returns:
      封包位元組陣列
    • renameFamiliar

      public static byte[] renameFamiliar(MonsterFamiliar mf)
      建構重新命名怪物寵物(Familiar)的封包。
      Parameters:
      mf - 怪物寵物物件
      Returns:
      封包位元組陣列
    • updateFamiliar

      public static byte[] updateFamiliar(MonsterFamiliar mf)
      建構更新怪物寵物(Familiar)疲勞值的封包。

      序列化怪物 ID、疲勞值,以及依活力是否達 3 決定的時間戳記。

      Parameters:
      mf - 怪物寵物物件
      Returns:
      封包位元組陣列
    • movePlayer

      public static byte[] movePlayer(int cid, List<LifeMovementFragment> moves, Point startPos)
      建構其他玩家移動的封包。
      Parameters:
      cid - 角色 ID
      moves - 移動片段清單
      startPos - 起始座標
      Returns:
      封包位元組陣列
    • closeRangeAttack

      public static byte[] closeRangeAttack(int cid, int tbyte, int skill, int level, int display, byte speed, List<AttackPair> damage, boolean energy, int lvl, byte mastery, byte unk, int charge)
      建構近距離攻擊的封包。

      委派至 addAttackInfo(int, int, int, int, int, int, byte, List, int, byte, byte, int, Point, int):依 energy 旗標決定攻擊類型(能量 4 或近戰 0)。

      Parameters:
      cid - 攻擊者角色 ID
      tbyte - 攻擊目標數/方向位元組
      skill - 技能 ID(0 表示一般攻擊)
      level - 技能等級
      display - 顯示動作
      speed - 攻擊速度
      damage - 各目標的傷害對清單
      energy - 是否為能量攻擊
      lvl - 玩家等級
      mastery - 熟練度等級
      unk - 未知旗標
      charge - 蓄力值
      Returns:
      封包位元組陣列
    • rangedAttack

      public static byte[] rangedAttack(int cid, byte tbyte, int skill, int level, int display, byte speed, int itemid, List<AttackPair> damage, Point pos, int lvl, byte mastery, byte unk)
      建構遠距離(弓弩/投擲)攻擊的封包。

      委派至 addAttackInfo(int, int, int, int, int, int, byte, List, int, byte, byte, int, Point, int)(攻擊類型 1),並序列化使用的投射物 itemid 與座標。

      Parameters:
      cid - 攻擊者角色 ID
      tbyte - 攻擊目標數/方向位元組
      skill - 技能 ID(0 表示一般攻擊)
      level - 技能等級
      display - 顯示動作
      speed - 攻擊速度
      itemid - 投射物道具 ID
      damage - 各目標的傷害對清單
      pos - 攻擊座標
      lvl - 玩家等級
      mastery - 熟練度等級
      unk - 未知旗標
      Returns:
      封包位元組陣列
    • strafeAttack

      public static byte[] strafeAttack(int cid, byte tbyte, int skill, int level, int display, byte speed, int itemid, List<AttackPair> damage, Point pos, int lvl, byte mastery, byte unk, int ultLevel)
      建構掃射(Strafe)攻擊的封包。

      委派至 addAttackInfo(int, int, int, int, int, int, byte, List, int, byte, byte, int, Point, int)(攻擊類型 2),額外帶入終極技能等級 ultLevel

      Parameters:
      cid - 攻擊者角色 ID
      tbyte - 攻擊目標數/方向位元組
      skill - 技能 ID
      level - 技能等級
      display - 顯示動作
      speed - 攻擊速度
      itemid - 投射物道具 ID
      damage - 各目標的傷害對清單
      pos - 攻擊座標
      lvl - 玩家等級
      mastery - 熟練度等級
      unk - 未知旗標
      ultLevel - 終極技能等級
      Returns:
      封包位元組陣列
    • magicAttack

      public static byte[] magicAttack(int cid, int tbyte, int skill, int level, int display, byte speed, List<AttackPair> damage, int charge, int lvl, byte unk)
      建構魔法攻擊的封包。

      委派至 addAttackInfo(int, int, int, int, int, int, byte, List, int, byte, byte, int, Point, int)(攻擊類型 3),熟練度固定為 0,並帶入蓄力 charge

      Parameters:
      cid - 攻擊者角色 ID
      tbyte - 攻擊目標數/方向位元組
      skill - 技能 ID
      level - 技能等級
      display - 顯示動作
      speed - 攻擊速度
      damage - 各目標的傷害對清單
      charge - 蓄力值
      lvl - 玩家等級
      unk - 未知旗標
      Returns:
      封包位元組陣列
    • addAttackInfo

      public static byte[] addAttackInfo(int type, int cid, int tbyte, int skill, int level, int display, byte speed, List<AttackPair> damage, int lvl, byte mastery, byte unk, int charge, Point pos, int ultLevel)
      建構攻擊資訊封包(近戰/遠距/掃射/魔法/能量的共用底層組裝器)。

      type 選擇送出的攻擊 opcode(0=近戰、1=遠距、2=掃射、3=魔法、4=能量), 序列化攻擊者、技能、顯示動作、速度、熟練度,以及各目標物件 ID 與傷害清單; 遠距/掃射另附座標,魔法蓄力時附蓄力值。隕石術(4211006)採特殊傷害寫法, 且傷害一律以 Integer.MAX_VALUE 上限封頂(不會暴擊)。

      Parameters:
      type - 攻擊類型(0 近戰、1 遠距、2 掃射、3 魔法、4 能量)
      cid - 攻擊者角色 ID
      tbyte - 攻擊目標數/方向位元組
      skill - 技能 ID
      level - 技能等級
      display - 顯示動作
      speed - 攻擊速度
      damage - 各目標的傷害對清單
      lvl - 玩家等級
      mastery - 熟練度等級
      unk - 未知旗標
      charge - 蓄力值(遠距時為投射物道具 ID)
      pos - 攻擊座標(遠距/掃射用)
      ultLevel - 終極技能等級(掃射用)
      Returns:
      封包位元組陣列
    • skillEffect

      public static byte[] skillEffect(MapleCharacter from, int skillId, byte level, short display, byte unk)
      建構顯示他人技能特效的封包。
      Parameters:
      from - 施放技能的角色
      skillId - 技能 ID
      level - 技能等級
      display - 顯示動作
      unk - 未知旗標
      Returns:
      封包位元組陣列
    • skillCancel

      public static byte[] skillCancel(MapleCharacter from, int skillId)
      建構取消他人技能特效的封包。
      Parameters:
      from - 施放技能的角色
      skillId - 技能 ID
      Returns:
      封包位元組陣列
    • damagePlayer

      public static byte[] damagePlayer(int cid, int type, int damage, int monsteridfrom, byte direction, int skillid, int pDMG, boolean pPhysical, int pID, byte pType, Point pPos, byte offset, int offset_d, int fake)
      建構玩家受到傷害的封包。

      序列化受傷角色、傷害類型與數值、攻擊來源怪物與方向;若帶有反射傷害(pDMG) 則附上反射的物理/魔法旗標、來源 ID 與座標;offset==1 時附偏移傷害, 傷害值 ≤ 0 或為假傷害時補寫 fake

      Parameters:
      cid - 受傷角色 ID
      type - 傷害類型
      damage - 傷害數值
      monsteridfrom - 攻擊來源怪物 ID
      direction - 受擊方向
      skillid - 怪物技能 ID
      pDMG - 反射傷害值
      pPhysical - 反射傷害是否為物理
      pID - 反射來源 ID
      pType - 反射類型
      pPos - 反射來源座標
      offset - 偏移旗標
      offset_d - 偏移傷害值
      fake - 假傷害值
      Returns:
      封包位元組陣列
    • facialExpression

      public static byte[] facialExpression(MapleCharacter from, int expression)
      建構顯示角色表情的封包。
      Parameters:
      from - 做表情的角色
      expression - 表情 ID
      Returns:
      封包位元組陣列
    • itemEffect

      public static byte[] itemEffect(int characterid, int itemid)
      建構顯示角色道具特效的封包。
      Parameters:
      characterid - 角色 ID
      itemid - 道具 ID
      Returns:
      封包位元組陣列
    • showTitle

      public static byte[] showTitle(int characterid, int itemid)
      建構顯示角色稱號的封包。
      Parameters:
      characterid - 角色 ID
      itemid - 稱號道具 ID
      Returns:
      封包位元組陣列
    • showChair

      public static byte[] showChair(int characterid, int itemid)
      建構顯示角色坐椅的封包。
      Parameters:
      characterid - 角色 ID
      itemid - 坐椅道具 ID
      Returns:
      封包位元組陣列
    • updateCharLook

      public static byte[] updateCharLook(MapleCharacter chr)
      建構更新角色外觀的封包。

      透過 PacketHelper.addCharLook(MaplePacketLittleEndianWriter, MapleCharacterLook, boolean) 序列化外觀,並附上角色三類戒指 (友誼/結婚/水晶)資訊。讀取該角色當前遊戲狀態。

      Parameters:
      chr - 目標角色
      Returns:
      封包位元組陣列
    • updatePartyMemberHP

      public static byte[] updatePartyMemberHP(int cid, int curhp, int maxhp)
      建構更新組隊成員 HP 的封包。
      Parameters:
      cid - 組隊成員角色 ID
      curhp - 目前 HP
      maxhp - 最大 HP
      Returns:
      封包位元組陣列
    • loadGuildName

      public static byte[] loadGuildName(MapleCharacter chr)
      建構載入角色公會名稱的封包。

      讀取遊戲狀態:無公會時寫入空字串,否則由 World.Guild 取出公會名稱。

      Parameters:
      chr - 目標角色
      Returns:
      封包位元組陣列
    • loadGuildIcon

      public static byte[] loadGuildIcon(MapleCharacter chr)
      建構載入角色公會徽章(圖示)的封包。

      讀取遊戲狀態:無公會時寫入 6 個零位元組,否則由 World.Guild 取出徽章背景、 背景顏色、前景圖示與前景顏色。

      Parameters:
      chr - 目標角色
      Returns:
      封包位元組陣列
    • changeTeam

      public static byte[] changeTeam(int cid, int type)
      建構變更隊伍(紅/藍方)的封包。
      Parameters:
      cid - 角色 ID
      type - 隊伍類型
      Returns:
      封包位元組陣列
    • showHarvesting

      public static byte[] showHarvesting(int cid, int tool)
      建構顯示採集(挖礦/採藥)動作的封包。
      Parameters:
      cid - 角色 ID
      tool - 採集工具道具 ID(大於 0 時更新工具與時間)
      Returns:
      封包位元組陣列
    • getPVPHPBar

      public static byte[] getPVPHPBar(int cid, int hp, int maxHp)
      建構 PVP HP 條的封包。
      Parameters:
      cid - 角色 ID
      hp - 目前 HP
      maxHp - 最大 HP
      Returns:
      封包位元組陣列
    • cancelChair

      public static byte[] cancelChair(int id)
      建構取消/切換坐椅的封包。

      id == -1 表示起身(寫入 0),否則寫入 1 與坐椅 ID。

      Parameters:
      id - 坐椅 ID,-1 表示起身
      Returns:
      封包位元組陣列
    • instantMapWarp

      public static byte[] instantMapWarp(byte portal)
      建構同地圖瞬間傳送(切換傳送點)的封包。
      Parameters:
      portal - 目標傳送點編號
      Returns:
      封包位元組陣列
    • updateQuestInfo

      public static byte[] updateQuestInfo(MapleCharacter c, int quest, int npc, byte progress)
      建構更新任務資訊(進度)的封包。
      Parameters:
      c - 目標角色
      quest - 任務 ID
      npc - 關聯 NPC ID
      progress - 進度代碼
      Returns:
      封包位元組陣列
    • updateQuestFinish

      public static byte[] updateQuestFinish(int quest, int npc, int nextquest)
      建構任務完成的封包(進度代碼固定為 10)。
      Parameters:
      quest - 完成的任務 ID
      npc - 關聯 NPC ID
      nextquest - 後續任務 ID
      Returns:
      封包位元組陣列
    • sendHint

      public static byte[] sendHint(String hint, int width, int height)
      建構顯示提示氣泡(Hint)的封包。

      width 小於 1 時依文字長度自動計算(最小 40),height 最小為 5。

      Parameters:
      hint - 提示文字
      width - 氣泡寬度(小於 1 時自動計算)
      height - 氣泡高度(小於 5 時設為 5)
      Returns:
      封包位元組陣列
    • testCombo

      public static byte[] testCombo(int value)
      建構設定阿藍(Aran)連擊數的封包。
      Parameters:
      value - 連擊數
      Returns:
      封包位元組陣列
    • rechargeCombo

      public static byte[] rechargeCombo(int value)
      建構阿藍(Aran)連擊充能的封包。
      Parameters:
      value - 連擊數
      Returns:
      封包位元組陣列
    • getFollowMessage

      public static byte[] getFollowMessage(String msg)
      建構跟隨(Follow)系統訊息的封包。

      委派至 getGameMessage(String, boolean),以白色文字顯示。

      Parameters:
      msg - 訊息文字
      Returns:
      封包位元組陣列
    • getGameMessage

      public static byte[] getGameMessage(String msg, boolean white)
      建構遊戲系統訊息的封包(白色或暗紅色)。

      委派至 getGameMessage(int, String),whitetrue 用顏色 11(白), 否則用顏色 6(配偶/暗紅)。

      Parameters:
      msg - 訊息文字
      white - true 白色、false 暗紅色
      Returns:
      封包位元組陣列
    • getGameMessage

      public static byte[] getGameMessage(int colour, String msg)
      建構指定顏色的遊戲系統訊息封包。

      顏色代碼對應聊天頻道色:0 一般、6 配偶(暗紅)、8 黃、10 藍、11 白、12 紅、13 淺藍 等。

      Parameters:
      colour - 顏色代碼
      msg - 訊息文字
      Returns:
      封包位元組陣列
    • getBuffZoneEffect

      public static byte[] getBuffZoneEffect(int itemId)
      建構增益區域(Buff Zone)特效的封包。
      Parameters:
      itemId - 取自 WZ 「spec」的道具 ID
      Returns:
      封包位元組陣列
    • getTimeBombAttack

      public static byte[] getTimeBombAttack()
      建構定時炸彈攻擊的封包(固定彈飛距離與受傷值)。
      Returns:
      封包位元組陣列
    • moveFollow

      public static byte[] moveFollow(Point otherStart, Point myStart, Point otherEnd, List<LifeMovementFragment> moves)
      建構跟隨(Follow)移動同步的封包。
      Parameters:
      otherStart - 對方起始座標
      myStart - 自己起始座標
      otherEnd - 對方結束座標
      moves - 移動片段清單
      Returns:
      封包位元組陣列
    • getFollowMsg

      public static byte[] getFollowMsg(int opcode)
      建構跟隨(Follow)狀態訊息的封包。
      Parameters:
      opcode - 跟隨狀態代碼(5 表示已取消請求)
      Returns:
      封包位元組陣列
    • registerFamiliar

      public static byte[] registerFamiliar(MonsterFamiliar mf)
      建構登錄怪物寵物(Familiar)的封包。

      序列化寵物 ID 與登錄資料,並依活力是否達 3 標示其啟用狀態。

      Parameters:
      mf - 怪物寵物物件
      Returns:
      封包位元組陣列
    • createUltimate

      public static byte[] createUltimate(int amount)
      建構製作終極技能書(Ultimate)結果的封包。
      Parameters:
      amount - 結果代碼(2 無欄位、1 成功、0 失敗)
      Returns:
      封包位元組陣列
    • harvestMessage

      public static byte[] harvestMessage(int oid, int msg)
      建構採集結果訊息的封包。
      Parameters:
      oid - 採集物件 ID
      msg - 訊息代碼
      Returns:
      封包位元組陣列
    • openBag

      public static byte[] openBag(int index, int itemId, boolean firstTime)
      建構開啟道具袋(Bag)的封包。
      Parameters:
      index - 道具袋索引
      itemId - 道具袋道具 ID
      firstTime - 是否為首次開啟
      Returns:
      封包位元組陣列
    • dragonBlink

      public static byte[] dragonBlink(int portalId)
      建構龍之瞬移(Dragon Blink)特效的封包。
      Parameters:
      portalId - 傳送點 ID
      Returns:
      封包位元組陣列
    • getPVPIceGage

      public static byte[] getPVPIceGage(int score)
      建構 PVP 冰凍量表(Ice Gage)的封包。
      Parameters:
      score - 量表分數
      Returns:
      封包位元組陣列
    • skillCooldown

      public static byte[] skillCooldown(int sid, int time)
      建構技能冷卻時間的封包。
      Parameters:
      sid - 技能 ID
      time - 冷卻時間(秒)
      Returns:
      封包位元組陣列
    • dropItemFromMapObject

      public static byte[] dropItemFromMapObject(MapleMapItem drop, Point dropfrom, Point dropto, byte mod)
      建構地圖物件掉落道具的封包。

      序列化掉落動畫模式、物件 ID、是否為金錢、道具 ID、擁有者與掉落歸屬類型,以及起訖座標; 道具(非金錢)時附到期時間,並標示是否可由寵物拾取。讀取該掉落物的遊戲狀態。

      Parameters:
      drop - 地圖掉落物件
      dropfrom - 掉落起點座標
      dropto - 掉落終點座標
      mod - 掉落動畫模式(1 有動畫、2 無動畫、3/4 消失型道具)
      Returns:
      封包位元組陣列
    • explodeDrop

      public static byte[] explodeDrop(int oid)
      建構地圖掉落物以「爆裂」方式消失的封包。

      使用 REMOVE_ITEM_FROM_MAP opcode,動畫類型固定為 4(爆裂), 寫入掉落物的物件 ID 並附帶固定的延遲值 655。常用於拾取範圍外的炸彈型掉落。

      Parameters:
      oid - 目標掉落物的物件 ID
      Returns:
      封包位元組陣列
    • removeItemFromMap

      public static byte[] removeItemFromMap(int oid, int animation, int cid)
      建構移除地圖掉落物的封包(便捷多載,slot 預設為 0)。

      等同呼叫 removeItemFromMap(int, int, int, int) 並以 0 帶入 slot

      Parameters:
      oid - 目標掉落物的物件 ID
      animation - 移除動畫類型(0=逾時消失、1=無動畫、2=玩家拾取、4=爆裂、5=寵物拾取)
      cid - 拾取者的角色 ID(animation >= 2 時寫入)
      Returns:
      封包位元組陣列
    • removeItemFromMap

      public static byte[] removeItemFromMap(int oid, int animation, int cid, int slot)
      建構移除地圖掉落物的封包。

      使用 REMOVE_ITEM_FROM_MAP opcode,寫入移除動畫類型與物件 ID;當 animation >= 2(拾取類)時另寫入拾取者角色 ID,並在 animation == 5 (寵物拾取)時再寫入寵物道具欄位。

      Parameters:
      oid - 目標掉落物的物件 ID
      animation - 移除動畫類型(0=逾時消失、1=無動畫、2=玩家拾取、4=爆裂、5=寵物拾取)
      cid - 拾取者的角色 ID(animation >= 2 時寫入)
      slot - 寵物拾取時使用的寵物道具欄位(animation == 5 時寫入)
      Returns:
      封包位元組陣列
    • spawnMist

      public static byte[] spawnMist(MapleMist mist)
      建構在地圖上生成毒霧 / 範圍霧區的封包。

      使用 SPAWN_MIST opcode,寫入霧區物件 ID、霧區類型(怪物霧、毒霧或恢復光環)、 擁有者 ID、來源技能 ID(玩家技能或怪物技能)、技能等級、生效延遲、覆蓋矩形範圍與生成座標。 霧區的各項屬性皆讀取自傳入的 MapleMist 狀態。

      Parameters:
      mist - 目標霧區實體,提供物件 ID、類型、擁有者、技能、範圍與座標
      Returns:
      封包位元組陣列
    • removeMist

      public static byte[] removeMist(int oid, boolean eruption)
      建構移除地圖霧區的封包。

      使用 REMOVE_MIST opcode,寫入霧區物件 ID 與是否為「爆發式」消失旗標。

      Parameters:
      oid - 目標霧區的物件 ID
      eruption - true 表示以爆發動畫消失,false 表示一般消失
      Returns:
      封包位元組陣列
    • spawnDoor

      public static byte[] spawnDoor(int oid, Point pos, boolean animation)
      建構在地圖上生成傳送門(牧師「天堂之門」)的封包。

      使用 SPAWN_DOOR opcode,依 animation 旗標寫入動畫旗標 (顯示動畫時為 0,否則為 1),接著寫入門的物件 ID 與生成座標。

      Parameters:
      oid - 傳送門的物件 ID
      pos - 傳送門的生成座標
      animation - true 表示顯示生成動畫,false 表示直接出現
      Returns:
      封包位元組陣列
    • removeDoor

      public static byte[] removeDoor(int oid, boolean animation)
      建構移除傳送門的封包。

      使用 REMOVE_DOOR opcode,依 animation 旗標寫入動畫旗標 (顯示動畫時為 0,否則為 1)與門的物件 ID。

      Parameters:
      oid - 傳送門的物件 ID
      animation - true 表示顯示消失動畫,false 表示直接移除
      Returns:
      封包位元組陣列
    • spawnMechDoor

      public static byte[] spawnMechDoor(MechDoor md, boolean animated)
      建構在地圖上生成機械師傳送門的封包。

      使用 MECH_DOOR_SPAWN opcode,依 animated 旗標寫入動畫旗標, 接著寫入擁有者 ID、真實座標、門 ID 與隊伍 ID,相關屬性皆讀取自 MechDoor

      Parameters:
      md - 目標機械門實體,提供擁有者 ID、座標、門 ID 與隊伍 ID
      animated - true 表示顯示生成動畫,false 表示直接出現
      Returns:
      封包位元組陣列
    • removeMechDoor

      public static byte[] removeMechDoor(MechDoor md, boolean animated)
      建構移除機械師傳送門的封包。

      使用 MECH_DOOR_REMOVE opcode,依 animated 旗標寫入動畫旗標, 接著寫入擁有者 ID 與門 ID(皆取自 MechDoor)。

      Parameters:
      md - 目標機械門實體,提供擁有者 ID 與門 ID
      animated - true 表示顯示消失動畫,false 表示直接移除
      Returns:
      封包位元組陣列
    • spawnKiteError

      public static byte[] spawnKiteError()
      建構風箏生成失敗提示的封包。

      使用 SPAWN_KITE_ERROR opcode,封包僅含 opcode 本身(無額外酬載), 用於通知客戶端風箏無法在當前位置放置。

      Returns:
      封包位元組陣列
    • spawnKite

      public static byte[] spawnKite(int oid, int itemId, String message, String name, Point pos)
      建構在地圖上生成風箏的封包。

      使用 SPAWN_KITE opcode,寫入風箏的物件 ID、道具 ID、留言字串、 放置者名稱與生成座標。

      Parameters:
      oid - 風箏的物件 ID
      itemId - 風箏的道具 ID
      message - 風箏上顯示的留言字串
      name - 放置風箏的角色名稱
      pos - 風箏的生成座標
      Returns:
      封包位元組陣列
    • destroyKite

      public static byte[] destroyKite(int oid, boolean animation)
      建構移除風箏的封包。

      使用 DESTROY_KITE opcode,依 animation 旗標寫入動畫旗標 (顯示動畫時為 0,否則為 1)與風箏的物件 ID。

      Parameters:
      oid - 風箏的物件 ID
      animation - true 表示顯示消失動畫,false 表示直接移除
      Returns:
      封包位元組陣列
    • triggerReactor

      public static byte[] triggerReactor(MapleReactor reactor, int stance)
      建構反應爐被擊中時改變狀態的封包。

      使用 REACTOR_HIT opcode,寫入反應爐的物件 ID、當前狀態、真實座標與擊中姿態, 各項屬性皆讀取自 MapleReactor

      Parameters:
      reactor - 目標反應爐實體,提供物件 ID、狀態與座標
      stance - 擊中反應爐的姿態值
      Returns:
      封包位元組陣列
    • spawnReactor

      public static byte[] spawnReactor(MapleReactor reactor)
      建構在地圖上生成反應爐的封包。

      使用 REACTOR_SPAWN opcode,寫入反應爐的物件 ID、反應爐 ID、當前狀態、 真實座標、朝向(姿態)與名稱,各項屬性皆讀取自 MapleReactor

      Parameters:
      reactor - 目標反應爐實體,提供物件 ID、反應爐 ID、狀態、座標、朝向與名稱
      Returns:
      封包位元組陣列
    • destroyReactor

      public static byte[] destroyReactor(MapleReactor reactor)
      建構移除反應爐的封包。

      使用 REACTOR_DESTROY opcode,寫入反應爐的物件 ID、當前狀態與座標, 各項屬性皆讀取自 MapleReactor

      Parameters:
      reactor - 目標反應爐實體,提供物件 ID、狀態與座標
      Returns:
      封包位元組陣列
    • makeExtractor

      public static byte[] makeExtractor(int cid, String cname, Point pos, int timeLeft, int itemId, int fee)
      建構在地圖上生成採集器(萃取機)的封包。

      使用 SPAWN_EXTRACTOR opcode,寫入擁有者角色 ID、擁有者名稱、放置座標的 X / Y、剩餘時間、採集器道具 ID 與所需費用。

      Parameters:
      cid - 採集器擁有者的角色 ID
      cname - 採集器擁有者的角色名稱
      pos - 採集器的放置座標
      timeLeft - 採集器的剩餘時間
      itemId - 採集器的道具 ID
      fee - 使用採集器所需的費用
      Returns:
      封包位元組陣列
    • removeExtractor

      public static byte[] removeExtractor(int cid)
      建構移除採集器(萃取機)的封包。

      使用 REMOVE_EXTRACTOR opcode,寫入擁有者角色 ID 與固定的動畫旗標 1

      Parameters:
      cid - 採集器擁有者的角色 ID
      Returns:
      封包位元組陣列
    • rollSnowball

      public static byte[] rollSnowball(int type, MapleSnowball.MapleSnowballs ball1, MapleSnowball.MapleSnowballs ball2)
      建構雪球滾動 / 狀態更新的封包(雪球大戰小遊戲)。

      使用 ROLL_SNOWBALL opcode,寫入動作類型,並依兩顆雪球的雪人 HP (除以 75 換算進度)與位置寫入兩隊的雪球狀態,最後補上固定的填充位元組。

      Parameters:
      type - 雪球動作類型(0=一般、1=由起點滾向終點、2=向下消失、3=向上消失、4=移動)
      ball1 - 下方隊伍的雪球實體,null 時以 0 帶入
      ball2 - 上方隊伍的雪球實體,null 時以 0 帶入
      Returns:
      封包位元組陣列
    • enterSnowBall

      public static byte[] enterSnowBall()
      建構進入雪球大戰地圖時的初始雪球狀態封包(便捷多載)。

      等同呼叫 rollSnowball(int, MapleSnowballs, MapleSnowballs) 並以動作類型 0(一般)、兩顆雪球皆為 null 帶入。

      Returns:
      封包位元組陣列
    • hitSnowBall

      public static byte[] hitSnowBall(int team, int damage, int distance, int delay)
      建構雪球被擊中(推退)的封包(雪球大戰小遊戲)。

      使用 HIT_SNOWBALL opcode,寫入受擊隊伍、傷害值、推退距離與延遲。

      Parameters:
      team - 受擊的隊伍(0=下方、1=上方)
      damage - 對雪球造成的傷害值
      distance - 雪球被推退的距離
      delay - 效果延遲
      Returns:
      封包位元組陣列
    • snowballMessage

      public static byte[] snowballMessage(int team, int message)
      建構雪球大戰系統訊息的封包。

      使用 SNOWBALL_MESSAGE opcode,寫入相關隊伍與訊息代碼, 用於通知客戶端顯示對應的雪球大戰提示訊息。

      Parameters:
      team - 相關隊伍(0=下方、1=上方)
      message - 訊息代碼
      Returns:
      封包位元組陣列
    • leftKnockBack

      public static byte[] leftKnockBack()
      建構向左擊退效果的封包。

      使用 LEFT_KNOCK_BACK opcode,封包僅含 opcode 本身(無額外酬載)。

      Returns:
      封包位元組陣列
    • hitCoconut

      public static byte[] hitCoconut(boolean spawn, int id, int type)
      建構椰子被擊中 / 生成的封包(椰子大戰小遊戲)。

      使用 HIT_COCONUT opcode,當 spawntrue(生成)時寫入固定值 0x8000 與動作 0;否則寫入椰子物件 ID 與動作類型。

      Parameters:
      spawn - true 表示生成椰子,false 表示椰子被擊中
      id - 椰子的物件 ID(非生成時使用)
      type - 椰子的動作類型(非生成時使用)
      Returns:
      封包位元組陣列
    • coconutScore

      public static byte[] coconutScore(int[] coconutscore)
      建構更新椰子大戰雙方比分的封包。

      使用 COCONUT_SCORE opcode,依序寫入兩隊的分數 (coconutscore[0]coconutscore[1])。

      Parameters:
      coconutscore - 長度為 2 的分數陣列,索引 0 / 1 分別為兩隊分數
      Returns:
      封包位元組陣列
    • updateAriantScore

      public static byte[] updateAriantScore(String name, int score, boolean empty)
      建構更新阿利安特競技場單一玩家分數的封包。

      使用 ARIANT_SCORE_UPDATE opcode,寫入是否為空白旗標;當 emptyfalse 時,另寫入玩家名稱與分數。

      Parameters:
      name - 玩家名稱(emptyfalse 時寫入)
      score - 玩家分數(emptyfalse 時寫入)
      empty - true 表示空白項(不寫入名稱與分數),false 表示寫入玩家資料
      Returns:
      封包位元組陣列
    • updateAriantScore

      public static byte[] updateAriantScore(List<MapleCharacter> players)
      建構更新阿利安特競技場全體玩家分數列表的封包。

      使用 ARIANT_SCORE_UPDATE opcode,寫入玩家數量後逐一寫入各玩家名稱與固定分數 0(初始化用)。

      Parameters:
      players - 參賽玩家列表,逐一序列化其角色名稱
      Returns:
      封包位元組陣列
    • sheepRanchInfo

      public static byte[] sheepRanchInfo(byte wolf, byte sheep)
      建構更新綿羊牧場狼 / 羊數量的封包。

      使用 SHEEP_RANCH_INFO opcode,依序寫入狼與羊的數量。

      Parameters:
      wolf - 當前狼的數量
      sheep - 當前羊的數量
      Returns:
      封包位元組陣列
    • sheepRanchClothes

      public static byte[] sheepRanchClothes(int cid, byte clothes)
      建構設定綿羊牧場玩家裝扮(陣營)的封包。

      使用 SHEEP_RANCH_CLOTHES opcode,寫入角色 ID 與裝扮類型。

      Parameters:
      cid - 目標玩家的角色 ID
      clothes - 裝扮類型(0=羊、1=狼、2=旁觀者,即無羊毛的狼)
      Returns:
      封包位元組陣列
    • updateWitchTowerKeys

      public static byte[] updateWitchTowerKeys(int keys)
      建構更新女巫之塔鑰匙數量的封包。

      使用 WITCH_TOWER opcode,寫入當前鑰匙數量。

      Parameters:
      keys - 當前持有的鑰匙數量
      Returns:
      封包位元組陣列
    • showChaosZakumShrine

      public static byte[] showChaosZakumShrine(boolean spawned, int time)
      建構顯示混沌炎魔祭壇狀態的封包。

      使用 CHAOS_ZAKUM_SHRINE opcode,寫入是否已生成旗標與剩餘時間。

      Parameters:
      spawned - true 表示祭壇 Boss 已生成,false 表示未生成
      time - 祭壇的剩餘時間
      Returns:
      封包位元組陣列
    • showChaosHorntailShrine

      public static byte[] showChaosHorntailShrine(boolean spawned, int time)
      建構顯示混沌闇黑龍王祭壇狀態的封包(便捷多載)。

      等同呼叫 showHorntailShrine(boolean, int),即使用同一 HORNTAIL_SHRINE opcode。

      Parameters:
      spawned - true 表示祭壇 Boss 已生成,false 表示未生成
      time - 祭壇的剩餘時間
      Returns:
      封包位元組陣列
    • showHorntailShrine

      public static byte[] showHorntailShrine(boolean spawned, int time)
      建構顯示闇黑龍王祭壇狀態的封包。

      使用 HORNTAIL_SHRINE opcode,寫入是否已生成旗標與剩餘時間。

      Parameters:
      spawned - true 表示祭壇 Boss 已生成,false 表示未生成
      time - 祭壇的剩餘時間
      Returns:
      封包位元組陣列
    • getRPSMode

      public static byte[] getRPSMode(byte mode, int mesos, int selection, int answer)
      建構剪刀石頭布小遊戲各階段狀態的封包。

      使用 RPS_GAME opcode,先寫入模式,再依模式寫入對應酬載:

      • 6(楓幣不足):當 mesos != -1 時寫入楓幣數
      • 8(開啟 NPC):寫入固定 NPC ID 9000019
      • 11(出拳對戰結果):寫入玩家選擇與對手答案
      Parameters:
      mode - 遊戲模式 / 階段代碼
      mesos - 楓幣數(模式 6 且不為 -1 時寫入)
      selection - 玩家的出拳選擇(模式 11 時寫入)
      answer - 對手的答案(模式 11 時寫入,0xFF 或與選擇相同代表落敗)
      Returns:
      封包位元組陣列
    • messengerInvite

      public static byte[] messengerInvite(String from, int messengerid)
      建構傳送頻道(Messenger)邀請通知的封包。

      使用 MESSENGER opcode,子類型 3(邀請),寫入邀請者名稱與傳送頻道 ID。

      Parameters:
      from - 發出邀請的玩家名稱
      messengerid - 傳送頻道(聊天室)ID
      Returns:
      封包位元組陣列
    • addMessengerPlayer

      public static byte[] addMessengerPlayer(String from, MapleCharacter chr, int position, int channel)
      建構傳送頻道中加入新成員的封包。

      使用 MESSENGER opcode,子類型 0(加入),寫入成員欄位位置,並委由 PacketHelper.addCharLook(MaplePacketLittleEndianWriter, MapleCharacterLook, boolean) 序列化角色外觀,最後寫入成員名稱與所在頻道。

      Parameters:
      from - 加入成員的角色名稱
      chr - 加入成員的角色實體,提供外觀資料
      position - 成員在傳送頻道中的欄位位置
      channel - 成員所在的頻道
      Returns:
      封包位元組陣列
    • removeMessengerPlayer

      public static byte[] removeMessengerPlayer(int position)
      建構傳送頻道中移除成員的封包。

      使用 MESSENGER opcode,子類型 2(離開),寫入欲移除成員的欄位位置。

      Parameters:
      position - 欲移除成員在傳送頻道中的欄位位置
      Returns:
      封包位元組陣列
    • updateMessengerPlayer

      public static byte[] updateMessengerPlayer(String from, MapleCharacter chr, int position, int channel)
      建構更新傳送頻道既有成員資料的封包。

      使用 MESSENGER opcode,子類型 7(更新),寫入成員欄位位置,並委由 PacketHelper.addCharLook(MaplePacketLittleEndianWriter, MapleCharacterLook, boolean) 序列化角色外觀,最後寫入成員名稱與所在頻道。

      Parameters:
      from - 成員的角色名稱
      chr - 成員的角色實體,提供外觀資料
      position - 成員在傳送頻道中的欄位位置
      channel - 成員所在的頻道
      Returns:
      封包位元組陣列
    • joinMessenger

      public static byte[] joinMessenger(int position)
      建構自身加入傳送頻道時的封包。

      使用 MESSENGER opcode,子類型 1(自身加入),寫入自身被指派的欄位位置。

      Parameters:
      position - 自身在傳送頻道中的欄位位置
      Returns:
      封包位元組陣列
    • messengerChat

      public static byte[] messengerChat(String charname, String text)
      建構傳送頻道聊天訊息的封包。

      使用 MESSENGER opcode,子類型 6(聊天),寫入發話者名稱與聊天內容。

      Parameters:
      charname - 發話者的角色名稱
      text - 聊天訊息內容
      Returns:
      封包位元組陣列
    • messengerNote

      public static byte[] messengerNote(String text, int mode, int mode2)
      建構傳送頻道系統提示(如成員上 / 下線)的封包。

      使用 MESSENGER opcode,以 mode 作為子類型寫入,接著寫入提示文字與 附帶旗標 mode2

      Parameters:
      text - 提示文字(通常為相關角色名稱)
      mode - 子類型代碼
      mode2 - 附帶旗標
      Returns:
      封包位元組陣列
    • removeItemFromDuey

      public static byte[] removeItemFromDuey(boolean remove, int Package)
      建構從快遞(Duey)移除包裹的封包。

      使用 DUEY opcode,子類型 0x18,寫入包裹 ID 與結果旗標 (removetrue 時寫入 3,否則 4)。

      Parameters:
      remove - true 表示成功移除包裹,false 表示其他結果
      Package - 目標包裹 ID
      Returns:
      封包位元組陣列
    • sendDuey

      public static byte[] sendDuey(byte operation, List<MapleDueyActions> packages)
      建構快遞(Duey)各操作狀態的封包。

      使用 DUEY opcode,先寫入操作碼,再依操作碼寫入對應酬載:

      Parameters:
      operation - 快遞操作碼
      packages - 快遞包裹列表(操作碼 10 時逐一序列化)
      Returns:
      封包位元組陣列
    • getKeymap

      public static byte[] getKeymap(MapleKeyLayout layout)
      建構同步角色快捷鍵配置(Keymap)的封包。

      使用 KEYMAP opcode,委由 MapleKeyLayout.writeData(MaplePacketLittleEndianWriter) 將完整快捷鍵 配置寫入封包。

      Parameters:
      layout - 角色的快捷鍵配置,負責序列化按鍵綁定資料
      Returns:
      封包位元組陣列
    • petAutoHP

      public static byte[] petAutoHP(int itemId)
      建構設定寵物自動補血藥水的封包。

      使用 PET_AUTO_HP opcode,寫入指定的補血藥水道具 ID。

      Parameters:
      itemId - 自動補血所用藥水的道具 ID
      Returns:
      封包位元組陣列
    • petAutoMP

      public static byte[] petAutoMP(int itemId)
      建構設定寵物自動補魔藥水的封包。

      使用 PET_AUTO_MP opcode,寫入指定的補魔藥水道具 ID。

      Parameters:
      itemId - 自動補魔所用藥水的道具 ID
      Returns:
      封包位元組陣列
    • petAutoCure

      public static byte[] petAutoCure(int itemId)
      建構設定寵物自動解除異常狀態藥水的封包。

      使用 PET_AUTO_CURE opcode,寫入指定的解除異常狀態藥水道具 ID。

      Parameters:
      itemId - 自動解除異常狀態所用藥水的道具 ID
      Returns:
      封包位元組陣列
    • addRingInfo

      public static void addRingInfo(MaplePacketLittleEndianWriter mplew, List<MapleRing> rings)
      將戒指清單資訊寫入指定封包寫入器。

      先寫入戒指數量,再逐一寫入每只戒指的固定旗標 1、戒指 ID、配對戒指 ID 與道具 ID。 此為輔助方法,供其他封包建構器組裝角色 / 道具資訊時呼叫。

      Parameters:
      mplew - 目標封包寫入器,戒指資料將寫入其中
      rings - 欲序列化的戒指清單
    • addMRingInfo

      public static void addMRingInfo(MaplePacketLittleEndianWriter mplew, List<MapleRing> rings, MapleCharacter chr)
      將婚戒清單資訊寫入指定封包寫入器。

      先寫入戒指數量,再逐一寫入每只戒指的固定旗標 1、本角色 ID、配對角色 ID 與道具 ID。 與 addRingInfo(MaplePacketLittleEndianWriter, List) 不同處在於改以角色 ID (而非戒指 ID)描述配對關係。此為輔助方法,供其他封包建構器呼叫。

      Parameters:
      mplew - 目標封包寫入器,婚戒資料將寫入其中
      rings - 欲序列化的婚戒清單
      chr - 戒指擁有者角色,提供本角色 ID
    • getBuffBar

      public static byte[] getBuffBar(long millis)
      建構顯示頭頂增益冷卻進度條的封包。

      使用 BUFF_BAR opcode,寫入冷卻剩餘毫秒數,客戶端據此於角色頭頂顯示 「可於 _ 秒後再次使用」的進度條。

      Parameters:
      millis - 增益可再次使用前的冷卻剩餘毫秒數
      Returns:
      封包位元組陣列
    • getBoosterFamiliar

      public static byte[] getBoosterFamiliar(int cid, int familiar, int id)
      建構顯示助力夥伴(Booster Familiar)的封包。

      使用 BOOSTER_FAMILIAR opcode,寫入角色 ID、夥伴道具 ID、夥伴唯一 ID (以 long 寫入)與一個固定的尾端位元組 0

      Parameters:
      cid - 角色 ID
      familiar - 夥伴的道具 ID
      id - 夥伴的唯一 ID
      Returns:
      封包位元組陣列
    • ShowChronosphere

      public static byte[] ShowChronosphere(int mf, int cs)
      建構顯示時空裂痕(Chronosphere)活動狀態的封包。

      使用 DAY_OF_CHRONOSPHERE opcode,依序寫入兩個活動相關的整數參數。

      Parameters:
      mf - 活動相關參數
      cs - 活動相關參數
      Returns:
      封包位元組陣列
    • SendErrorChronosphere

      public static byte[] SendErrorChronosphere()
      建構時空裂痕(Chronosphere)錯誤提示的封包。

      使用 ERROR_CHRONOSPHERE opcode,寫入單一位元組 0, 用於通知客戶端活動操作發生錯誤。

      Returns:
      封包位元組陣列