Fixed wrong pointers towards JPG files, applied script safeguards for auto potions
This commit is contained in:
@@ -51,10 +51,22 @@ import stringCommander
|
||||
|
||||
from _weakref import proxy
|
||||
|
||||
# TEXTTAIL_LIVINGTIME_CONTROL
|
||||
#if localeInfo.IsJAPAN():
|
||||
# app.SetTextTailLivingTime(8.0)
|
||||
# END_OF_TEXTTAIL_LIVINGTIME_CONTROL
|
||||
|
||||
# SCREENSHOT_CWDSAVE
|
||||
SCREENSHOT_CWDSAVE = False
|
||||
SCREENSHOT_DIR = None
|
||||
|
||||
if localeInfo.IsEUROPE():
|
||||
SCREENSHOT_CWDSAVE = True
|
||||
|
||||
if localeInfo.IsCIBN10():
|
||||
SCREENSHOT_CWDSAVE = False
|
||||
SCREENSHOT_DIR = "YT2W"
|
||||
|
||||
cameraDistance = 1550.0
|
||||
cameraPitch = 27.0
|
||||
cameraRotation = 0.0
|
||||
@@ -105,7 +117,7 @@ class GameWindow(ui.ScriptWindow):
|
||||
self.playerGauge = uiPlayerGauge.PlayerGauge(self)
|
||||
self.playerGauge.Hide()
|
||||
|
||||
#wj 2014.1.2. ESC키를 누를 시 우선적으로 DropQuestionDialog를 끄도록 만들었다. 하지만 처음에 itemDropQuestionDialog가 선언되어 있지 않아 ERROR가 발생하여 init에서 선언과 동시에 초기화 시킴.
|
||||
#wj 2014.1.2. ESCŰ<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>켱<EFBFBD><ECBCB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DropQuestionDialog<6F><67> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> itemDropQuestionDialog<6F><67> <20><><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʾ<EFBFBD> ERROR<4F><52> <20><EFBFBD><DFBB>Ͽ<EFBFBD> init<69><74><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20>ʱ<EFBFBD>ȭ <20><>Ŵ.
|
||||
self.itemDropQuestionDialog = None
|
||||
|
||||
self.__SetQuickSlotMode()
|
||||
@@ -214,7 +226,7 @@ class GameWindow(ui.ScriptWindow):
|
||||
exception.Abort("GameWindow.Open")
|
||||
# END_OF_START_GAME_ERROR_EXIT
|
||||
|
||||
# NPC가 큐브시스템으로 만들 수 있는 아이템들의 목록을 캐싱
|
||||
# NPC<EFBFBD><EFBFBD> ť<><C5A5>ý<EFBFBD><C3BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>۵<EFBFBD><DBB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> ij<><C4B3>
|
||||
# ex) cubeInformation[20383] = [ {"rewordVNUM": 72723, "rewordCount": 1, "materialInfo": "101,1&102,2", "price": 999 }, ... ]
|
||||
self.cubeInformation = {}
|
||||
self.currentCubeNPC = 0
|
||||
@@ -302,10 +314,10 @@ class GameWindow(ui.ScriptWindow):
|
||||
def __BuildKeyDict(self):
|
||||
onPressKeyDict = {}
|
||||
|
||||
##PressKey 는 누르고 있는 동안 계속 적용되는 키이다.
|
||||
##PressKey <EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>Ǵ<EFBFBD> Ű<>̴<EFBFBD>.
|
||||
|
||||
## 숫자 단축키 퀵슬롯에 이용된다.(이후 숫자들도 퀵 슬롯용 예약)
|
||||
## F12 는 클라 디버그용 키이므로 쓰지 않는 게 좋다.
|
||||
## <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ű <20><><EFBFBD><EFBFBD><EFBFBD>Կ<EFBFBD> <20>̿<EFBFBD>ȴ<EFBFBD>.(<28><><EFBFBD><EFBFBD> <20><><EFBFBD>ڵ鵵 <20><> <20><><EFBFBD>Կ<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
## F12 <EFBFBD><EFBFBD> Ŭ<><C5AC> <20><><EFBFBD><EFBFBD><EFBFBD> Ű<>̹Ƿ<CCB9> <20><><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD>.
|
||||
onPressKeyDict[app.DIK_1] = lambda : self.__PressNumKey(1)
|
||||
onPressKeyDict[app.DIK_2] = lambda : self.__PressNumKey(2)
|
||||
onPressKeyDict[app.DIK_3] = lambda : self.__PressNumKey(3)
|
||||
@@ -325,7 +337,7 @@ class GameWindow(ui.ScriptWindow):
|
||||
onPressKeyDict[app.DIK_SYSRQ] = lambda : self.SaveScreen()
|
||||
onPressKeyDict[app.DIK_SPACE] = lambda : self.StartAttack()
|
||||
|
||||
#캐릭터 이동키
|
||||
#ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̵<EFBFBD>Ű
|
||||
onPressKeyDict[app.DIK_UP] = lambda : self.MoveUp()
|
||||
onPressKeyDict[app.DIK_DOWN] = lambda : self.MoveDown()
|
||||
onPressKeyDict[app.DIK_LEFT] = lambda : self.MoveLeft()
|
||||
@@ -430,7 +442,6 @@ class GameWindow(ui.ScriptWindow):
|
||||
|
||||
def __PressNumKey(self,num):
|
||||
if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
|
||||
|
||||
if num >= 1 and num <= 9:
|
||||
if(chrmgr.IsPossibleEmoticon(-1)):
|
||||
chrmgr.SetEmoticon(-1,int(num)-1)
|
||||
@@ -507,13 +518,13 @@ class GameWindow(ui.ScriptWindow):
|
||||
self.pressNumber=ui.__mem_func__(self.__SelectQuickPage)
|
||||
|
||||
def __PressQuickSlot(self, localSlotIndex):
|
||||
if app.IsRTL():
|
||||
if localeInfo.IsARABIC():
|
||||
if 0 <= localSlotIndex and localSlotIndex < 4:
|
||||
player.RequestUseLocalQuickSlot(3-localSlotIndex)
|
||||
else:
|
||||
player.RequestUseLocalQuickSlot(11-localSlotIndex)
|
||||
else:
|
||||
player.RequestUseLocalQuickSlot(localSlotIndex)
|
||||
player.RequestUseLocalQuickSlot(localSlotIndex)
|
||||
|
||||
def __SelectQuickPage(self, pageIndex):
|
||||
self.quickSlotPageIndex = pageIndex
|
||||
@@ -572,12 +583,12 @@ class GameWindow(ui.ScriptWindow):
|
||||
self.TextureNum.SetFontName(localeInfo.UI_DEF_FONT)
|
||||
self.TextureNum.SetPosition(wndMgr.GetScreenWidth() - 270, 100)
|
||||
|
||||
# 오브젝트 그리는 개수
|
||||
# <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
self.ObjectNum = ui.TextLine()
|
||||
self.ObjectNum.SetFontName(localeInfo.UI_DEF_FONT)
|
||||
self.ObjectNum.SetPosition(wndMgr.GetScreenWidth() - 270, 120)
|
||||
|
||||
# 시야거리
|
||||
# <EFBFBD>þ߰Ÿ<EFBFBD>
|
||||
self.ViewDistance = ui.TextLine()
|
||||
self.ViewDistance.SetFontName(localeInfo.UI_DEF_FONT)
|
||||
self.ViewDistance.SetPosition(0, 0)
|
||||
@@ -1304,6 +1315,18 @@ class GameWindow(ui.ScriptWindow):
|
||||
self.stream.popupWindow.Close()
|
||||
self.stream.popupWindow.Open(localeInfo.EXCHANGE_FAILURE_EQUIP_ITEM, 0, localeInfo.UI_OK)
|
||||
else:
|
||||
# MR-3: Auto-deactivate auto potions before moving out (dragging onto character)
|
||||
if attachedType == player.SLOT_TYPE_INVENTORY:
|
||||
itemVnum = player.GetItemIndex(attachedInvenType, attachedItemSlotPos)
|
||||
|
||||
if constInfo.IS_AUTO_POTION(itemVnum):
|
||||
metinSocket = [player.GetItemMetinSocket(attachedInvenType, attachedItemSlotPos, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]
|
||||
isActivated = (0 != int(metinSocket[0]))
|
||||
|
||||
if isActivated:
|
||||
net.SendItemUsePacket(attachedItemSlotPos)
|
||||
# MR-3: -- END OF -- Auto-deactivate auto potions before moving out
|
||||
|
||||
if chr.IsNPC(dstChrID):
|
||||
net.SendGiveItemPacket(dstChrID, attachedInvenType, attachedItemSlotPos, attachedItemCount)
|
||||
else:
|
||||
@@ -1320,7 +1343,7 @@ class GameWindow(ui.ScriptWindow):
|
||||
self.__DropMoney(attachedType, attachedMoney)
|
||||
|
||||
def __DropMoney(self, attachedType, attachedMoney):
|
||||
# PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
|
||||
# PRIVATESHOP_DISABLE_ITEM_DROP - <EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
if uiPrivateShopBuilder.IsBuildingPrivateShop():
|
||||
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
|
||||
return
|
||||
@@ -1342,7 +1365,7 @@ class GameWindow(ui.ScriptWindow):
|
||||
self.itemDropQuestionDialog = itemDropQuestionDialog
|
||||
|
||||
def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
|
||||
# PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
|
||||
# PRIVATESHOP_DISABLE_ITEM_DROP - <EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
if uiPrivateShopBuilder.IsBuildingPrivateShop():
|
||||
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP)
|
||||
return
|
||||
@@ -1474,7 +1497,7 @@ class GameWindow(ui.ScriptWindow):
|
||||
|
||||
def UpdateDebugInfo(self):
|
||||
#
|
||||
# 캐릭터 좌표 및 FPS 출력
|
||||
# ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ǥ <20><> FPS <EFBFBD><EFBFBD><EFBFBD>
|
||||
(x, y, z) = player.GetMainCharacterPosition()
|
||||
nUpdateTime = app.GetUpdateTime()
|
||||
nUpdateFPS = app.GetUpdateFPS()
|
||||
@@ -1637,22 +1660,22 @@ class GameWindow(ui.ScriptWindow):
|
||||
def BINARY_Cube_Close(self):
|
||||
self.interface.CloseCubeWindow()
|
||||
|
||||
# 제작에 필요한 골드, 예상되는 완성품의 VNUM과 개수 정보 update
|
||||
# <EFBFBD><EFBFBD><EFBFBD>ۿ<EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20><><EFBFBD>, <20><><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20>ϼ<EFBFBD>ǰ<EFBFBD><C7B0> VNUM<55><4D> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> update
|
||||
def BINARY_Cube_UpdateInfo(self, gold, itemVnum, count):
|
||||
self.interface.UpdateCubeInfo(gold, itemVnum, count)
|
||||
|
||||
def BINARY_Cube_Succeed(self, itemVnum, count):
|
||||
print "큐브 제작 성공"
|
||||
print "ť<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
self.interface.SucceedCubeWork(itemVnum, count)
|
||||
pass
|
||||
|
||||
def BINARY_Cube_Failed(self):
|
||||
print "큐브 제작 실패"
|
||||
print "ť<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
self.interface.FailedCubeWork()
|
||||
pass
|
||||
|
||||
def BINARY_Cube_ResultList(self, npcVNUM, listText):
|
||||
# ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 이런식으로 "/" 문자로 구분된 리스트를 줌
|
||||
# ResultList Text Format : 72723,1/72725,1/72730.1/50001,5 <EFBFBD>̷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "/" <20><><EFBFBD>ڷ<EFBFBD> <20><><EFBFBD>е<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><>
|
||||
#print listText
|
||||
|
||||
if npcVNUM == 0:
|
||||
@@ -1753,7 +1776,7 @@ class GameWindow(ui.ScriptWindow):
|
||||
|
||||
# END_OF_CUBE
|
||||
|
||||
# 용혼석
|
||||
# <EFBFBD><EFBFBD>ȥ<EFBFBD><EFBFBD>
|
||||
def BINARY_Highlight_Item(self, inven_type, inven_pos):
|
||||
self.interface.Highligt_Item(inven_type, inven_pos)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user