- Mesaj
- 313
- Çözümler
- 6
- Beğeni
- 22
- Puan
- 459
- Ticaret Puanı
- 0
Player target ekledim karaktere vurunca oyundan atıyor yardımcı olabilir misiniz
Python:
if app.ENABLE_VIEW_TARGET_MONSTER_HP:
def SetHP(self, hpPercentage, iMinHP, iMaxHP):
if not self.hpGauge.IsShow():
if app.ENABLE_VIEW_TARGET_MONSTER_HP:
showingButtonCount = len(self.showingButtonList)
if showingButtonCount > 0:
if chr.GetInstanceType(self.vid) == chr.INSTANCE_TYPE_PLAYER:
self.SetSize(max(150 + 75 * 3, showingButtonCount * 75), self.GetHeight())
else:
self.SetSize(200 + 7 * self.nameLength, self.GetHeight())
else:
self.SetSize(200 + 7 * self.nameLength, self.GetHeight())
else:
self.SetSize(200 + 7 * self.nameLength, self.GetHeight())
self.name.SetPosition(23, 13)
self.name.SetWindowHorizontalAlignLeft()
self.name.SetHorizontalAlignLeft()
self.hpGauge.Show()
# Sadece MOB'larda % göster
if constInfo.ENABLE_HEALTH_PERCENT_SYSTEM:
if chr.GetInstanceType(self.vid) != chr.INSTANCE_TYPE_PLAYER:
self.hpPercenttxt.SetPosition(200 + 7 * self.nameLength - 205, 13)
self.hpPercenttxt.Show()
else:
self.hpPercenttxt.Hide()
# self.hpGaugeDMG.Show() gibi barlar istenirse burada açılabilir
self.UpdatePosition()
if app.ENABLE_SHOW_STROKE_INFO:
self.GetStrokeByVid(self.GetTargetVID())
self.hpGauge.SetPercentage(hpPercentage, 100)
if app.ENABLE_POISON_GAUGE_SYSTEM:
self.hpGaugePoison.SetPercentage(hpPercentage, 100)
# Sadece MOB'lar için % yazısını güncelle
if constInfo.ENABLE_HEALTH_PERCENT_SYSTEM:
if chr.GetInstanceType(self.vid) != chr.INSTANCE_TYPE_PLAYER:
self.hpPercenttxt.SetText("%d%%" % hpPercentage)
if app.ENABLE_VIEW_TARGET_MONSTER_HP:
iMinHPText = '.'.join([i - 3 < 0 and str(iMinHP)[:i] or str(iMinHP)[i - 3:i] for i in range(len(str(iMinHP)) % 3, len(str(iMinHP)) + 1, 3) if i])
iMaxHPText = '.'.join([i - 3 < 0 and str(iMaxHP)[:i] or str(iMaxHP)[i - 3:i] for i in range(len(str(iMaxHP)) % 3, len(str(iMaxHP)) + 1, 3) if i])
self.hpDecimal.SetText(str(iMinHPText) + "/" + str(iMaxHPText))
if app.ENABLE_POISON_GAUGE_SYSTEM:
self.hpDecimalPoison.SetText(str(iMinHPText) + "/" + str(iMaxHPText))
(textWidth, textHeight) = self.hpDecimal.GetTextSize()
self.hpDecimal.SetPosition(130 / 2 - textWidth / 2, -13)
if app.ENABLE_POISON_GAUGE_SYSTEM:
self.hpDecimalPoison.SetPosition(130 / 2 - textWidth / 2, -13)
self.hpDecimal.Show()