INTREBARE

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Închis
Avatar utilizator
Kyoura
Nivel 5

Nivel 5
Mesaje: 760
Membru din: 15 Dec 2014, 17:58
Server: Hypnos2
Regat: Jinno
Aprecieri: 293  
Mulţumiri: 45  
 Contact:
Medalii

Unde pot gasi si eu functia de echipare/dezechipare armura/costum in client?
Avatar utilizator
Kyoura
Nivel 5

Nivel 5
Mesaje: 760
Membru din: 15 Dec 2014, 17:58
Server: Hypnos2
Regat: Jinno
Aprecieri: 293  
Mulţumiri: 45  
 Contact:
Medalii

UP
Avatar utilizator
Dyzu
Nivel 2

Nivel 2
Mesaje: 189
Membru din: 20 Feb 2014, 18:53
Server: All
Regat: Jinno
Aprecieri: 32  
Mulţumiri: 14  
Medalii

In root>game.py
Functia pentru echipare:

Cod: Selectaţi tot

def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
Functia pentru dezechipare:

Cod: Selectaţi tot

def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):

Functiile integrale arata asa:
Echipare

Cod: Selectaţi tot

	def __PutItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount, dstChrID):
		if TRUE == chr.HasInstance(self.PickingCharacterIndex) and player.GetMainCharacterIndex() != dstChrID:
			if player.IsEquipmentSlot(attachedItemSlotPos):
				self.stream.popupWindow.Close()
				self.stream.popupWindow.Open(locale.EXCHANGE_FAILURE_EQUIP_ITEM, 0, locale.UI_OK)
			else:
				if chr.IsNPC(dstChrID):
					net.SendGiveItemPacket(dstChrID, attachedItemSlotPos, attachedItemCount)
				else:
					net.SendExchangeStartPacket(dstChrID)
					net.SendExchangeItemAddPacket(attachedItemSlotPos, 0)
		else:
			self.__DropItem(attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount)
Dezechipare:

Cod: Selectaţi tot

	def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount):
		# PRIVATESHOP_DISABLE_ITEM_DROP - 개인상점 열고 있는 동안 아이템 버림 방지
		if uiPrivateShopBuilder.IsBuildingPrivateShop():			
			chat.AppendChat(chat.CHAT_TYPE_INFO, locale.DROP_ITEM_FAILURE_PRIVATE_SHOP)
			return
		# END_OF_PRIVATESHOP_DISABLE_ITEM_DROP
		
		if player.IsEquipmentSlot(attachedItemSlotPos):
			self.stream.popupWindow.Close()
			self.stream.popupWindow.Open(locale.DROP_ITEM_FAILURE_EQUIP_ITEM, 0, locale.UI_OK)

		else:
			dropItemIndex = player.GetItemIndex(attachedItemSlotPos)

			item.SelectItem(dropItemIndex)
			dropItemName = item.GetItemName()

			## Question Text
			questionText = locale.HOW_MANY_ITEM_DO_YOU_DROP(dropItemName, attachedItemCount)

			## Dialog
			itemDropQuestionDialog = uiCommon.QuestionDialog()
			itemDropQuestionDialog.SetText(questionText)
			itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg))
			itemDropQuestionDialog.SetCancelEvent(lambda arg=FALSE: self.RequestDropItem(arg))
			itemDropQuestionDialog.Open()
			itemDropQuestionDialog.dropType = attachedType
			itemDropQuestionDialog.dropNumber = attachedItemSlotPos
			itemDropQuestionDialog.dropCount = attachedItemCount
			self.itemDropQuestionDialog = itemDropQuestionDialog

			constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(1)
Pentru acest mesaj, Dyzu for the post:
Kyoura
Avatar utilizator
Kyoura
Nivel 5

Nivel 5
Mesaje: 760
Membru din: 15 Dec 2014, 17:58
Server: Hypnos2
Regat: Jinno
Aprecieri: 293  
Mulţumiri: 45  
 Contact:
Medalii

Merci :)

[ Postat de pe Android ] Imagine
Avatar utilizator
G!uKy
Fost Super Ad Moderator

Fost Super Ad Moderator
Mesaje: 770
Membru din: 24 Iul 2013, 20:07
Aprecieri: 5  
Mulţumiri: 157  
 Contact:
Medalii

Marcat ca rezolvat
Închis
Răspunsuri
2
Vizualizări
429
Răspunsuri
1
Vizualizări
209
Răspunsuri
5
Vizualizări
601

Înapoi la “Probleme rezolvate”

  • Informaţie