Browse Source

Fix appearance items attuning / equipping

Fix #388
Image 2 years ago
parent
commit
4e9dedd5e2
2 changed files with 7 additions and 1 deletions
  1. 6 0
      EQ2/source/WorldServer/Player.cpp
  2. 1 1
      EQ2/source/WorldServer/client.cpp

+ 6 - 0
EQ2/source/WorldServer/Player.cpp

@@ -2122,14 +2122,20 @@ vector<EQ2Packet*> Player::EquipItem(int16 index, int16 version, int8 appearance
 		return packets;
 	}
 	Item* item = item_list.indexed_items[index];
+	int8 orig_slot_id = slot_id;
 	slot_id = ConvertSlotFromClient(slot_id, version);
 	if (item) {
+		if(orig_slot_id == 255 && item->CheckFlag2(APPEARANCE_ONLY)) {
+			appearance_type = 1;
+			equipList = &appearance_equipment_list;
+		}
 		if (slot_id != 255 && !item->HasSlot(slot_id)) {
 			item_list.MPlayerItems.releasereadlock(__FUNCTION__, __LINE__);
 			return packets;
 		}
 		int8 slot = equipList->GetFreeSlot(item, slot_id);
 		bool canEquip = CanEquipItem(item);
+		
 		if(canEquip && !appearance_type && item->CheckFlag2(APPEARANCE_ONLY))
 		{
 			item_list.MPlayerItems.releasereadlock(__FUNCTION__, __LINE__);

+ 1 - 1
EQ2/source/WorldServer/client.cpp

@@ -1656,7 +1656,7 @@ bool Client::HandlePacket(EQApplicationPacket* app) {
 					ProcessStateCommands();
 				}
 				else {
-					LogWrite(CCLIENT__WARNING, 0, "Player %s reported SysClient/SignalMsg state %s.", GetPlayer()->GetName(), str.data.c_str());
+					LogWrite(CCLIENT__WARNING, 0, "Client", "Player %s reported SysClient/SignalMsg state %s.", GetPlayer()->GetName(), str.data.c_str());
 				}
 				const char* zone_script = world.GetZoneScript(player->GetZone()->GetZoneID());
 				if (zone_script && lua_interface)