Skip to content

Commit

Permalink
1.1.3 人才
Browse files Browse the repository at this point in the history
  • Loading branch information
Bkm016 committed Jan 4, 2025
1 parent 55ea378 commit 842bbc1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ subprojects {
publishing {
repositories {
maven {
url = uri("https://repo.tabooproject.org/repository/releases")
url = uri("http://sacredcraft.cn:8081/repository/releases")
isAllowInsecureProtocol = true
credentials {
username = project.findProperty("taboolibUsername").toString()
password = project.findProperty("taboolibPassword").toString()
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=ink.ptms.um
version=1.1.2
version=1.1.3
taboolib_version=6.2.0-beta33
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,26 @@ import taboolib.common.platform.Ghost
import taboolib.common.platform.event.SubscribeEvent
import taboolib.common.platform.function.warning


internal object MobListenerSkill {

var isCrashed = false

@Ghost
@SubscribeEvent
fun onDropLoadEvent(event: MythicMechanicLoadEvent) {
val e = MobSkillLoadEvent(event.mechanicName, event.config.toUniversal()).fire()
val registerSkill = e.registerSkill ?: return
// 如果注册的技能,不在这三种类型中,那么就是无效的技能类型
if (registerSkill !is EntityTargetSkill && registerSkill !is LocationTargetSkill && registerSkill !is NoTargetSkill) {
error("Unsupported skill: $registerSkill")
if (isCrashed) return
try {
val e = MobSkillLoadEvent(event.mechanicName, event.config.toUniversal()).fire()
val registerSkill = e.registerSkill ?: return
// 如果注册的技能,不在这三种类型中,那么就是无效的技能类型
if (registerSkill !is EntityTargetSkill && registerSkill !is LocationTargetSkill && registerSkill !is NoTargetSkill) {
error("Unsupported skill: $registerSkill")
}
event.register(ProxySkill(registerSkill, event.mechanicName, event.config))
} catch (ex: Throwable) {
isCrashed = true
ex.printStackTrace()
}
event.register(ProxySkill(registerSkill, event.mechanicName, event.config))
}

class ProxySkill(val skill: BaseSkill, name: String, mlc: MythicLineConfig) : SkillMechanic(name, mlc), ITargetedEntitySkill, ITargetedLocationSkill, INoTargetSkill {
Expand Down

0 comments on commit 842bbc1

Please sign in to comment.