Changeset 207 for trunk/src/game/ItemHandler.cpp
- Timestamp:
- 11/19/08 13:46:22 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/ItemHandler.cpp
r102 r207 50 50 return; //check count - if zero it's fake packet 51 51 52 if(!_player->IsValidPos(srcbag,srcslot)) 53 { 54 _player->SendEquipError( EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL ); 55 return; 56 } 57 58 if(!_player->IsValidPos(dstbag,dstslot)) 59 { 60 _player->SendEquipError( EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, NULL, NULL ); 61 return; 62 } 63 52 64 _player->SplitItem( src, dst, count ); 53 65 } … … 66 78 if(srcslot==dstslot) 67 79 return; 80 81 if(!_player->IsValidPos(INVENTORY_SLOT_BAG_0,srcslot)) 82 { 83 _player->SendEquipError( EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL ); 84 return; 85 } 86 87 if(!_player->IsValidPos(INVENTORY_SLOT_BAG_0,dstslot)) 88 { 89 _player->SendEquipError( EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, NULL, NULL ); 90 return; 91 } 68 92 69 93 uint16 src = ( (INVENTORY_SLOT_BAG_0 << 8) | srcslot ); … … 109 133 if(src==dst) 110 134 return; 135 136 if(!_player->IsValidPos(srcbag,srcslot)) 137 { 138 _player->SendEquipError( EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL ); 139 return; 140 } 141 142 if(!_player->IsValidPos(dstbag,dstslot)) 143 { 144 _player->SendEquipError( EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, NULL, NULL ); 145 return; 146 } 111 147 112 148 _player->SwapItem( src, dst ); … … 747 783 return; 748 784 785 if(!_player->IsValidPos(dstbag,NULL_SLOT)) 786 { 787 _player->SendEquipError( EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT, NULL, NULL ); 788 return; 789 } 790 749 791 uint16 src = pItem->GetPos(); 750 792