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 ClickSkillSlot(self, slotIndex): srcSlotIndex = self.__RealSkillSlotToSourceSlot(slotIndex) skillIndex = player.GetSkillIndex(srcSlotIndex) skillType = skill.GetSkillType(skillIndex) if not self.__CanUseSkillNow(): if skill.SKILL_TYPE_ACTIVE == skillType: return for slotWindow in self.skillPageDict.values(): if slotWindow.HasSlot(slotIndex): if skill.CanUseSkill(skillIndex): player.ClickSkillSlot(srcSlotIndex) return mouseModule.mouseController.DeattachObject()