View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003315 | The Dark Mod | Coding | public | 10.02.2013 01:01 | 18.02.2013 21:42 |
Reporter | Zbyl | Assigned To | grayman | ||
Priority | normal | Severity | normal | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | SVN | ||||
Target Version | TDM 2.00 | Fixed in Version | TDM 2.00 | ||
Summary | 0003315: Second identical item pickpocketed does not count to "Pockets picked" statistic | ||||
Description | If we pickpocket second identical stackable item, then this item does not count to "pockets picked" statistic. | ||||
Steps To Reproduce | See steps to reproduce for 0003313: "Picked pockets are counted twice" | ||||
Additional Information | The reason for this is that once the item is pickpocketted it's unbound from it's bindMaster. If we pickpocket the second identical stackable item, then the item already in the inventory is queried for bindMaster, and not the new one. Here's the code from CInventory::PutItem(idEntity * ent, idEntity * owner): gameLocal.m_MissionData->InventoryCallback( existing->GetItemEntity(), // <-- old, unbound entity used! existing->GetName(), existing->GetCount(), 1, true ); | ||||
Tags | No tags attached. | ||||
Attached Files | 3315.patch (640 bytes)
Index: game/Inventory/Inventory.cpp =================================================================== --- game/Inventory/Inventory.cpp (revision 5694) +++ game/Inventory/Inventory.cpp (working copy) @@ -607,7 +607,8 @@ CInventoryItemPtr CInventory::PutItem(idEntity *ent, idEntity *owner) // We added a stackable item that was already in the inventory gameLocal.m_MissionData->InventoryCallback( - existing->GetItemEntity(), existing->GetName(), + ent, // use currently added entity, not the previously added "identical" existing->GetItemEntity() (#3315) + existing->GetName(), existing->GetCount(), 1, true | ||||
Attached a patch that fixes this problem by passing currently picked up entity to the InventoryCallback() (instead of the one already in the inventory). | |
Applied solution from Zbyl to check the new item for its bindmaster instead of the existing item already in inventory, which already had its bindmaster NULLed. rev. 5698: Inventory.cpp |
|
Date Modified | Username | Field | Change |
---|---|---|---|
10.02.2013 01:01 | Zbyl | New Issue | |
10.02.2013 01:46 | Zbyl | File Added: 3315.patch | |
10.02.2013 01:49 | Zbyl | Note Added: 0005061 | |
18.02.2013 21:42 | grayman | Note Added: 0005077 | |
18.02.2013 21:42 | grayman | Assigned To | => grayman |
18.02.2013 21:42 | grayman | Status | new => resolved |
18.02.2013 21:42 | grayman | Resolution | open => fixed |
18.02.2013 21:42 | grayman | Fixed in Version | => TDM 2.00 |
18.02.2013 21:42 | grayman | Target Version | => TDM 2.00 |