From: Christian S. <blu...@us...> - 2004-07-24 17:25:28
|
Update of /cvsroot/planeshift/planeshift/src/server/bulkobjects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27829/src/server/bulkobjects Modified Files: psitem.cpp psitem.h Log Message: - Removed Get/SetCharIDOwner from psItem. Use Get/SetOwningCharacter instead Index: psitem.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/psitem.cpp,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** psitem.cpp 22 Jul 2004 20:31:35 -0000 1.66 --- psitem.cpp 24 Jul 2004 17:25:19 -0000 1.67 *************** *** 179,183 **** parentid = row.GetUInt64("parent_item_id"); loc_in_parent = row.GetInt("location_in_parent"); - char_id_owner = row.GetInt("char_id_owner"); // Stack count (will be 0 if NULL - either means this is a non stackable item) --- 179,182 ---- *************** *** 344,348 **** { // Owning character ID ! fields.FormatPush("%u",GetCharIDOwner()); // Stack count --- 343,347 ---- { // Owning character ID ! fields.FormatPush("%u",owning_character->GetCharacterID()); // Stack count *************** *** 652,678 **** } - unsigned int psItem::GetCharIDOwner() - { - return char_id_owner; - } - - void psItem::SetCharIDOwner(unsigned int char_id) - { - int i; - - // No need to go through resetting all the owner pointers if they are already set - if (char_id_owner==char_id) - return; - - char_id_owner = char_id; - if (current_stats->GetIsContainer()) - { - for (i=0;i<PSITEM_MAX_CONTAINER_SLOTS;i++) - { - if (container_data.contained_item_ptr[i]!=NULL) - container_data.contained_item_ptr[i]->SetCharIDOwner(char_id); - } - } - } bool psItem::GetIsContainerEmpty() --- 651,654 ---- Index: psitem.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/psitem.h,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** psitem.h 5 Jul 2004 18:52:57 -0000 1.43 --- psitem.h 24 Jul 2004 17:25:19 -0000 1.44 *************** *** 247,257 **** - /** Contains the character id of the owner of the item. - * This is set once a player picks up the item and is set to 0 once the item is dropped into world. - * It is not cleared if it is dropped into a container. This allows items to be put into public containers. - */ - unsigned int char_id_owner; - - /** Pointer to the psCharacter that holds this item * The character can hold the item either directly in their inventory/bank/equipment or in a container they hold. --- 247,250 ---- *************** *** 455,469 **** */ void SetLocInParent(unsigned int location) { loc_in_parent = location; } - - /** DO NOT USE! DO NOT USE! DO NOT USE! - * This is used at load time and as a helper function for setting the owner of the parent AFTER all checks - * have been performed. - * See DropItem(), PutItemInBulk(), EquipItemInSlot(), RemoveItemInBulk(), and RemoveItemInSlot() - */ - void SetCharIDOwner(unsigned int char_id); - - /** Returns the character ID of the owner of the item. - */ - unsigned int GetCharIDOwner(); /// Returns the item in the specific slot of this container. Returns NULL if this is not a container or if there is no item in the requested slot. --- 448,451 ---- |