def SetSkill(self, skillSlotNumber): slotNumber = 0 skillIndex = player.GetSkillIndex(skillSlotNumber) skillGrade = player.GetSkillGrade(skillSlotNumber) skillLevel = player.GetSkillLevel(skillSlotNumber) skillType = skill.GetSkillType(skillIndex) self.skillIndex = skillIndex if 0 == self.skillIndex: self.ClearSlot(slotNumber) return self.slotIndex = skillSlotNumber self.SetSkillSlotNew(slotNumber, skillIndex, skillGrade, skillLevel) self.SetSlotCountNew(slotNumber, skillGrade, skillLevel) ## NOTE : CoolTime 체크 if player.IsSkillCoolTime(skillSlotNumber): (coolTime, elapsedTime) = player.GetSkillCoolTime(skillSlotNumber) self.SetSlotCoolTime(slotNumber, coolTime, elapsedTime) ## NOTE : Activate 되어 있다면 아이콘도 업데이트 if player.IsSkillActive(skillSlotNumber): self.ActivateSlot(slotNumber)
def Update(self): if self.BuffStatus: player.SetTarget(int(self.TargetVID)) if self.Cooltime == 0: self.Cooltime = time.clock() else: Time = time.clock() if self.Cooltime == -1: TimeToWait = 0 else: TimeToWait = self.Cooltime + self.BuffDelay if TimeToWait < Time: if self.Segen: if player.IsSkillCoolTime(4) == 0: player.ClickSkillSlot(4) else: self.sk1 = 1 if self.Reflekt: if player.IsSkillCoolTime(5) == 0: player.ClickSkillSlot(5) else: self.sk2 = 1 if self.HDD: if player.IsSkillCoolTime(6) == 0: player.ClickSkillSlot(6) else: self.sk3 = 1 if self.Segen != 1: self.sk1 = 1 if self.Reflekt != 1: self.sk2=1 if self.HDD != 1: self.sk3 = 1 if self.sk1 == 1 and self.sk2 == 1 and self.sk3 == 1: self.Cooltime = 0 self.sk1 = 0 self.sk2 = 0 self.sk3 = 0 else: self.TargetVID = player.GetTargetVID() self.Name.SetText(chr.GetNameByVID(self.TargetVID)) self.UpdateBuff = OpenLib.WaitingDialog() self.UpdateBuff.Open(0.5) self.UpdateBuff.SAFE_SetTimeOverEvent(self.Update)
def RefreshQuickSlot(self): pageNum = player.GetQuickPage() try: self.quickPageNumImageBox.LoadImage(TaskBar.QUICKPAGE_NUMBER_FILENAME[pageNum]) except: pass startNumber = 0 for slot in self.quickslot: for i in xrange(4): slotNumber = i+startNumber (Type, Position) = player.GetLocalQuickSlot(slotNumber) if player.SLOT_TYPE_NONE == Type: slot.ClearSlot(slotNumber) continue if player.SLOT_TYPE_INVENTORY == Type: itemIndex = player.GetItemIndex(Position) itemCount = player.GetItemCount(Position) if itemCount <= 1: itemCount = 0 ## 자동물약 (#72723, #72724) 특수처리 - 아이템인데도 슬롯에 활성화/비활성화 표시를 위한 작업임 - [hyo] if constInfo.IS_AUTO_POTION(itemIndex): # metinSocket - [0] : 활성화 여부, [1] : 사용한 양, [2] : 최대 용량 metinSocket = [player.GetItemMetinSocket(Position, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)] if 0 != int(metinSocket[0]): slot.ActivateSlot(slotNumber) else: slot.DeactivateSlot(slotNumber) slot.SetItemSlot(slotNumber, itemIndex, itemCount) elif player.SLOT_TYPE_SKILL == Type: skillIndex = player.GetSkillIndex(Position) if 0 == skillIndex: slot.ClearSlot(slotNumber) continue skillType = skill.GetSkillType(skillIndex) if skill.SKILL_TYPE_GUILD == skillType: import guild skillGrade = 0 skillLevel = guild.GetSkillLevel(Position) else: skillGrade = player.GetSkillGrade(Position) skillLevel = player.GetSkillLevel(Position) slot.SetSkillSlotNew(slotNumber, skillIndex, skillGrade, skillLevel) slot.SetSlotCountNew(slotNumber, skillGrade, skillLevel) slot.SetCoverButton(slotNumber) ## NOTE : CoolTime 체크 if player.IsSkillCoolTime(Position): (coolTime, elapsedTime) = player.GetSkillCoolTime(Position) slot.SetSlotCoolTime(slotNumber, coolTime, elapsedTime) ## NOTE : Activate 되어 있다면 아이콘도 업데이트 if player.IsSkillActive(Position): slot.ActivateSlot(slotNumber) elif player.SLOT_TYPE_EMOTION == Type: emotionIndex = Position slot.SetEmotionSlot(slotNumber, emotionIndex) slot.SetCoverButton(slotNumber) slot.SetSlotCount(slotNumber, 0) slot.RefreshSlot() startNumber += 4
def RefreshQuickSlot(self): pageNum = player.GetQuickPage() try: self.quickPageNumImageBox.LoadImage( TaskBar.QUICKPAGE_NUMBER_FILENAME[pageNum]) except: pass startNumber = 0 for slot in self.quickslot: for i in xrange(4): slotNumber = i + startNumber (Type, Position) = player.GetLocalQuickSlot(slotNumber) if player.SLOT_TYPE_NONE == Type: slot.ClearSlot(slotNumber) continue if player.SLOT_TYPE_INVENTORY == Type: itemIndex = player.GetItemIndex(Position) itemCount = player.GetItemCount(Position) if itemCount <= 1: itemCount = 0 if constInfo.IS_AUTO_POTION(itemIndex): metinSocket = [ player.GetItemMetinSocket(Position, j) for j in xrange(player.METIN_SOCKET_MAX_NUM) ] if 0 != int(metinSocket[0]): slot.ActivateSlot(slotNumber) else: slot.DeactivateSlot(slotNumber) if app.ENABLE_GROWTH_PET_SYSTEM: if constInfo.IS_PET_ITEM(itemIndex): self.__SetCoolTimePetItemSlot( slot, Position, slotNumber, itemIndex) slot.DeactivateSlot(slotNumber) active_id = player.GetActivePetItemId() if active_id and active_id == player.GetItemMetinSocket( Position, 2): slot.ActivateSlot(slotNumber) slot.SetItemSlot(slotNumber, itemIndex, itemCount) elif player.SLOT_TYPE_SKILL == Type: skillIndex = player.GetSkillIndex(Position) if 0 == skillIndex: slot.ClearSlot(slotNumber) continue skillType = skill.GetSkillType(skillIndex) if skill.SKILL_TYPE_GUILD == skillType: import guild skillGrade = 0 skillLevel = guild.GetSkillLevel(Position) else: skillGrade = player.GetSkillGrade(Position) skillLevel = player.GetSkillLevel(Position) slot.SetSkillSlotNew(slotNumber, skillIndex, skillGrade, skillLevel) slot.SetSlotCountNew(slotNumber, skillGrade, skillLevel) slot.SetCoverButton(slotNumber) if player.IsSkillCoolTime(Position): (coolTime, elapsedTime) = player.GetSkillCoolTime(Position) slot.SetSlotCoolTime(slotNumber, coolTime, elapsedTime) if player.IsSkillActive(Position): slot.ActivateSlot(slotNumber) elif player.SLOT_TYPE_EMOTION == Type: emotionIndex = Position slot.SetEmotionSlot(slotNumber, emotionIndex) slot.SetCoverButton(slotNumber) slot.SetSlotCount(slotNumber, 0) slot.RefreshSlot() startNumber += 4