chenhui540

裝備加百分比HPMP回滿

發表於 2023-4-18 09:54:37
chenhui540 發表於 2023-4-18 09:54:37 | 顯示全部樓層 |閱讀模式
1.png
2.png


src\client        PlayerStats.java

搜索:

            } //slow, poison, darkness, seal, freeze
            Integer set = ii.getSetItemID(equip.getItemId());
            if (set != null && set > 0) {
                int value = 1;
                if (setHandling.containsKey(set)) {
                    value += setHandling.get(set).intValue();
                }
                setHandling.put(set, value); //id of Set, number of items to go with the set
            }


替換:

            } //slow, poison, darkness, seal, freeze
            percent_hp += ii.getItemIncMHPr(equip.getItemId()); //裝備加百分比HP
            percent_mp += ii.getItemIncMMPr(equip.getItemId()); //裝備加百分比MP
            Integer set = ii.getSetItemID(equip.getItemId());
            if (set != null && set > 0) {
                int value = 1;
                if (setHandling.containsKey(set)) {
                    value += setHandling.get(set).intValue();
                }
                setHandling.put(set, value); //id of Set, number of items to go with the set
            }



src\server        MapleItemInformationProvider.java


找個空白的位置添加

    /*
     * 裝備加百分比HP
     */
    public int getItemIncMHPr(int itemId) {
        if (getEquipStats(itemId) == null || !getEquipStats(itemId).containsKey("MHPr")) {
            return 0;
        }
        return getEquipStats(itemId).get("MHPr");
    }
    /*
     * 裝備加百分比MP
     */
    public int getItemIncMMPr(int itemId) {
        if (getEquipStats(itemId) == null || !getEquipStats(itemId).containsKey("MMPr")) {
            return 0;
        }
        return getEquipStats(itemId).get("MMPr");
    }
瀏覽 3324 回復 4

您需要登錄後才可以回帖 登錄 | 註冊會員

:謝謝分享 ~請問升級有用嗎? 2024-11-24 03:02回復
vic
:請問是CMS111嗎@@ 2023-04-22 00:04回復
:感謝大大的分享 2023-04-18 11:09回復
返回頂部