Bvural41 1
Bvural41
Hikaye Ekle

Ticaret güvenlik onayı [Python]

  • Konuyu başlatan Konuyu başlatan Black Widow
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 38
  • Görüntüleme Görüntüleme 6K
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Ticaret esnasında yanlışlıkla kabul butonuna basıldığında alınan bir güvenlik önlemidir.

root > uiexchange.py açılır

aratılır ;
Kod:
def AcceptExchange(self):

kod satırı silinir veya değiştirilir ;
Kod:
    def AcceptExchange(self):
        import uiCommon
        questionDialog = uiCommon.QuestionDialog3()
        questionDialog.SetText1(localeInfo.TICARET_SORGU1)
        questionDialog.SetText2(localeInfo.TICARET_SORGU2)
        questionDialog.SetText3(localeInfo.TICARET_SORGU3)
        questionDialog.SetAcceptEvent(ui.__mem_func__(self.Onayla))
        questionDialog.SetCancelEvent(ui.__mem_func__(self.Reddet))
        questionDialog.Open()
        self.questionDialog = questionDialog
    
    def Onayla(self):
        self.questionDialog.Close()
        net.SendExchangeAcceptPacket()
        self.AcceptButton.Disable()
        snd.PlaySound('sound/effect/etc/levelup_2/levelup1_2.wav')
        
    def Reddet(self):
        self.questionDialog.Close()

root > uicommon.py açılır ve en alta eklenir;
Kod:
class QuestionDialog3(QuestionDialog):


    def __init__(self):
        QuestionDialog.__init__(self)
        self.__CreateDialog()


    def __del__(self):
        QuestionDialog.__del__(self)


    def __CreateDialog(self):
        pyScrLoader = ui.PythonScriptLoader()
        pyScrLoader.LoadScriptFile(self, "uiscript/questiondialog3.py")


        self.board = self.GetChild("board")
        self.textLine1 = self.GetChild("message1")
        self.textLine2 = self.GetChild("message2")
        self.textLine3 = self.GetChild("message3")
        self.acceptButton = self.GetChild("accept")
        self.cancelButton = self.GetChild("cancel")


    def SetText1(self, text):
        self.textLine1.SetText(text)


    def SetText2(self, text):
        self.textLine2.SetText(text)
    
    def SetText3(self, text):
        self.textLine3.SetText(text)


verdiğim dosyayı uiscript içerisinde atın ;




locale_tr > locale_game.txt ekle ( )
Kod:
TICARET_SORGU1    Birilerine birşeyler teslim etmek üzeresin.
TICARET_SORGU2    Bu geri alınamaz. Herşeyin doğru olduğuna,
TICARET_SORGU3    emin misin?

Düzenlemeye dair görüntü :
13754315_1036079649800931_1959226848182761048_n.jpg

Tebrikler Başarılarının Devamını Diliyorum.
 
sistemde ufak bi hata var buton içine giriyor çözümü ise

root > uiexchange.py
açılır

aratılır ;
Kod:
def AcceptExchange(self):

def AcceptExchange(self):
import uiCommon
questionDialog = uiCommon.QuestionDialog3()
questionDialog.SetText1(localeInfo.TICARET_SORGU1)
questionDialog.SetText2(localeInfo.TICARET_SORGU2)
questionDialog.SetText3(localeInfo.TICARET_SORGU3)
questionDialog.SetAcceptEvent(ui.__mem_func__(self.Onayla))
questionDialog.SetCancelEvent(ui.__mem_func__(self.Reddet))
questionDialog.Open()
self.questionDialog = questionDialog

def Onayla(self):
self.questionDialog.Close()
net.SendExchangeAcceptPacket()
self.AcceptButton.Enable()

def Reddet(self):
self.questionDialog.Close()
 
sistemde ufak bi hata var buton içine giriyor çözümü ise

root > uiexchange.py
açılır

aratılır ;
Kod:
def AcceptExchange(self):

def AcceptExchange(self):
import uiCommon
questionDialog = uiCommon.QuestionDialog3()
questionDialog.SetText1(localeInfo.TICARET_SORGU1)
questionDialog.SetText2(localeInfo.TICARET_SORGU2)
questionDialog.SetText3(localeInfo.TICARET_SORGU3)
questionDialog.SetAcceptEvent(ui.__mem_func__(self.Onayla))
questionDialog.SetCancelEvent(ui.__mem_func__(self.Reddet))
questionDialog.Open()
self.questionDialog = questionDialog

def Onayla(self):
self.questionDialog.Close()
net.SendExchangeAcceptPacket()
self.AcceptButton.Enable()

def Reddet(self):
self.questionDialog.Close()

sistemi kullanma bug var ticarette degil başka birşeyde.
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst