Jump to content

Ikarus_

Developer
  • Posts

    402
  • Joined

  • Last visited

  • Days Won

    20
  • Feedback

    0%

Posts posted by Ikarus_

  1. No man , 
    I just read the python code responsible for the effect in question.
     

    	def OverInItem(self, overSlotPos):
    		overSlotPos = self.__InventoryLocalSlotPosToGlobalSlotPos(overSlotPos)
    		self.wndItem.SetUsableItem(False)
    
    		if mouseModule.mouseController.isAttached():
    			attachedItemType = mouseModule.mouseController.GetAttachedType()
    			if player.SLOT_TYPE_INVENTORY == attachedItemType:
    
    				attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
    				attachedItemVNum = mouseModule.mouseController.GetAttachedItemIndex()
    				
    				if self.__CanUseSrcItemToDstItem(attachedItemVNum, attachedSlotPos, overSlotPos):
    					self.wndItem.SetUsableItem(True)
    					self.ShowToolTip(overSlotPos)
    					return
    				
    		self.ShowToolTip(overSlotPos)

     

     

    if self.__CanUseSrcItemToDstItem  -> green image on item

    that methods :

    	def __CanUseSrcItemToDstItem(self, srcItemVNum, srcSlotPos, dstSlotPos):
    		"대상 아이템에 사용할 수 있는가?"
    
    		if srcSlotPos == dstSlotPos:
    			return False
    
    		if item.IsRefineScroll(srcItemVNum):
    			if player.REFINE_OK == player.CanRefine(srcItemVNum, dstSlotPos):
    				return True
    		elif item.IsMetin(srcItemVNum):
    			if player.ATTACH_METIN_OK == player.CanAttachMetin(srcItemVNum, dstSlotPos):
    				return True
    		elif item.IsDetachScroll(srcItemVNum):
    			if player.DETACH_METIN_OK == player.CanDetach(srcItemVNum, dstSlotPos):
    				return True
    		elif item.IsKey(srcItemVNum):
    			if player.CanUnlock(srcItemVNum, dstSlotPos):
    				return True
    
    		elif (player.GetItemFlags(srcSlotPos) & ITEM_FLAG_APPLICABLE) == ITEM_FLAG_APPLICABLE:
    			return True
    
    		else:
    			useType=item.GetUseType(srcItemVNum)
    
    			if "USE_CLEAN_SOCKET" == useType:
    				if self.__CanCleanBrokenMetinStone(dstSlotPos):
    					return True
    			elif "USE_CHANGE_ATTRIBUTE" == useType:
    				if self.__CanChangeItemAttrList(dstSlotPos):
    					return True
    			elif "USE_ADD_ATTRIBUTE" == useType:
    				if self.__CanAddItemAttr(dstSlotPos):
    					return True
    			elif "USE_ADD_ATTRIBUTE2" == useType:
    				if self.__CanAddItemAttr(dstSlotPos):
    					return True
    			elif "USE_ADD_ACCESSORY_SOCKET" == useType:
    				if self.__CanAddAccessorySocket(dstSlotPos):
    					return True
    			elif "USE_PUT_INTO_ACCESSORY_SOCKET" == useType:								
    				if self.__CanPutAccessorySocket(dstSlotPos, srcItemVNum):
    					return True;
    			elif "USE_PUT_INTO_BELT_SOCKET" == useType:								
    				dstItemVNum = player.GetItemIndex(dstSlotPos)
    				item.SelectItem(dstItemVNum)
    				if item.ITEM_TYPE_BELT == item.GetItemType():
    					return True
    
    		return False

     

     

    so the problem is probably the type/flags  of item assigned (into proto)  to the item in question.

  2. You have wrote an wrong check for empty inventory space (exchange.cpp)...

    Spoiler
    
    	for (i = 0; i < INVENTORY_MAX_NUM / 4; ++i)
    	{
    		if (!(item = victim->GetInventoryItem(i)))
    			continue;
    
    		s_grid1.Put(i, 1, item->GetSize());
    	}
    	for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i)
    	{
    		if (!(item = victim->GetInventoryItem(i)))
    			continue;
    
    		s_grid2.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
    	}
    
    	for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i)
    	{
    		if (!(item = victim->GetInventoryItem(i)))
    			continue;
    
    		s_grid3.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
    	}
    	for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM; ++i)
    	{
    		if (!(item = victim->GetInventoryItem(i)))
    			continue;
    
    		s_grid4.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize());
    	}

     


    Delete all for cicle and replace it with this cicle
     

    for(i = 0 ; i < INVENTORY_MAX_NUM ; i++)
    	{
    		if (! (item = victim->GetInventoryItem (i)))
    		{
    			continue;
    		}
    		if(i < INVENTORY_MAX_NUM/4)
    		{
    			s_grid1.Put(i , 1 , item->GetSize() );
    		}
    		else if( i < (INVENTORY_MAX_NUM/4) * 2) )
    		{
    			s_grid2.Put(i - INVENTORY_MAX_NUM/4 , 1 , item->GetSize() );
    		}
    		else if( i < (INVENTORY_MAX_NUM/4 ) * 3 )
    		{
    			s_grid3.Put(i - (INVENTORY_MAX_NUM/4*2) , 1 , item->GetSize() );
    		}
    		else
    		{
    			s_grid4.Put(i - (INVENTORY_MAX_NUM/4*3) , 1 , item->GetSize() );
    		}
    	}

     

    not tested but i think it works fine.. Bye Bye :)

  3. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Hello Community!

     
    I'm Ikarus (nickname on skype),
    I'm here today to give you a new complete taskbar (graphics + code)
     
     
    052322telechargement.jpg
     
    • The graphics were created entirely by K3aX(nickname on skype).
    • The Code instead  was written by me.
    • I hope someone will enjoy it!
     
    Download
    This is the hidden content, please
     
    This is the hidden content, please
     
    Bye Bye
     
    • Metin2 Dev 203
    • Eyes 7
    • Facepalm 1
    • Dislove 1
    • Angry 1
    • Not Good 1
    • Sad 1
    • Cry 1
    • Think 7
    • Scream 2
    • Lmao 3
    • Good 68
    • Love 13
    • Love 125
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.