forked from metin-server/m2dev-client
A few edits and bug fixes.
1-The "guildbuildinglist" in the Turkish locale had a Turkish character problem; it was converted to UTF-8 and fixed. 2-The *.channel.inf and *.mouse.cfg files were moved to the config folder, and reading and writing from the config was enabled. 3-There was an opening issue with the guild hall construction screen; this problem has been fixed.
This commit is contained in:
@@ -317,14 +317,14 @@ class LoginWindow(ui.ScriptWindow):
|
||||
|
||||
def __SaveChannelInfo(self):
|
||||
try:
|
||||
with open("channel.inf", "w") as file:
|
||||
with open("config/channel.inf", "w") as file:
|
||||
file.write("%d %d %d" % (self.__GetServerID(), self.__GetChannelID(), self.__GetRegionID()))
|
||||
except:
|
||||
print("LoginWindow.__SaveChannelInfo - SaveError")
|
||||
|
||||
def __LoadChannelInfo(self):
|
||||
try:
|
||||
with open("channel.inf") as file:
|
||||
with open("config/channel.inf") as file:
|
||||
lines=file.readlines()
|
||||
|
||||
if len(lines)>0:
|
||||
|
||||
@@ -2378,7 +2378,7 @@ class BuildGuildBuildingWindow(ui.ScriptWindow):
|
||||
self.__RefreshItem()
|
||||
|
||||
def __SetBuildingData(self, data):
|
||||
self.buildingPriceValue.SetText(NumberToMoneyString(data["PRICE"]))
|
||||
self.buildingPriceValue.SetText(NumberToMoneyString(int(data["PRICE"])))
|
||||
|
||||
self.needMoney = int(data["PRICE"])
|
||||
|
||||
|
||||
@@ -26,12 +26,12 @@ def GetMouseButtonSettings():
|
||||
|
||||
def SaveMouseButtonSettings():
|
||||
global MOUSE_SETTINGS
|
||||
with open("mouse.cfg", "w") as f:
|
||||
with open("config/mouse.cfg", "w") as f:
|
||||
f.write("%s\t%s" % tuple(MOUSE_SETTINGS))
|
||||
|
||||
def LoadMouseButtonSettings():
|
||||
global MOUSE_SETTINGS
|
||||
with open("mouse.cfg", "r") as f:
|
||||
with open("config/mouse.cfg", "r") as f:
|
||||
tokens = f.read().split()
|
||||
|
||||
if len(tokens) != 2:
|
||||
|
||||
Reference in New Issue
Block a user