1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-21 11:55:43 +02:00

Update inventorymanager.cpp

This commit is contained in:
Foghrye4
2016-04-05 15:20:22 +04:00
parent e416ab0793
commit eacf867dd1

View File

@@ -524,38 +524,30 @@ void IMoveAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame
}
InventoryLocation from_loc;
if(from_inv.type == InventoryLocation::NODEMETA)
{
if(from_inv.type == InventoryLocation::NODEMETA){
from_loc.setNodeMeta(from_inv.p);
}
else if(from_inv.type == InventoryLocation::DETACHED)
{
else if(from_inv.type == InventoryLocation::DETACHED){
from_loc.setDetached(from_inv.name);
}
else if(from_inv.type == InventoryLocation::PLAYER)
{
else if(from_inv.type == InventoryLocation::PLAYER){
from_loc.setPlayer(from_inv.name);
}
else if(from_inv.type == InventoryLocation::UNDEFINED)
{
else if(from_inv.type == InventoryLocation::UNDEFINED){
from_loc.setUndefined();
}
InventoryLocation to_loc;
if(to_inv.type == InventoryLocation::NODEMETA)
{
if(to_inv.type == InventoryLocation::NODEMETA){
to_loc.setNodeMeta(to_inv.p);
}
else if(to_inv.type == InventoryLocation::DETACHED)
{
else if(to_inv.type == InventoryLocation::DETACHED){
to_loc.setDetached(to_inv.name);
}
else if(to_inv.type == InventoryLocation::PLAYER)
{
else if(to_inv.type == InventoryLocation::PLAYER){
to_loc.setPlayer(to_inv.name);
}
else if(to_inv.type == InventoryLocation::UNDEFINED)
{
else if(to_inv.type == InventoryLocation::UNDEFINED){
to_loc.setUndefined();
}
PLAYER_TO_SA(player)->on_inventory_move_item(from_loc, from_list, from_i, to_loc, to_list, to_i, src_item, count, player);