테스트

aion-server 4.8

Gitteol
최고관리자 · 1 · 💬 0 클론/새로받기
 4.8 61f661d · 1 commits 새로받기(Pull)
game-server/src/com/aionemu/gameserver/model/craft/Profession.java
package com.aionemu.gameserver.model.craft;

import com.aionemu.gameserver.dataholders.DataManager;
import com.aionemu.gameserver.utils.ChatUtil;

/**
 * @author Neon
 */
public enum Profession {

	ESSENCETAPPING(30002),
	AETHERTAPPING(30003),
	COOKING(40001),
	WEAPONSMITHING(40002),
	ARMORSMITHING(40003),
	TAILORING(40004),
	// LEATHERWORK(40005),
	// CARPENTRY(40006),
	ALCHEMY(40007),
	HANDICRAFTING(40008),
	CONSTRUCTION(40010);

	private final int skillId;

	Profession(int skillId) {
		this.skillId = skillId;
	}

	public int getSkillId() {
		return skillId;
	}

	public boolean isCrafting() {
		return skillId >= 40001 && skillId <= 40010;
	}

	public Integer getUpgradeCost(int skillLevel) {
		switch (skillLevel) {
			case 0:
				return 3500;
			case 99:
				return 17000;
			case 199:
				return 115000;
			case 299:
				return 460000;
			case 449:
				return isCrafting() ? 6004900 : null; // essence- and aethertapping have no artisan grade between expert and master
		}
		return null;
	}

	public int getMaxUpgradableLevel() {
		return isCrafting() ? 499 : 399;
	}

	public String getClientName() {
		return DataManager.SKILL_DATA.getSkillTemplate(skillId).getL10n();
	}

	public String getClientName(int skillLevel) {
		return getSkillGrade(skillLevel) + " " + getClientName();
	}

	private String getSkillGrade(int skillLevel) {
		if (skillLevel <= 99)
			return ChatUtil.l10n(900797); // Amateur
		if (skillLevel <= 199)
			return ChatUtil.l10n(900798); // Novice
		if (skillLevel <= 299)
			return ChatUtil.l10n(900799); // Apprentice
		if (skillLevel <= 399)
			return ChatUtil.l10n(900800); // Journeyman
		if (skillLevel <= 449)
			return ChatUtil.l10n(900801); // Expert
		if (isCrafting() && skillLevel <= 499)
			return ChatUtil.l10n(902027); // Artisan
		return ChatUtil.l10n(902028); // Master
	}

	public static Profession getBySkillId(int skillId) {
		for (Profession profession : values()) {
			if (profession.getSkillId() == skillId)
				return profession;
		}
		return null;
	}
}

📎 첨부파일

댓글 작성 권한이 없습니다.
🏆 포인트 랭킹 TOP 10
순위 닉네임 포인트
1 no_profile 타키야겐지쪽지보내기 자기소개 아이디로 검색 전체게시물 102,949
2 no_profile 동가리쪽지보내기 자기소개 아이디로 검색 전체게시물 63,733
3 no_profile 라프텔쪽지보내기 자기소개 아이디로 검색 전체게시물 51,771
4 no_profile 불멸의행복쪽지보내기 자기소개 아이디로 검색 전체게시물 36,923
5 서번트쪽지보내기 자기소개 아이디로 검색 전체게시물 35,011
6 no_profile 닥터스쪽지보내기 자기소개 아이디로 검색 전체게시물 29,470
7 no_profile 검은고양이쪽지보내기 자기소개 아이디로 검색 전체게시물 29,077
8 no_profile Revolution쪽지보내기 자기소개 아이디로 검색 전체게시물 28,199
9 no_profile 보거스쪽지보내기 자기소개 아이디로 검색 전체게시물 26,731
10 no_profile 호롤롤로쪽지보내기 자기소개 아이디로 검색 전체게시물 17,020
알림 0