mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 23:14:36 +01:00
disable KQF command before G10
This commit is contained in:
@@ -168,17 +168,21 @@ func parseChatCommand(s *Session, command string) {
|
||||
}
|
||||
case commands["KeyQuest"].Prefix:
|
||||
if commands["KeyQuest"].Enabled {
|
||||
if len(args) > 1 {
|
||||
if args[1] == "get" {
|
||||
sendServerChatMessage(s, fmt.Sprintf(s.server.dict["commandKqfGet"], s.kqf))
|
||||
} else if args[1] == "set" {
|
||||
if len(args) > 2 && len(args[2]) == 16 {
|
||||
hexd, _ := hex.DecodeString(args[2])
|
||||
s.kqf = hexd
|
||||
s.kqfOverride = true
|
||||
sendServerChatMessage(s, s.server.dict["commandKqfSetSuccess"])
|
||||
} else {
|
||||
sendServerChatMessage(s, fmt.Sprintf(s.server.dict["commandKqfSetError"], commands["KeyQuest"].Prefix))
|
||||
if s.server.erupeConfig.RealClientMode < _config.G10 {
|
||||
sendServerChatMessage(s, s.server.dict["commandKqfVersion"])
|
||||
} else {
|
||||
if len(args) > 1 {
|
||||
if args[1] == "get" {
|
||||
sendServerChatMessage(s, fmt.Sprintf(s.server.dict["commandKqfGet"], s.kqf))
|
||||
} else if args[1] == "set" {
|
||||
if len(args) > 2 && len(args[2]) == 16 {
|
||||
hexd, _ := hex.DecodeString(args[2])
|
||||
s.kqf = hexd
|
||||
s.kqfOverride = true
|
||||
sendServerChatMessage(s, s.server.dict["commandKqfSetSuccess"])
|
||||
} else {
|
||||
sendServerChatMessage(s, fmt.Sprintf(s.server.dict["commandKqfSetError"], commands["KeyQuest"].Prefix))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ func getLangStrings(s *Server) map[string]string {
|
||||
strings["commandKqfGet"] = "現在のキークエストフラグ:%x"
|
||||
strings["commandKqfSetError"] = "キークエコマンドエラー 例:%s set xxxxxxxxxxxxxxxx"
|
||||
strings["commandKqfSetSuccess"] = "キークエストのフラグが更新されました。ワールド/ランドを移動してください"
|
||||
strings["commandKqfVersion"] = "This command is disabled prior to MHFG10"
|
||||
strings["commandRightsError"] = "コース更新コマンドエラー 例:%s x"
|
||||
strings["commandRightsSuccess"] = "コース情報を更新しました:%d"
|
||||
strings["commandCourseError"] = "コース確認コマンドエラー 例:%s <name>"
|
||||
@@ -64,6 +65,7 @@ func getLangStrings(s *Server) map[string]string {
|
||||
strings["commandKqfGet"] = "KQF: %x"
|
||||
strings["commandKqfSetError"] = "Error in command. Format: %s set xxxxxxxxxxxxxxxx"
|
||||
strings["commandKqfSetSuccess"] = "KQF set, please switch Land/World"
|
||||
strings["commandKqfVersion"] = "This command is disabled prior to MHFG10"
|
||||
strings["commandRightsError"] = "Error in command. Format: %s x"
|
||||
strings["commandRightsSuccess"] = "Set rights integer: %d"
|
||||
strings["commandCourseError"] = "Error in command. Format: %s <name>"
|
||||
|
||||
Reference in New Issue
Block a user