Removed mobile/SMS from messenger
This commit is contained in:
parent
e3a957cf4b
commit
0617ac679f
|
@ -683,13 +683,6 @@ class GameWindow(ui.ScriptWindow):
|
||||||
def RefreshGuildGradePage(self):
|
def RefreshGuildGradePage(self):
|
||||||
self.interface.RefreshGuildGradePage()
|
self.interface.RefreshGuildGradePage()
|
||||||
|
|
||||||
def RefreshMobile(self):
|
|
||||||
if self.interface:
|
|
||||||
self.interface.RefreshMobile()
|
|
||||||
|
|
||||||
def OnMobileAuthority(self):
|
|
||||||
self.interface.OnMobileAuthority()
|
|
||||||
|
|
||||||
def OnBlockMode(self, mode):
|
def OnBlockMode(self, mode):
|
||||||
self.interface.OnBlockMode(mode)
|
self.interface.OnBlockMode(mode)
|
||||||
|
|
||||||
|
|
|
@ -610,12 +610,6 @@ class Interface(object):
|
||||||
self.wndMessenger.ClearGuildMember()
|
self.wndMessenger.ClearGuildMember()
|
||||||
self.wndGuild.DeleteGuild()
|
self.wndGuild.DeleteGuild()
|
||||||
|
|
||||||
def RefreshMobile(self):
|
|
||||||
self.dlgSystem.RefreshMobile()
|
|
||||||
|
|
||||||
def OnMobileAuthority(self):
|
|
||||||
self.dlgSystem.OnMobileAuthority()
|
|
||||||
|
|
||||||
def OnBlockMode(self, mode):
|
def OnBlockMode(self, mode):
|
||||||
self.dlgSystem.OnBlockMode(mode)
|
self.dlgSystem.OnBlockMode(mode)
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,6 @@ import interfaceModule #
|
||||||
blockMode = 0
|
blockMode = 0
|
||||||
viewChatMode = 0
|
viewChatMode = 0
|
||||||
|
|
||||||
MOBILE = False
|
|
||||||
|
|
||||||
if localeInfo.IsYMIR():
|
|
||||||
MOBILE = True
|
|
||||||
|
|
||||||
|
|
||||||
class OptionDialog(ui.ScriptWindow):
|
class OptionDialog(ui.ScriptWindow):
|
||||||
|
|
||||||
|
@ -87,22 +82,13 @@ class OptionDialog(ui.ScriptWindow):
|
||||||
self.showsalesTextButtonList.append(GetObject("salestext_on_button"))
|
self.showsalesTextButtonList.append(GetObject("salestext_on_button"))
|
||||||
self.showsalesTextButtonList.append(GetObject("salestext_off_button"))
|
self.showsalesTextButtonList.append(GetObject("salestext_off_button"))
|
||||||
|
|
||||||
global MOBILE
|
|
||||||
if MOBILE:
|
|
||||||
self.inputMobileButton = GetObject("input_mobile_button")
|
|
||||||
self.deleteMobileButton = GetObject("delete_mobile_button")
|
|
||||||
|
|
||||||
|
|
||||||
except:
|
except:
|
||||||
import exception
|
import exception
|
||||||
exception.Abort("OptionDialog.__Load_BindObject")
|
exception.Abort("OptionDialog.__Load_BindObject")
|
||||||
|
|
||||||
def __Load(self):
|
def __Load(self):
|
||||||
global MOBILE
|
self.__Load_LoadScript("uiscript/gameoptiondialog.py")
|
||||||
if MOBILE:
|
|
||||||
self.__Load_LoadScript("uiscript/gameoptiondialog_formobile.py")
|
|
||||||
else:
|
|
||||||
self.__Load_LoadScript("uiscript/gameoptiondialog.py")
|
|
||||||
|
|
||||||
self.__Load_BindObject()
|
self.__Load_BindObject()
|
||||||
|
|
||||||
|
@ -151,11 +137,6 @@ class OptionDialog(ui.ScriptWindow):
|
||||||
self.__ClickRadioButton(self.viewTargetBoardButtonList, constInfo.GET_VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD())
|
self.__ClickRadioButton(self.viewTargetBoardButtonList, constInfo.GET_VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD())
|
||||||
self.__SetPeacePKMode()
|
self.__SetPeacePKMode()
|
||||||
|
|
||||||
#global MOBILE
|
|
||||||
if MOBILE:
|
|
||||||
self.inputMobileButton.SetEvent(ui.__mem_func__(self.__OnChangeMobilePhoneNumber))
|
|
||||||
self.deleteMobileButton.SetEvent(ui.__mem_func__(self.__OnDeleteMobilePhoneNumber))
|
|
||||||
|
|
||||||
def __ClickRadioButton(self, buttonList, buttonIndex):
|
def __ClickRadioButton(self, buttonList, buttonIndex):
|
||||||
try:
|
try:
|
||||||
selButton=buttonList[buttonIndex]
|
selButton=buttonList[buttonIndex]
|
||||||
|
@ -334,67 +315,6 @@ class OptionDialog(ui.ScriptWindow):
|
||||||
def OnChangePKMode(self):
|
def OnChangePKMode(self):
|
||||||
self.__RefreshPVPButtonList()
|
self.__RefreshPVPButtonList()
|
||||||
|
|
||||||
def __OnChangeMobilePhoneNumber(self):
|
|
||||||
global MOBILE
|
|
||||||
if not MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
import uiCommon
|
|
||||||
inputDialog = uiCommon.InputDialog()
|
|
||||||
inputDialog.SetTitle(localeInfo.MESSENGER_INPUT_MOBILE_PHONE_NUMBER_TITLE)
|
|
||||||
inputDialog.SetMaxLength(13)
|
|
||||||
inputDialog.SetAcceptEvent(ui.__mem_func__(self.OnInputMobilePhoneNumber))
|
|
||||||
inputDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseInputDialog))
|
|
||||||
inputDialog.Open()
|
|
||||||
self.inputDialog = inputDialog
|
|
||||||
|
|
||||||
def __OnDeleteMobilePhoneNumber(self):
|
|
||||||
global MOBILE
|
|
||||||
if not MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
import uiCommon
|
|
||||||
questionDialog = uiCommon.QuestionDialog()
|
|
||||||
questionDialog.SetText(localeInfo.MESSENGER_DO_YOU_DELETE_PHONE_NUMBER)
|
|
||||||
questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDeleteMobile))
|
|
||||||
questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
|
|
||||||
questionDialog.Open()
|
|
||||||
self.questionDialog = questionDialog
|
|
||||||
|
|
||||||
def OnInputMobilePhoneNumber(self):
|
|
||||||
global MOBILE
|
|
||||||
if not MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
text = self.inputDialog.GetText()
|
|
||||||
|
|
||||||
if not text:
|
|
||||||
return
|
|
||||||
|
|
||||||
text.replace('-', '')
|
|
||||||
net.SendChatPacket("/mobile " + text)
|
|
||||||
self.OnCloseInputDialog()
|
|
||||||
return True
|
|
||||||
|
|
||||||
def OnInputMobileAuthorityCode(self):
|
|
||||||
global MOBILE
|
|
||||||
if not MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
text = self.inputDialog.GetText()
|
|
||||||
net.SendChatPacket("/mobile_auth " + text)
|
|
||||||
self.OnCloseInputDialog()
|
|
||||||
return True
|
|
||||||
|
|
||||||
def OnDeleteMobile(self):
|
|
||||||
global MOBILE
|
|
||||||
if not MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
net.SendChatPacket("/mobile")
|
|
||||||
self.OnCloseQuestionDialog()
|
|
||||||
return True
|
|
||||||
|
|
||||||
def OnCloseInputDialog(self):
|
def OnCloseInputDialog(self):
|
||||||
self.inputDialog.Close()
|
self.inputDialog.Close()
|
||||||
self.inputDialog = None
|
self.inputDialog = None
|
||||||
|
@ -409,34 +329,6 @@ class OptionDialog(ui.ScriptWindow):
|
||||||
self.Close()
|
self.Close()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def RefreshMobile(self):
|
|
||||||
global MOBILE
|
|
||||||
if not MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
if player.HasMobilePhoneNumber():
|
|
||||||
self.inputMobileButton.Hide()
|
|
||||||
self.deleteMobileButton.Show()
|
|
||||||
else:
|
|
||||||
self.inputMobileButton.Show()
|
|
||||||
self.deleteMobileButton.Hide()
|
|
||||||
|
|
||||||
def OnMobileAuthority(self):
|
|
||||||
global MOBILE
|
|
||||||
if not MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
import uiCommon
|
|
||||||
inputDialog = uiCommon.InputDialogWithDescription()
|
|
||||||
inputDialog.SetTitle(localeInfo.MESSENGER_INPUT_MOBILE_AUTHORITY_TITLE)
|
|
||||||
inputDialog.SetDescription(localeInfo.MESSENGER_INPUT_MOBILE_AUTHORITY_DESCRIPTION)
|
|
||||||
inputDialog.SetAcceptEvent(ui.__mem_func__(self.OnInputMobileAuthorityCode))
|
|
||||||
inputDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseInputDialog))
|
|
||||||
inputDialog.SetMaxLength(4)
|
|
||||||
inputDialog.SetBoardWidth(310)
|
|
||||||
inputDialog.Open()
|
|
||||||
self.inputDialog = inputDialog
|
|
||||||
|
|
||||||
def RefreshBlock(self):
|
def RefreshBlock(self):
|
||||||
global blockMode
|
global blockMode
|
||||||
for i in xrange(len(self.blockButtonList)):
|
for i in xrange(len(self.blockButtonList)):
|
||||||
|
@ -483,7 +375,6 @@ class OptionDialog(ui.ScriptWindow):
|
||||||
self.RefreshBlock()
|
self.RefreshBlock()
|
||||||
|
|
||||||
def Show(self):
|
def Show(self):
|
||||||
self.RefreshMobile()
|
|
||||||
self.RefreshBlock()
|
self.RefreshBlock()
|
||||||
ui.ScriptWindow.Show(self)
|
ui.ScriptWindow.Show(self)
|
||||||
|
|
||||||
|
|
|
@ -71,15 +71,9 @@ class MessengerItem(ui.Window):
|
||||||
def IsOnline(self):
|
def IsOnline(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def IsMobile(self):
|
|
||||||
return False
|
|
||||||
|
|
||||||
def OnWhisper(self):
|
def OnWhisper(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def OnMobileMessage(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
# Remove
|
# Remove
|
||||||
def CanRemove(self):
|
def CanRemove(self):
|
||||||
return False
|
return False
|
||||||
|
@ -123,17 +117,16 @@ class MessengerMemberItem(MessengerItem):
|
||||||
|
|
||||||
STATE_OFFLINE = 0
|
STATE_OFFLINE = 0
|
||||||
STATE_ONLINE = 1
|
STATE_ONLINE = 1
|
||||||
STATE_MOBILE = 2
|
|
||||||
|
|
||||||
IMAGE_FILE_NAME = { "ONLINE" : "d:/ymir work/ui/game/windows/messenger_list_online.sub",
|
IMAGE_FILE_NAME = {
|
||||||
"OFFLINE" : "d:/ymir work/ui/game/windows/messenger_list_offline.sub",
|
"ONLINE" : "d:/ymir work/ui/game/windows/messenger_list_online.sub",
|
||||||
"MOBILE" : "d:/ymir work/ui/game/windows/messenger_list_mobile.sub", }
|
"OFFLINE" : "d:/ymir work/ui/game/windows/messenger_list_offline.sub",
|
||||||
|
}
|
||||||
|
|
||||||
def __init__(self, getParentEvent):
|
def __init__(self, getParentEvent):
|
||||||
MessengerItem.__init__(self, getParentEvent)
|
MessengerItem.__init__(self, getParentEvent)
|
||||||
self.key = None
|
self.key = None
|
||||||
self.state = self.STATE_OFFLINE
|
self.state = self.STATE_OFFLINE
|
||||||
self.mobileFlag = False
|
|
||||||
self.Offline()
|
self.Offline()
|
||||||
|
|
||||||
def GetStepWidth(self):
|
def GetStepWidth(self):
|
||||||
|
@ -151,30 +144,13 @@ class MessengerMemberItem(MessengerItem):
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def IsMobile(self):
|
|
||||||
if self.STATE_MOBILE == self.state:
|
|
||||||
return True
|
|
||||||
|
|
||||||
return False
|
|
||||||
|
|
||||||
def Online(self):
|
def Online(self):
|
||||||
self.image.LoadImage(self.IMAGE_FILE_NAME["ONLINE"])
|
self.image.LoadImage(self.IMAGE_FILE_NAME["ONLINE"])
|
||||||
self.state = self.STATE_ONLINE
|
self.state = self.STATE_ONLINE
|
||||||
|
|
||||||
def Offline(self):
|
def Offline(self):
|
||||||
if self.mobileFlag:
|
self.image.LoadImage(self.IMAGE_FILE_NAME["OFFLINE"])
|
||||||
self.image.LoadImage(self.IMAGE_FILE_NAME["MOBILE"])
|
self.state = self.STATE_OFFLINE
|
||||||
self.state = self.STATE_MOBILE
|
|
||||||
|
|
||||||
else:
|
|
||||||
self.image.LoadImage(self.IMAGE_FILE_NAME["OFFLINE"])
|
|
||||||
self.state = self.STATE_OFFLINE
|
|
||||||
|
|
||||||
def SetMobile(self, flag):
|
|
||||||
self.mobileFlag = flag
|
|
||||||
|
|
||||||
if not self.IsOnline():
|
|
||||||
self.Offline()
|
|
||||||
|
|
||||||
def CanWhisper(self):
|
def CanWhisper(self):
|
||||||
if self.IsOnline():
|
if self.IsOnline():
|
||||||
|
@ -186,15 +162,6 @@ class MessengerMemberItem(MessengerItem):
|
||||||
if self.IsOnline():
|
if self.IsOnline():
|
||||||
self.getParentEvent().whisperButtonEvent(self.GetName())
|
self.getParentEvent().whisperButtonEvent(self.GetName())
|
||||||
|
|
||||||
def OnMobileMessage(self):
|
|
||||||
if not uiGameOption.MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
if not self.IsMobile():
|
|
||||||
return
|
|
||||||
|
|
||||||
self.getParentEvent().SendMobileMessage(self.GetName())
|
|
||||||
|
|
||||||
def Select(self):
|
def Select(self):
|
||||||
MessengerItem.Select(self)
|
MessengerItem.Select(self)
|
||||||
|
|
||||||
|
@ -370,7 +337,6 @@ class MessengerWindow(ui.ScriptWindow):
|
||||||
|
|
||||||
self.showingPageSize = 0
|
self.showingPageSize = 0
|
||||||
self.startLine = 0
|
self.startLine = 0
|
||||||
self.hasMobilePhoneNumber = True
|
|
||||||
|
|
||||||
self.isLoaded = 0
|
self.isLoaded = 0
|
||||||
|
|
||||||
|
@ -396,7 +362,6 @@ class MessengerWindow(ui.ScriptWindow):
|
||||||
self.board = self.GetChild("board")
|
self.board = self.GetChild("board")
|
||||||
self.scrollBar = self.GetChild("ScrollBar")
|
self.scrollBar = self.GetChild("ScrollBar")
|
||||||
self.whisperButton = self.GetChild("WhisperButton")
|
self.whisperButton = self.GetChild("WhisperButton")
|
||||||
self.mobileButton = self.GetChild("MobileButton")
|
|
||||||
self.removeButton = self.GetChild("RemoveButton")
|
self.removeButton = self.GetChild("RemoveButton")
|
||||||
self.addFriendButton = self.GetChild("AddFriendButton")
|
self.addFriendButton = self.GetChild("AddFriendButton")
|
||||||
self.guildButton = self.GetChild("GuildButton")
|
self.guildButton = self.GetChild("GuildButton")
|
||||||
|
@ -407,22 +372,11 @@ class MessengerWindow(ui.ScriptWindow):
|
||||||
self.board.SetCloseEvent(ui.__mem_func__(self.Close))
|
self.board.SetCloseEvent(ui.__mem_func__(self.Close))
|
||||||
self.scrollBar.SetScrollEvent(ui.__mem_func__(self.OnScroll))
|
self.scrollBar.SetScrollEvent(ui.__mem_func__(self.OnScroll))
|
||||||
self.whisperButton.SetEvent(ui.__mem_func__(self.OnPressWhisperButton))
|
self.whisperButton.SetEvent(ui.__mem_func__(self.OnPressWhisperButton))
|
||||||
self.mobileButton.SetEvent(ui.__mem_func__(self.OnPressMobileButton))
|
|
||||||
self.removeButton.SetEvent(ui.__mem_func__(self.OnPressRemoveButton))
|
self.removeButton.SetEvent(ui.__mem_func__(self.OnPressRemoveButton))
|
||||||
self.addFriendButton.SetEvent(ui.__mem_func__(self.OnPressAddFriendButton))
|
self.addFriendButton.SetEvent(ui.__mem_func__(self.OnPressAddFriendButton))
|
||||||
self.guildButton.SetEvent(ui.__mem_func__(self.OnPressGuildButton))
|
self.guildButton.SetEvent(ui.__mem_func__(self.OnPressGuildButton))
|
||||||
|
|
||||||
if not uiGameOption.MOBILE: #constInfo.SEND_MOBILE_PHONE_MESSAGE_ENABLE:
|
|
||||||
self.mobileButton.Hide()
|
|
||||||
width = self.GetWidth()
|
|
||||||
height = self.GetHeight()
|
|
||||||
self.addFriendButton.SetPosition(-60, 30)
|
|
||||||
self.whisperButton.SetPosition(-20, 30)
|
|
||||||
self.removeButton.SetPosition(20, 30)
|
|
||||||
self.guildButton.SetPosition(60, 30)
|
|
||||||
|
|
||||||
self.whisperButton.Disable()
|
self.whisperButton.Disable()
|
||||||
self.mobileButton.Disable()
|
|
||||||
self.removeButton.Disable()
|
self.removeButton.Disable()
|
||||||
|
|
||||||
resizeButton = self.ResizeButton()
|
resizeButton = self.ResizeButton()
|
||||||
|
@ -450,11 +404,9 @@ class MessengerWindow(ui.ScriptWindow):
|
||||||
self.friendNameBoard = None
|
self.friendNameBoard = None
|
||||||
self.questionDialog = None
|
self.questionDialog = None
|
||||||
self.popupDialog = None
|
self.popupDialog = None
|
||||||
self.inputDialog = None
|
|
||||||
self.familyGroup = None
|
self.familyGroup = None
|
||||||
|
|
||||||
self.whisperButton = None
|
self.whisperButton = None
|
||||||
self.mobileButton = None
|
|
||||||
self.removeButton = None
|
self.removeButton = None
|
||||||
|
|
||||||
def OnCloseQuestionDialog(self):
|
def OnCloseQuestionDialog(self):
|
||||||
|
@ -543,84 +495,6 @@ class MessengerWindow(ui.ScriptWindow):
|
||||||
def SetGuildButtonEvent(self, event):
|
def SetGuildButtonEvent(self, event):
|
||||||
self.guildButtonEvent=event
|
self.guildButtonEvent=event
|
||||||
|
|
||||||
def SendMobileMessage(self, name):
|
|
||||||
if not uiGameOption.MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
if not self.hasMobilePhoneNumber:
|
|
||||||
questionDialog = uiCommon.QuestionDialog2()
|
|
||||||
questionDialog.SetText1(localeInfo.MESSENGER_INPUT_MOBILE_PHONE_NUMBER_1)
|
|
||||||
questionDialog.SetText2(localeInfo.MESSENGER_INPUT_MOBILE_PHONE_NUMBER_2)
|
|
||||||
questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnAcceptInputMobilePhoneNumber))
|
|
||||||
questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCancelInputMobilePhoneNumber))
|
|
||||||
questionDialog.SetWidth(400)
|
|
||||||
questionDialog.Open()
|
|
||||||
self.questionDialog = questionDialog
|
|
||||||
return
|
|
||||||
|
|
||||||
## Input Sending Mobile Message
|
|
||||||
inputDialog = uiCommon.InputDialog()
|
|
||||||
inputDialog.SetTitle(localeInfo.MESSENGER_SEND_MOBILE_MESSAGE_TITLE)
|
|
||||||
inputDialog.SetMaxLength(50)
|
|
||||||
inputDialog.SetAcceptEvent(ui.__mem_func__(self.OnInputMobileMessage))
|
|
||||||
inputDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseInputDialog))
|
|
||||||
inputDialog.name = name
|
|
||||||
inputDialog.Open()
|
|
||||||
self.inputDialog = inputDialog
|
|
||||||
|
|
||||||
def OnAcceptInputMobilePhoneNumber(self):
|
|
||||||
if not uiGameOption.MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
## Input Mobile Phone Number
|
|
||||||
inputDialog = uiCommon.InputDialog()
|
|
||||||
inputDialog.SetTitle(localeInfo.MESSENGER_INPUT_MOBILE_PHONE_NUMBER_TITLE)
|
|
||||||
inputDialog.SetMaxLength(13)
|
|
||||||
inputDialog.SetAcceptEvent(ui.__mem_func__(self.OnInputMobilePhoneNumber))
|
|
||||||
inputDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseInputDialog))
|
|
||||||
inputDialog.Open()
|
|
||||||
self.inputDialog = inputDialog
|
|
||||||
self.OnCancelInputMobilePhoneNumber()
|
|
||||||
|
|
||||||
def OnCancelInputMobilePhoneNumber(self):
|
|
||||||
if not uiGameOption.MOBILE:
|
|
||||||
return
|
|
||||||
self.questionDialog.Close()
|
|
||||||
self.questionDialog = None
|
|
||||||
return True
|
|
||||||
|
|
||||||
def OnInputMobilePhoneNumber(self):
|
|
||||||
if not uiGameOption.MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
text = self.inputDialog.GetText()
|
|
||||||
|
|
||||||
if not text:
|
|
||||||
return
|
|
||||||
|
|
||||||
text.replace('-', '')
|
|
||||||
net.SendChatPacket("/mobile " + text)
|
|
||||||
self.OnCloseInputDialog()
|
|
||||||
return True
|
|
||||||
|
|
||||||
def OnInputMobileMessage(self):
|
|
||||||
if not uiGameOption.MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
text = self.inputDialog.GetText()
|
|
||||||
|
|
||||||
if not text:
|
|
||||||
return
|
|
||||||
|
|
||||||
net.SendMobileMessagePacket(self.inputDialog.name, text)
|
|
||||||
self.OnCloseInputDialog()
|
|
||||||
return True
|
|
||||||
|
|
||||||
def OnCloseInputDialog(self):
|
|
||||||
self.inputDialog.Close()
|
|
||||||
self.inputDialog = None
|
|
||||||
return True
|
|
||||||
|
|
||||||
def OnPressGuildButton(self):
|
def OnPressGuildButton(self):
|
||||||
self.guildButtonEvent()
|
self.guildButtonEvent()
|
||||||
|
|
||||||
|
@ -649,10 +523,6 @@ class MessengerWindow(ui.ScriptWindow):
|
||||||
if self.selectedItem:
|
if self.selectedItem:
|
||||||
self.selectedItem.OnWhisper()
|
self.selectedItem.OnWhisper()
|
||||||
|
|
||||||
def OnPressMobileButton(self):
|
|
||||||
if self.selectedItem:
|
|
||||||
self.selectedItem.OnMobileMessage()
|
|
||||||
|
|
||||||
def OnPressRemoveButton(self):
|
def OnPressRemoveButton(self):
|
||||||
if self.selectedItem:
|
if self.selectedItem:
|
||||||
if self.selectedItem.CanRemove():
|
if self.selectedItem.CanRemove():
|
||||||
|
@ -702,11 +572,6 @@ class MessengerWindow(ui.ScriptWindow):
|
||||||
else:
|
else:
|
||||||
self.whisperButton.Disable()
|
self.whisperButton.Disable()
|
||||||
|
|
||||||
if self.selectedItem.IsMobile():
|
|
||||||
self.mobileButton.Enable()
|
|
||||||
else:
|
|
||||||
self.mobileButton.Disable()
|
|
||||||
|
|
||||||
if self.selectedItem.CanRemove():
|
if self.selectedItem.CanRemove():
|
||||||
self.removeButton.Enable()
|
self.removeButton.Enable()
|
||||||
else:
|
else:
|
||||||
|
@ -720,9 +585,6 @@ class MessengerWindow(ui.ScriptWindow):
|
||||||
if self.selectedItem.IsOnline():
|
if self.selectedItem.IsOnline():
|
||||||
self.OnPressWhisperButton()
|
self.OnPressWhisperButton()
|
||||||
|
|
||||||
elif self.selectedItem.IsMobile():
|
|
||||||
self.OnPressMobileButton()
|
|
||||||
|
|
||||||
def GetSelf(self):
|
def GetSelf(self):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
@ -796,14 +658,6 @@ class MessengerWindow(ui.ScriptWindow):
|
||||||
member.Offline()
|
member.Offline()
|
||||||
self.OnRefreshList()
|
self.OnRefreshList()
|
||||||
|
|
||||||
def OnMobile(self, groupIndex, key, mobileFlag):
|
|
||||||
group = self.groupList[groupIndex]
|
|
||||||
member = group.FindMember(key)
|
|
||||||
if not member:
|
|
||||||
return
|
|
||||||
member.SetMobile(mobileFlag)
|
|
||||||
self.OnRefreshList()
|
|
||||||
|
|
||||||
def OnAddLover(self, name, lovePoint):
|
def OnAddLover(self, name, lovePoint):
|
||||||
if not self.familyGroup:
|
if not self.familyGroup:
|
||||||
self.__AddFamilyGroup()
|
self.__AddFamilyGroup()
|
||||||
|
|
|
@ -9,11 +9,6 @@ import constInfo
|
||||||
import chrmgr
|
import chrmgr
|
||||||
import player
|
import player
|
||||||
|
|
||||||
MOBILE = False
|
|
||||||
|
|
||||||
if localeInfo.IsYMIR():
|
|
||||||
MOBILE = True
|
|
||||||
|
|
||||||
blockMode = 0
|
blockMode = 0
|
||||||
|
|
||||||
class OptionDialog(ui.ScriptWindow):
|
class OptionDialog(ui.ScriptWindow):
|
||||||
|
@ -45,15 +40,9 @@ class OptionDialog(ui.ScriptWindow):
|
||||||
print " -------------------------------------- DESTROY OPTION DIALOG"
|
print " -------------------------------------- DESTROY OPTION DIALOG"
|
||||||
|
|
||||||
def __LoadDialog(self):
|
def __LoadDialog(self):
|
||||||
global NO_MOBILE
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
pyScriptLoader = ui.PythonScriptLoader()
|
pyScriptLoader = ui.PythonScriptLoader()
|
||||||
|
pyScriptLoader.LoadScriptFile(self, "uiscript/optiondialog.py")
|
||||||
if MOBILE:
|
|
||||||
pyScriptLoader.LoadScriptFile(self, "uiscript/optiondialog_formobile.py")
|
|
||||||
else:
|
|
||||||
pyScriptLoader.LoadScriptFile(self, "uiscript/optiondialog.py")
|
|
||||||
|
|
||||||
except:
|
except:
|
||||||
import exception
|
import exception
|
||||||
|
@ -82,10 +71,6 @@ class OptionDialog(ui.ScriptWindow):
|
||||||
self.blockButtonList.append(GetObject("block_guild_button"))
|
self.blockButtonList.append(GetObject("block_guild_button"))
|
||||||
self.blockButtonList.append(GetObject("block_whisper_button"))
|
self.blockButtonList.append(GetObject("block_whisper_button"))
|
||||||
self.blockButtonList.append(GetObject("block_friend_button"))
|
self.blockButtonList.append(GetObject("block_friend_button"))
|
||||||
|
|
||||||
if MOBILE:
|
|
||||||
self.inputMobileButton = GetObject("input_mobile_button")
|
|
||||||
self.deleteMobileButton = GetObject("delete_mobile_button")
|
|
||||||
|
|
||||||
except:
|
except:
|
||||||
import exception
|
import exception
|
||||||
|
@ -134,10 +119,6 @@ class OptionDialog(ui.ScriptWindow):
|
||||||
self.__ClickRadioButton(self.viewTargetBoardButtonList, constInfo.GET_VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD())
|
self.__ClickRadioButton(self.viewTargetBoardButtonList, constInfo.GET_VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD())
|
||||||
self.__SetPeacePKMode()
|
self.__SetPeacePKMode()
|
||||||
|
|
||||||
if MOBILE:
|
|
||||||
self.inputMobileButton.SetEvent(ui.__mem_func__(self.__OnChangeMobilePhoneNumber))
|
|
||||||
self.deleteMobileButton.SetEvent(ui.__mem_func__(self.__OnDeleteMobilePhoneNumber))
|
|
||||||
|
|
||||||
def __ClickRadioButton(self, buttonList, buttonIndex):
|
def __ClickRadioButton(self, buttonList, buttonIndex):
|
||||||
try:
|
try:
|
||||||
selButton=buttonList[buttonIndex]
|
selButton=buttonList[buttonIndex]
|
||||||
|
@ -294,53 +275,6 @@ class OptionDialog(ui.ScriptWindow):
|
||||||
snd.SetSoundVolumef(pos)
|
snd.SetSoundVolumef(pos)
|
||||||
systemSetting.SetSoundVolumef(pos)
|
systemSetting.SetSoundVolumef(pos)
|
||||||
|
|
||||||
def __OnChangeMobilePhoneNumber(self):
|
|
||||||
|
|
||||||
import uiCommon
|
|
||||||
inputDialog = uiCommon.InputDialog()
|
|
||||||
inputDialog.SetTitle(localeInfo.MESSENGER_INPUT_MOBILE_PHONE_NUMBER_TITLE)
|
|
||||||
inputDialog.SetMaxLength(13)
|
|
||||||
inputDialog.SetAcceptEvent(ui.__mem_func__(self.OnInputMobilePhoneNumber))
|
|
||||||
inputDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseInputDialog))
|
|
||||||
inputDialog.Open()
|
|
||||||
self.inputDialog = inputDialog
|
|
||||||
|
|
||||||
def __OnDeleteMobilePhoneNumber(self):
|
|
||||||
import uiCommon
|
|
||||||
questionDialog = uiCommon.QuestionDialog()
|
|
||||||
questionDialog.SetText(localeInfo.MESSENGER_DO_YOU_DELETE_PHONE_NUMBER)
|
|
||||||
questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDeleteMobile))
|
|
||||||
questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
|
|
||||||
questionDialog.Open()
|
|
||||||
self.questionDialog = questionDialog
|
|
||||||
|
|
||||||
def OnInputMobilePhoneNumber(self):
|
|
||||||
text = self.inputDialog.GetText()
|
|
||||||
|
|
||||||
if not text:
|
|
||||||
return
|
|
||||||
|
|
||||||
text.replace('-', '')
|
|
||||||
net.SendChatPacket("/mobile " + text)
|
|
||||||
self.OnCloseInputDialog()
|
|
||||||
return True
|
|
||||||
|
|
||||||
def OnInputMobileAuthorityCode(self):
|
|
||||||
text = self.inputDialog.GetText()
|
|
||||||
net.SendChatPacket("/mobile_auth " + text)
|
|
||||||
self.OnCloseInputDialog()
|
|
||||||
return True
|
|
||||||
|
|
||||||
def OnDeleteMobile(self):
|
|
||||||
net.SendChatPacket("/mobile")
|
|
||||||
self.OnCloseQuestionDialog()
|
|
||||||
return True
|
|
||||||
|
|
||||||
def OnCloseInputDialog(self):
|
|
||||||
self.inputDialog.Close()
|
|
||||||
self.inputDialog = None
|
|
||||||
return True
|
|
||||||
|
|
||||||
def OnCloseQuestionDialog(self):
|
def OnCloseQuestionDialog(self):
|
||||||
self.questionDialog.Close()
|
self.questionDialog.Close()
|
||||||
self.questionDialog = None
|
self.questionDialog = None
|
||||||
|
@ -350,30 +284,6 @@ class OptionDialog(ui.ScriptWindow):
|
||||||
self.Close()
|
self.Close()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def RefreshMobile(self):
|
|
||||||
global MOBILE
|
|
||||||
if not MOBILE:
|
|
||||||
return
|
|
||||||
|
|
||||||
if player.HasMobilePhoneNumber():
|
|
||||||
self.inputMobileButton.Hide()
|
|
||||||
self.deleteMobileButton.Show()
|
|
||||||
else:
|
|
||||||
self.inputMobileButton.Show()
|
|
||||||
self.deleteMobileButton.Hide()
|
|
||||||
|
|
||||||
def OnMobileAuthority(self):
|
|
||||||
import uiCommon
|
|
||||||
inputDialog = uiCommon.InputDialogWithDescription()
|
|
||||||
inputDialog.SetTitle(localeInfo.MESSENGER_INPUT_MOBILE_AUTHORITY_TITLE)
|
|
||||||
inputDialog.SetDescription(localeInfo.MESSENGER_INPUT_MOBILE_AUTHORITY_DESCRIPTION)
|
|
||||||
inputDialog.SetAcceptEvent(ui.__mem_func__(self.OnInputMobileAuthorityCode))
|
|
||||||
inputDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseInputDialog))
|
|
||||||
inputDialog.SetMaxLength(4)
|
|
||||||
inputDialog.SetBoardWidth(310)
|
|
||||||
inputDialog.Open()
|
|
||||||
self.inputDialog = inputDialog
|
|
||||||
|
|
||||||
def RefreshBlock(self):
|
def RefreshBlock(self):
|
||||||
global blockMode
|
global blockMode
|
||||||
for i in xrange(len(self.blockButtonList)):
|
for i in xrange(len(self.blockButtonList)):
|
||||||
|
@ -388,7 +298,6 @@ class OptionDialog(ui.ScriptWindow):
|
||||||
self.RefreshBlock()
|
self.RefreshBlock()
|
||||||
|
|
||||||
def Show(self):
|
def Show(self):
|
||||||
self.RefreshMobile()
|
|
||||||
self.RefreshBlock()
|
self.RefreshBlock()
|
||||||
ui.ScriptWindow.Show(self)
|
ui.ScriptWindow.Show(self)
|
||||||
|
|
||||||
|
|
|
@ -136,16 +136,6 @@ class SystemDialog(ui.ScriptWindow):
|
||||||
self.Hide()
|
self.Hide()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def RefreshMobile(self):
|
|
||||||
if self.gameOptionDlg:
|
|
||||||
self.gameOptionDlg.RefreshMobile()
|
|
||||||
#self.optionDialog.RefreshMobile()
|
|
||||||
|
|
||||||
def OnMobileAuthority(self):
|
|
||||||
if self.gameOptionDlg:
|
|
||||||
self.gameOptionDlg.OnMobileAuthority()
|
|
||||||
#self.optionDialog.OnMobileAuthority()
|
|
||||||
|
|
||||||
def OnBlockMode(self, mode):
|
def OnBlockMode(self, mode):
|
||||||
uiGameOption.blockMode = mode
|
uiGameOption.blockMode = mode
|
||||||
if self.gameOptionDlg:
|
if self.gameOptionDlg:
|
||||||
|
|
|
@ -1,479 +0,0 @@
|
||||||
import uiScriptLocale
|
|
||||||
|
|
||||||
ROOT_PATH = "d:/ymir work/ui/public/"
|
|
||||||
|
|
||||||
TEMPORARY_X = +13
|
|
||||||
BUTTON_TEMPORARY_X = 5
|
|
||||||
PVP_X = -10
|
|
||||||
|
|
||||||
LINE_LABEL_X = 30
|
|
||||||
LINE_DATA_X = 90
|
|
||||||
LINE_STEP = 0
|
|
||||||
SMALL_BUTTON_WIDTH = 45
|
|
||||||
MIDDLE_BUTTON_WIDTH = 65
|
|
||||||
|
|
||||||
window = {
|
|
||||||
"name" : "GameOptionDialog",
|
|
||||||
"style" : ("movable", "float",),
|
|
||||||
|
|
||||||
"x" : 0,
|
|
||||||
"y" : 0,
|
|
||||||
|
|
||||||
"width" : 300,
|
|
||||||
"height" : (258+25),
|
|
||||||
|
|
||||||
"children" :
|
|
||||||
(
|
|
||||||
{
|
|
||||||
"name" : "board",
|
|
||||||
"type" : "board",
|
|
||||||
|
|
||||||
"x" : 0,
|
|
||||||
"y" : 0,
|
|
||||||
|
|
||||||
"width" : 300,
|
|
||||||
"height" : 25*12+8,
|
|
||||||
|
|
||||||
"children" :
|
|
||||||
(
|
|
||||||
## Title
|
|
||||||
{
|
|
||||||
"name" : "titlebar",
|
|
||||||
"type" : "titlebar",
|
|
||||||
"style" : ("attach",),
|
|
||||||
|
|
||||||
"x" : 8,
|
|
||||||
"y" : 8,
|
|
||||||
|
|
||||||
"width" : 284,
|
|
||||||
"color" : "gray",
|
|
||||||
|
|
||||||
"children" :
|
|
||||||
(
|
|
||||||
{ "name":"titlename", "type":"text", "x":0, "y":3,
|
|
||||||
"text" : uiScriptLocale.GAMEOPTION_TITLE,
|
|
||||||
"horizontal_align":"center", "text_horizontal_align":"center" },
|
|
||||||
),
|
|
||||||
},
|
|
||||||
|
|
||||||
## À̸§»ö
|
|
||||||
{
|
|
||||||
"name" : "name_color",
|
|
||||||
"type" : "text",
|
|
||||||
|
|
||||||
"x" : LINE_LABEL_X,
|
|
||||||
"y" : 40+2,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_NAME_COLOR,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "name_color_normal",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH*0,
|
|
||||||
"y" : 40,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_NAME_COLOR_NORMAL,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "Middle_Button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "Middle_Button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "Middle_Button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "name_color_empire",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH*1,
|
|
||||||
"y" : 40,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_NAME_COLOR_EMPIRE,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "Middle_Button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "Middle_Button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "Middle_Button_03.sub",
|
|
||||||
},
|
|
||||||
|
|
||||||
## Ÿ°Ùâ
|
|
||||||
{
|
|
||||||
"name" : "target_board",
|
|
||||||
"type" : "text",
|
|
||||||
|
|
||||||
"x" : LINE_LABEL_X,
|
|
||||||
"y" : 65+2,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_TARGET_BOARD,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "target_board_no_view",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH*0,
|
|
||||||
"y" : 65,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_TARGET_BOARD_NO_VIEW,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "Middle_Button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "Middle_Button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "Middle_Button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "target_board_view",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH*1,
|
|
||||||
"y" : 65,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_TARGET_BOARD_VIEW,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "Middle_Button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "Middle_Button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "Middle_Button_03.sub",
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
## PvP Mode
|
|
||||||
{
|
|
||||||
"name" : "pvp_mode",
|
|
||||||
"type" : "text",
|
|
||||||
|
|
||||||
"x" : LINE_LABEL_X,
|
|
||||||
"y" : 90+2,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_PVPMODE,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pvp_peace",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+SMALL_BUTTON_WIDTH*0,
|
|
||||||
"y" : 90,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_PVPMODE_PEACE,
|
|
||||||
"tooltip_text" : uiScriptLocale.OPTION_PVPMODE_PEACE_TOOLTIP,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "small_Button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "small_Button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "small_Button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pvp_revenge",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+SMALL_BUTTON_WIDTH*1,
|
|
||||||
"y" : 90,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_PVPMODE_REVENGE,
|
|
||||||
"tooltip_text" : uiScriptLocale.OPTION_PVPMODE_REVENGE_TOOLTIP,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "small_Button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "small_Button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "small_Button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pvp_guild",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+SMALL_BUTTON_WIDTH*2,
|
|
||||||
"y" : 90,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_PVPMODE_GUILD,
|
|
||||||
"tooltip_text" : uiScriptLocale.OPTION_PVPMODE_GUILD_TOOLTIP,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "small_Button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "small_Button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "small_Button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pvp_free",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+SMALL_BUTTON_WIDTH*3,
|
|
||||||
"y" : 90,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_PVPMODE_FREE,
|
|
||||||
"tooltip_text" : uiScriptLocale.OPTION_PVPMODE_FREE_TOOLTIP,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "small_Button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "small_Button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "small_Button_03.sub",
|
|
||||||
},
|
|
||||||
|
|
||||||
## Block
|
|
||||||
{
|
|
||||||
"name" : "block",
|
|
||||||
"type" : "text",
|
|
||||||
|
|
||||||
"x" : LINE_LABEL_X,
|
|
||||||
"y" : 115+2,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_BLOCK,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "block_exchange_button",
|
|
||||||
"type" : "toggle_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH*0,
|
|
||||||
"y" : 115,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_BLOCK_EXCHANGE,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "block_party_button",
|
|
||||||
"type" : "toggle_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH*1,
|
|
||||||
"y" : 115,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_BLOCK_PARTY,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "block_guild_button",
|
|
||||||
"type" : "toggle_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH*2,
|
|
||||||
"y" : 115,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_BLOCK_GUILD,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "block_whisper_button",
|
|
||||||
"type" : "toggle_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH*0,
|
|
||||||
"y" : 140,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_BLOCK_WHISPER,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "block_friend_button",
|
|
||||||
"type" : "toggle_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH*1,
|
|
||||||
"y" : 140,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_BLOCK_FRIEND,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "block_party_request_button",
|
|
||||||
"type" : "toggle_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH*2,
|
|
||||||
"y" : 140,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_BLOCK_PARTY_REQUEST,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
|
|
||||||
## Chat
|
|
||||||
{
|
|
||||||
"name" : "chat",
|
|
||||||
"type" : "text",
|
|
||||||
|
|
||||||
"x" : LINE_LABEL_X,
|
|
||||||
"y" : 165+2,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_VIEW_CHAT,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "view_chat_on_button",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X,
|
|
||||||
"y" : 165,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_VIEW_CHAT_ON,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "view_chat_off_button",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH,
|
|
||||||
"y" : 165,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_VIEW_CHAT_OFF,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
|
|
||||||
## Always Show Name
|
|
||||||
{
|
|
||||||
"name" : "always_show_name",
|
|
||||||
"type" : "text",
|
|
||||||
|
|
||||||
"x" : LINE_LABEL_X,
|
|
||||||
"y" : 190+2,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_ALWAYS_SHOW_NAME,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "always_show_name_on_button",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X,
|
|
||||||
"y" : 190,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_ALWAYS_SHOW_NAME_ON,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "always_show_name_off_button",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH,
|
|
||||||
"y" : 190,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_ALWAYS_SHOW_NAME_OFF,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
|
|
||||||
## Mobile
|
|
||||||
{
|
|
||||||
"name" : "mobile",
|
|
||||||
"type" : "text",
|
|
||||||
|
|
||||||
"x" : LINE_LABEL_X,
|
|
||||||
"y" : 215+2,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_MOBILE,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "input_mobile_button",
|
|
||||||
"type" : "button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X,
|
|
||||||
"y" : 215,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_INPUT_MOBILE_BUTTON,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "Large_Button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "Large_Button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "Large_Button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "delete_mobile_button",
|
|
||||||
"type" : "button",
|
|
||||||
|
|
||||||
"x" : 90,
|
|
||||||
"y" : 215,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_DELETE_MOBILE_BUTTON,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "Large_Button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "Large_Button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "Large_Button_03.sub",
|
|
||||||
},
|
|
||||||
|
|
||||||
## Effect On/Off
|
|
||||||
{
|
|
||||||
"name" : "effect_on_off",
|
|
||||||
"type" : "text",
|
|
||||||
|
|
||||||
"x" : LINE_LABEL_X,
|
|
||||||
"y" : 240+2,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_EFFECT,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "show_damage_on_button",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X,
|
|
||||||
"y" : 240,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_VIEW_CHAT_ON,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "show_damage_off_button",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH,
|
|
||||||
"y" : 240,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_VIEW_CHAT_OFF,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
|
|
||||||
## ÆǸŹ®±¸
|
|
||||||
|
|
||||||
{
|
|
||||||
"name" : "salestext_on_off",
|
|
||||||
"type" : "text",
|
|
||||||
|
|
||||||
"x" : LINE_LABEL_X,
|
|
||||||
"y" : 265+2,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_SALESTEXT,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "salestext_on_button",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X,
|
|
||||||
"y" : 265,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_SALESTEXT_VIEW_ON,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "salestext_off_button",
|
|
||||||
"type" : "radio_button",
|
|
||||||
|
|
||||||
"x" : LINE_DATA_X+MIDDLE_BUTTON_WIDTH,
|
|
||||||
"y" : 265,
|
|
||||||
|
|
||||||
"text" : uiScriptLocale.OPTION_SALESTEXT_VIEW_OFF,
|
|
||||||
|
|
||||||
"default_image" : ROOT_PATH + "middle_button_01.sub",
|
|
||||||
"over_image" : ROOT_PATH + "middle_button_02.sub",
|
|
||||||
"down_image" : ROOT_PATH + "middle_button_03.sub",
|
|
||||||
},
|
|
||||||
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
import uiScriptLocale
|
import uiScriptLocale
|
||||||
|
|
||||||
BUTTON_START_X_POS = -60
|
BUTTON_START_X_POS = -60
|
||||||
BUTTON_X_STEP = 30
|
BUTTON_X_STEP = 40
|
||||||
|
|
||||||
window = {
|
window = {
|
||||||
"name" : "MessengerWindow",
|
"name" : "MessengerWindow",
|
||||||
|
@ -73,28 +73,11 @@ window = {
|
||||||
"down_image" : "d:/ymir work/ui/game/windows/messenger_whisper_03.sub",
|
"down_image" : "d:/ymir work/ui/game/windows/messenger_whisper_03.sub",
|
||||||
"disable_image" : "d:/ymir work/ui/game/windows/messenger_whisper_04.sub",
|
"disable_image" : "d:/ymir work/ui/game/windows/messenger_whisper_04.sub",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name" : "MobileButton",
|
|
||||||
"type" : "button",
|
|
||||||
|
|
||||||
"x" : BUTTON_START_X_POS + BUTTON_X_STEP*2,
|
|
||||||
"y" : 30,
|
|
||||||
"horizontal_align" : "center",
|
|
||||||
"vertical_align" : "bottom",
|
|
||||||
"tooltip_text" : uiScriptLocale.MESSENGER_MOBILE,
|
|
||||||
"tooltip_x" : 0,
|
|
||||||
"tooltip_y" : 35,
|
|
||||||
|
|
||||||
"default_image" : "d:/ymir work/ui/game/windows/messenger_mobile_01.sub",
|
|
||||||
"over_image" : "d:/ymir work/ui/game/windows/messenger_mobile_02.sub",
|
|
||||||
"down_image" : "d:/ymir work/ui/game/windows/messenger_mobile_03.sub",
|
|
||||||
"disable_image" : "d:/ymir work/ui/game/windows/messenger_mobile_04.sub",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name" : "RemoveButton",
|
"name" : "RemoveButton",
|
||||||
"type" : "button",
|
"type" : "button",
|
||||||
|
|
||||||
"x" : BUTTON_START_X_POS + BUTTON_X_STEP*3,
|
"x" : BUTTON_START_X_POS + BUTTON_X_STEP*2,
|
||||||
"y" : 30,
|
"y" : 30,
|
||||||
"horizontal_align" : "center",
|
"horizontal_align" : "center",
|
||||||
"vertical_align" : "bottom",
|
"vertical_align" : "bottom",
|
||||||
|
@ -111,7 +94,7 @@ window = {
|
||||||
"name" : "GuildButton",
|
"name" : "GuildButton",
|
||||||
"type" : "button",
|
"type" : "button",
|
||||||
|
|
||||||
"x" : BUTTON_START_X_POS + BUTTON_X_STEP*4,
|
"x" : BUTTON_START_X_POS + BUTTON_X_STEP*3,
|
||||||
"y" : 30,
|
"y" : 30,
|
||||||
"horizontal_align" : "center",
|
"horizontal_align" : "center",
|
||||||
"vertical_align" : "bottom",
|
"vertical_align" : "bottom",
|
||||||
|
|
|
@ -54,7 +54,6 @@ class IAbstractPlayer : public TAbstractSingleton<IAbstractPlayer>
|
||||||
virtual void NotifyChangePKMode() = 0;
|
virtual void NotifyChangePKMode() = 0;
|
||||||
|
|
||||||
virtual void SetObserverMode(bool isEnable) = 0;
|
virtual void SetObserverMode(bool isEnable) = 0;
|
||||||
virtual void SetMobileFlag(BOOL bFlag) = 0;
|
|
||||||
virtual void SetComboSkillFlag(BOOL bFlag) = 0;
|
virtual void SetComboSkillFlag(BOOL bFlag) = 0;
|
||||||
|
|
||||||
virtual void StartEmotionProcess() = 0;
|
virtual void StartEmotionProcess() = 0;
|
||||||
|
|
|
@ -807,7 +807,6 @@ enum
|
||||||
MESSENGER_SUBHEADER_GC_LOGIN,
|
MESSENGER_SUBHEADER_GC_LOGIN,
|
||||||
MESSENGER_SUBHEADER_GC_LOGOUT,
|
MESSENGER_SUBHEADER_GC_LOGOUT,
|
||||||
MESSENGER_SUBHEADER_GC_INVITE,
|
MESSENGER_SUBHEADER_GC_INVITE,
|
||||||
MESSENGER_SUBHEADER_GC_MOBILE,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct packet_messenger
|
typedef struct packet_messenger
|
||||||
|
@ -827,7 +826,6 @@ enum
|
||||||
{
|
{
|
||||||
MESSENGER_CONNECTED_STATE_OFFLINE,
|
MESSENGER_CONNECTED_STATE_OFFLINE,
|
||||||
MESSENGER_CONNECTED_STATE_ONLINE,
|
MESSENGER_CONNECTED_STATE_ONLINE,
|
||||||
MESSENGER_CONNECTED_STATE_MOBILE,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct packet_messenger_list_online
|
typedef struct packet_messenger_list_online
|
||||||
|
|
|
@ -22,14 +22,6 @@ void CPythonMessenger::OnFriendLogout(const char * c_szKey)
|
||||||
PyCallClassMemberFunc(m_poMessengerHandler, "OnLogout", Py_BuildValue("(is)", MESSENGER_GRUOP_INDEX_FRIEND, c_szKey));
|
PyCallClassMemberFunc(m_poMessengerHandler, "OnLogout", Py_BuildValue("(is)", MESSENGER_GRUOP_INDEX_FRIEND, c_szKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPythonMessenger::SetMobile(const char * c_szKey, BYTE byState)
|
|
||||||
{
|
|
||||||
m_FriendNameMap.insert(c_szKey);
|
|
||||||
|
|
||||||
if (m_poMessengerHandler)
|
|
||||||
PyCallClassMemberFunc(m_poMessengerHandler, "OnMobile", Py_BuildValue("(isi)", MESSENGER_GRUOP_INDEX_FRIEND, c_szKey, byState));
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL CPythonMessenger::IsFriendByKey(const char * c_szKey)
|
BOOL CPythonMessenger::IsFriendByKey(const char * c_szKey)
|
||||||
{
|
{
|
||||||
return m_FriendNameMap.end() != m_FriendNameMap.find(c_szKey);
|
return m_FriendNameMap.end() != m_FriendNameMap.find(c_szKey);
|
||||||
|
|
|
@ -22,7 +22,6 @@ class CPythonMessenger : public CSingleton<CPythonMessenger>
|
||||||
void RemoveFriend(const char * c_szKey);
|
void RemoveFriend(const char * c_szKey);
|
||||||
void OnFriendLogin(const char * c_szKey);
|
void OnFriendLogin(const char * c_szKey);
|
||||||
void OnFriendLogout(const char * c_szKey);
|
void OnFriendLogout(const char * c_szKey);
|
||||||
void SetMobile(const char * c_szKey, BYTE byState);
|
|
||||||
BOOL IsFriendByKey(const char * c_szKey);
|
BOOL IsFriendByKey(const char * c_szKey);
|
||||||
BOOL IsFriendByName(const char * c_szName);
|
BOOL IsFriendByName(const char * c_szName);
|
||||||
|
|
||||||
|
|
|
@ -309,7 +309,6 @@ class CPythonNetworkStream : public CNetworkStream, public CSingleton<CPythonNet
|
||||||
bool SendC2CPacket(DWORD dwSize, void * pData);
|
bool SendC2CPacket(DWORD dwSize, void * pData);
|
||||||
bool SendChatPacket(const char * c_szChat, BYTE byType = CHAT_TYPE_TALKING);
|
bool SendChatPacket(const char * c_szChat, BYTE byType = CHAT_TYPE_TALKING);
|
||||||
bool SendWhisperPacket(const char * name, const char * c_szChat);
|
bool SendWhisperPacket(const char * name, const char * c_szChat);
|
||||||
bool SendMobileMessagePacket(const char * name, const char * c_szChat);
|
|
||||||
bool SendMessengerAddByVIDPacket(DWORD vid);
|
bool SendMessengerAddByVIDPacket(DWORD vid);
|
||||||
bool SendMessengerAddByNamePacket(const char * c_szName);
|
bool SendMessengerAddByNamePacket(const char * c_szName);
|
||||||
bool SendMessengerRemovePacket(const char * c_szKey, const char * c_szName);
|
bool SendMessengerRemovePacket(const char * c_szKey, const char * c_szName);
|
||||||
|
|
|
@ -399,20 +399,6 @@ void CPythonNetworkStream::ServerCommand(char * c_szCommand)
|
||||||
IAbstractPlayer& rPlayer=IAbstractPlayer::GetSingleton();
|
IAbstractPlayer& rPlayer=IAbstractPlayer::GetSingleton();
|
||||||
rPlayer.StopStaminaConsume(dwCurrentStamina);
|
rPlayer.StopStaminaConsume(dwCurrentStamina);
|
||||||
}
|
}
|
||||||
else if (!strcmpi(szCmd, "sms"))
|
|
||||||
{
|
|
||||||
IAbstractPlayer& rPlayer=IAbstractPlayer::GetSingleton();
|
|
||||||
rPlayer.SetMobileFlag(TRUE);
|
|
||||||
}
|
|
||||||
else if (!strcmpi(szCmd, "nosms"))
|
|
||||||
{
|
|
||||||
IAbstractPlayer& rPlayer=IAbstractPlayer::GetSingleton();
|
|
||||||
rPlayer.SetMobileFlag(FALSE);
|
|
||||||
}
|
|
||||||
else if (!strcmpi(szCmd, "mobile_auth"))
|
|
||||||
{
|
|
||||||
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OnMobileAuthority", Py_BuildValue("()"));
|
|
||||||
}
|
|
||||||
else if (!strcmpi(szCmd, "messenger_auth"))
|
else if (!strcmpi(szCmd, "messenger_auth"))
|
||||||
{
|
{
|
||||||
const std::string & c_rstrName = TokenVector[1].c_str();
|
const std::string & c_rstrName = TokenVector[1].c_str();
|
||||||
|
|
|
@ -536,21 +536,6 @@ PyObject* netSendWhisperPacket(PyObject* poSelf, PyObject* poArgs)
|
||||||
return Py_BuildNone();
|
return Py_BuildNone();
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject* netSendMobileMessagePacket(PyObject* poSelf, PyObject* poArgs)
|
|
||||||
{
|
|
||||||
char* szName;
|
|
||||||
char* szLine;
|
|
||||||
if (!PyTuple_GetString(poArgs, 0, &szName))
|
|
||||||
return Py_BuildException();
|
|
||||||
|
|
||||||
if (!PyTuple_GetString(poArgs, 1, &szLine))
|
|
||||||
return Py_BuildException();
|
|
||||||
|
|
||||||
CPythonNetworkStream& rkNetStream=CPythonNetworkStream::Instance();
|
|
||||||
rkNetStream.SendMobileMessagePacket(szName, szLine);
|
|
||||||
return Py_BuildNone();
|
|
||||||
}
|
|
||||||
|
|
||||||
PyObject* netSendCharacterPositionPacket(PyObject* poSelf, PyObject* poArgs)
|
PyObject* netSendCharacterPositionPacket(PyObject* poSelf, PyObject* poArgs)
|
||||||
{
|
{
|
||||||
int iPosition;
|
int iPosition;
|
||||||
|
@ -1789,7 +1774,6 @@ void initnet()
|
||||||
{ "SendChatPacket", netSendChatPacket, METH_VARARGS },
|
{ "SendChatPacket", netSendChatPacket, METH_VARARGS },
|
||||||
{ "SendEmoticon", netSendEmoticon, METH_VARARGS },
|
{ "SendEmoticon", netSendEmoticon, METH_VARARGS },
|
||||||
{ "SendWhisperPacket", netSendWhisperPacket, METH_VARARGS },
|
{ "SendWhisperPacket", netSendWhisperPacket, METH_VARARGS },
|
||||||
{ "SendMobileMessagePacket", netSendMobileMessagePacket, METH_VARARGS },
|
|
||||||
|
|
||||||
{ "SendCharacterPositionPacket", netSendCharacterPositionPacket, METH_VARARGS },
|
{ "SendCharacterPositionPacket", netSendCharacterPositionPacket, METH_VARARGS },
|
||||||
|
|
||||||
|
|
|
@ -1446,24 +1446,6 @@ bool CPythonNetworkStream::SendWhisperPacket(const char * name, const char * c_s
|
||||||
return SendSequence();
|
return SendSequence();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPythonNetworkStream::SendMobileMessagePacket(const char * name, const char * c_szChat)
|
|
||||||
{
|
|
||||||
int iTextLen = strlen(c_szChat) + 1;
|
|
||||||
TPacketCGSMS SMSPacket;
|
|
||||||
SMSPacket.bHeader = HEADER_CG_SMS;
|
|
||||||
SMSPacket.wSize = sizeof(SMSPacket) + iTextLen;
|
|
||||||
|
|
||||||
strncpy(SMSPacket.szNameTo, name, sizeof(SMSPacket.szNameTo) - 1);
|
|
||||||
|
|
||||||
if (!Send(sizeof(SMSPacket), &SMSPacket))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!Send(iTextLen, c_szChat))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return SendSequence();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CPythonNetworkStream::RecvPointChange()
|
bool CPythonNetworkStream::RecvPointChange()
|
||||||
{
|
{
|
||||||
TPacketGCPointChange PointChange;
|
TPacketGCPointChange PointChange;
|
||||||
|
@ -2756,9 +2738,6 @@ bool CPythonNetworkStream::RecvMessenger()
|
||||||
else
|
else
|
||||||
CPythonMessenger::Instance().OnFriendLogout(char_name);
|
CPythonMessenger::Instance().OnFriendLogout(char_name);
|
||||||
|
|
||||||
if (on.connected & MESSENGER_CONNECTED_STATE_MOBILE)
|
|
||||||
CPythonMessenger::Instance().SetMobile(char_name, TRUE);
|
|
||||||
|
|
||||||
iSize -= sizeof(TPacketGCMessengerListOffline);
|
iSize -= sizeof(TPacketGCMessengerListOffline);
|
||||||
iSize -= on.length;
|
iSize -= on.length;
|
||||||
}
|
}
|
||||||
|
@ -2789,21 +2768,6 @@ bool CPythonNetworkStream::RecvMessenger()
|
||||||
CPythonMessenger::Instance().OnFriendLogout(char_name);
|
CPythonMessenger::Instance().OnFriendLogout(char_name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case MESSENGER_SUBHEADER_GC_MOBILE:
|
|
||||||
{
|
|
||||||
BYTE byState; // 모바일 번호가 없어졌는지 플래그
|
|
||||||
BYTE byLength;
|
|
||||||
if (!Recv(sizeof(byState), &byState))
|
|
||||||
return false;
|
|
||||||
if (!Recv(sizeof(byLength), &byLength))
|
|
||||||
return false;
|
|
||||||
if (!Recv(byLength, char_name))
|
|
||||||
return false;
|
|
||||||
char_name[byLength] = 0;
|
|
||||||
CPythonMessenger::Instance().SetMobile(char_name, byState);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1542,17 +1542,6 @@ DWORD CPythonPlayer::GetPKMode()
|
||||||
return pInstance->GetPKMode();
|
return pInstance->GetPKMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPythonPlayer::SetMobileFlag(BOOL bFlag)
|
|
||||||
{
|
|
||||||
m_bMobileFlag = bFlag;
|
|
||||||
PyCallClassMemberFunc(m_ppyGameWindow, "RefreshMobile", Py_BuildValue("()"));
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL CPythonPlayer::HasMobilePhoneNumber()
|
|
||||||
{
|
|
||||||
return m_bMobileFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CPythonPlayer::SetGameWindow(PyObject * ppyObject)
|
void CPythonPlayer::SetGameWindow(PyObject * ppyObject)
|
||||||
{
|
{
|
||||||
m_ppyGameWindow = ppyObject;
|
m_ppyGameWindow = ppyObject;
|
||||||
|
@ -1600,8 +1589,6 @@ void CPythonPlayer::ClearSkillDict()
|
||||||
m_fConsumeStaminaPerSec = 0.0f;
|
m_fConsumeStaminaPerSec = 0.0f;
|
||||||
m_fCurrentStamina = 0.0f;
|
m_fCurrentStamina = 0.0f;
|
||||||
|
|
||||||
m_bMobileFlag = FALSE;
|
|
||||||
|
|
||||||
__ClearAutoAttackTargetActorID();
|
__ClearAutoAttackTargetActorID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1673,8 +1660,6 @@ void CPythonPlayer::Clear()
|
||||||
|
|
||||||
m_inGuildAreaID = 0xffffffff;
|
m_inGuildAreaID = 0xffffffff;
|
||||||
|
|
||||||
m_bMobileFlag = FALSE;
|
|
||||||
|
|
||||||
__ClearAutoAttackTargetActorID();
|
__ClearAutoAttackTargetActorID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -400,11 +400,6 @@ class CPythonPlayer : public CSingleton<CPythonPlayer>, public IAbstractPlayer
|
||||||
DWORD GetPKMode();
|
DWORD GetPKMode();
|
||||||
|
|
||||||
|
|
||||||
// Mobile
|
|
||||||
void SetMobileFlag(BOOL bFlag);
|
|
||||||
BOOL HasMobilePhoneNumber();
|
|
||||||
|
|
||||||
|
|
||||||
// Combo
|
// Combo
|
||||||
void SetComboSkillFlag(BOOL bFlag);
|
void SetComboSkillFlag(BOOL bFlag);
|
||||||
|
|
||||||
|
@ -648,9 +643,6 @@ class CPythonPlayer : public CSingleton<CPythonPlayer>, public IAbstractPlayer
|
||||||
// Guild
|
// Guild
|
||||||
DWORD m_inGuildAreaID;
|
DWORD m_inGuildAreaID;
|
||||||
|
|
||||||
// Mobile
|
|
||||||
BOOL m_bMobileFlag;
|
|
||||||
|
|
||||||
// System
|
// System
|
||||||
BOOL m_sysIsCoolTime;
|
BOOL m_sysIsCoolTime;
|
||||||
BOOL m_sysIsLevelLimit;
|
BOOL m_sysIsLevelLimit;
|
||||||
|
|
|
@ -1875,11 +1875,6 @@ PyObject * playerGetPKMode(PyObject* poSelf, PyObject* poArgs)
|
||||||
return Py_BuildValue("i", CPythonPlayer::Instance().GetPKMode());
|
return Py_BuildValue("i", CPythonPlayer::Instance().GetPKMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject * playerHasMobilePhoneNumber(PyObject* poSelf, PyObject* poArgs)
|
|
||||||
{
|
|
||||||
return Py_BuildValue("i", CPythonPlayer::Instance().HasMobilePhoneNumber());
|
|
||||||
}
|
|
||||||
|
|
||||||
PyObject * playerSetWeaponAttackBonusFlag(PyObject* poSelf, PyObject* poArgs)
|
PyObject * playerSetWeaponAttackBonusFlag(PyObject* poSelf, PyObject* poArgs)
|
||||||
{
|
{
|
||||||
int iFlag;
|
int iFlag;
|
||||||
|
@ -2313,9 +2308,6 @@ void initPlayer()
|
||||||
// PK Mode
|
// PK Mode
|
||||||
{ "GetPKMode", playerGetPKMode, METH_VARARGS },
|
{ "GetPKMode", playerGetPKMode, METH_VARARGS },
|
||||||
|
|
||||||
// Mobile
|
|
||||||
{ "HasMobilePhoneNumber", playerHasMobilePhoneNumber, METH_VARARGS },
|
|
||||||
|
|
||||||
// Emotion
|
// Emotion
|
||||||
{ "RegisterEmotionIcon", playerRegisterEmotionIcon, METH_VARARGS },
|
{ "RegisterEmotionIcon", playerRegisterEmotionIcon, METH_VARARGS },
|
||||||
{ "GetEmotionIconImage", playerGetEmotionIconImage, METH_VARARGS },
|
{ "GetEmotionIconImage", playerGetEmotionIconImage, METH_VARARGS },
|
||||||
|
|
Loading…
Reference in New Issue