… | |
… | |
1406 | } |
1406 | } |
1407 | |
1407 | |
1408 | sub conn::container_add { |
1408 | sub conn::container_add { |
1409 | my ($self, $tag, $items) = @_; |
1409 | my ($self, $tag, $items) = @_; |
1410 | |
1410 | |
1411 | print "container_add on conainer $tag (player: $self->{player}{tag})\n"; |
|
|
1412 | |
|
|
1413 | if ($tag == 0) { |
1411 | if ($tag == 0) { |
1414 | update_floorbox; |
1412 | update_floorbox; |
1415 | $INVR->set_items ($self->{container}{0}); |
1413 | $INVR->set_items ($self->{container}{0}); |
1416 | $OPENCONT = 0; |
1414 | $OPENCONT = 0; |
1417 | } elsif ($tag == $self->{player}{tag}) { |
1415 | } elsif ($tag == $self->{player}{tag}) { |
… | |
… | |
1426 | } |
1424 | } |
1427 | |
1425 | |
1428 | sub conn::container_clear { |
1426 | sub conn::container_clear { |
1429 | my ($self, $tag) = @_; |
1427 | my ($self, $tag) = @_; |
1430 | |
1428 | |
1431 | print "container_clear on conainer $tag (player: $self->{player}{tag})\n"; |
|
|
1432 | |
|
|
1433 | if ($tag == 0) { |
1429 | if ($tag == 0) { |
1434 | update_floorbox; |
1430 | update_floorbox; |
1435 | $INVR->set_items ($self->{container}{0}); |
1431 | $INVR->set_items ($self->{container}{0}); |
1436 | $OPENCONT = 0; |
1432 | $OPENCONT = 0; |
1437 | } elsif ($tag == $self->{player}{tag}) { |
1433 | } elsif ($tag == $self->{player}{tag}) { |
… | |
… | |
1446 | |
1442 | |
1447 | sub conn::item_delete { |
1443 | sub conn::item_delete { |
1448 | my ($self, @items) = @_; |
1444 | my ($self, @items) = @_; |
1449 | |
1445 | |
1450 | for (@items) { |
1446 | for (@items) { |
1451 | print "item_delete on container $_->{container} (player: $self->{player}{tag})\n"; |
|
|
1452 | if ($_->{container} == 0) { |
1447 | if ($_->{container} == 0) { |
1453 | update_floorbox; |
1448 | update_floorbox; |
1454 | $INVR->set_items ($self->{container}{0}); |
1449 | $INVR->set_items ($self->{container}{0}); |
1455 | } elsif ($_->{container} == $self->{player}{tag}) { |
1450 | } elsif ($_->{container} == $self->{player}{tag}) { |
1456 | $INV->set_items ($self->{container}{$self->{player}{tag}}) |
1451 | $INV->set_items ($self->{container}{$self->{player}{tag}}) |
… | |
… | |
1460 | } |
1455 | } |
1461 | } |
1456 | } |
1462 | |
1457 | |
1463 | sub conn::item_update { |
1458 | sub conn::item_update { |
1464 | my ($self, $item) = @_; |
1459 | my ($self, $item) = @_; |
1465 | |
|
|
1466 | print "item_update: container: $item->{container} (player: $self->{player}{tag})\n"; |
|
|
1467 | |
1460 | |
1468 | if ($item->{container} == 0) { |
1461 | if ($item->{container} == 0) { |
1469 | update_floorbox; |
1462 | update_floorbox; |
1470 | $INVR->set_items ($self->{container}{0}); |
1463 | $INVR->set_items ($self->{container}{0}); |
1471 | } elsif ($item->{container} == $self->{player}{tag}) { |
1464 | } elsif ($item->{container} == $self->{player}{tag}) { |