Jump to content

Talisman system won't equip


Recommended Posts

Hi guys, I'm trying to install this system: 

This is the hidden content, please

Everything works ok but when I try to equip the talisman (right clicking or moving to the slot) it just stays in the inventory and wouldn't go to the slot.

I tried checking char_item.cpp:

bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell) function
  
  case ITEM_COSTUME:
		case ITEM_WEAPON:
		case ITEM_ARMOR:
		case ITEM_ROD:
		case ITEM_RING:		// ˝Ĺ±Ô ąÝÁö ľĆŔĚĹŰ
		case ITEM_BELT:		// ˝Ĺ±Ô ş§Ć® ľĆŔĚĹŰ
			// MINING
		case ITEM_PICK:
			// END_OF_MINING
			if (!item->IsEquipped()){
				ChatPacket(CHAT_TYPE_INFO, LC_TEXT("equiping."));
				EquipItem(item);
				}
			else{
				ChatPacket(CHAT_TYPE_INFO, LC_TEXT("unequip."));
				UnequipItem(item);
				}
			break;

And it returns true so it's trying to equip it.

Syslog sends out USE_ITEM

 

However 

EquipItem does not return as true.

It stucks at iWearCell

bool CHARACTER::EquipItem(LPITEM item, int iCandidateCell)
{
	....
      
      if (iWearCell < 0)
		{
		ChatPacket(CHAT_TYPE_INFO, "Error 4");
		return false;
		}
      
    ....
	
	ChatPacket(CHAT_TYPE_INFO, LC_TEXT("equip item-> true."));

	return true;
}

iWearCell is called with FindEquipCell:

Returns -1: 

int CItem::FindEquipCell(LPCHARACTER ch, int iCandidateCell)
{
  	this returns true....
    ....
    if ((0 == GetWearFlag() || ITEM_TOTEM == GetType()) && ITEM_COSTUME != GetType() && ITEM_DS != GetType() && ITEM_SPECIAL_DS != GetType() && ITEM_RING != GetType() && ITEM_BELT != GetType() && ITEM_ARMOR != GetType()){
		ch->ChatPacket(CHAT_TYPE_INFO, "r Error 1");
		return -1;
	}
  	.....
      
    this returns false .... why???
     
    else if (GetWearFlag() & WEARABLE_PENDANT){
		ch->ChatPacket(CHAT_TYPE_INFO, "r ok 1");
		return WEAR_PENDANT;
	}
  
    .....
      

 

Any ideas what am I missing or what could be the cause of this?

 

Thanks in advance.

Edited by zsoltiabeka10
edit
  • Metin2 Dev 6
  • Good 1
  • Love 1
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 11

      Metin2 Closed Beta Content (2003-2004)

    2. 11

      Metin2 Closed Beta Content (2003-2004)

    3. 0

      Football Ground

    4. 11

      Metin2 Closed Beta Content (2003-2004)

    5. 0

      Error compile binary Zentoria2

    6. 11

      Metin2 Closed Beta Content (2003-2004)

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.