zsoltiabeka10 17 Posted March 28, 2020 Share Posted March 28, 2020 (edited) Hi guys, I'm trying to install this system: This is the hidden content, please Sign In or Sign Up 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 March 29, 2020 by zsoltiabeka10 edit 8 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now