Changeset 1137
- Timestamp:
- 01/31/2010 12:35:07 AM (6 weeks ago)
- Files:
-
- 1 modified
-
Trunk/src/LuaEngine/UnitFunctions.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
Trunk/src/LuaEngine/UnitFunctions.h
r1136 r1137 1268 1268 Player * plr = TO_PLAYER(ptr); 1269 1269 int16 slot = plr->GetItemInterface()->GetInventorySlotById(entry); 1270 if (slot == -1) //check bags 1271 { 1272 for (uint8 contslot = INVENTORY_SLOT_BAG_START; contslot != INVENTORY_SLOT_BAG_END; contslot++) 1273 { 1274 Container * bag = static_cast<Container*>(plr->GetItemInterface()->GetInventoryItem(contslot)); 1275 for (uint8 bslot = 0; bslot != bag->GetNumSlots(); bslot++) 1276 { 1277 if (bag->GetItem(bslot)->GetEntry() == entry) 1278 { 1279 PUSH_ITEM(L, bag->GetItem(bslot)); 1280 return 1; 1281 } 1282 } 1283 } 1284 } 1270 1285 PUSH_ITEM(L, plr->GetItemInterface()->GetInventoryItem(slot)); 1271 1286 return 1;
![(please configure the [header_logo] section in trac.ini)](/trac/arcscripts/chrome/site/your_project_logo.png)