ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/c_wiz.C
(Generate patch)

Comparing deliantra/server/server/c_wiz.C (file contents):
Revision 1.53 by root, Thu Nov 8 19:43:26 2007 UTC vs.
Revision 1.54 by root, Tue Apr 22 07:01:47 2008 UTC

574 } 574 }
575 575
576 if (at->nrof) 576 if (at->nrof)
577 { 577 {
578 if (at_spell) 578 if (at_spell)
579 insert_ob_in_ob (arch_to_object (at_spell), tmp); 579 tmp->insert (arch_to_object (at_spell));
580 580
581 tmp->x = op->x; 581 tmp->x = op->x;
582 tmp->y = op->y; 582 tmp->y = op->y;
583 tmp->map = op->map;
583 584
584 if (set_nrof) 585 if (set_nrof)
585 tmp->nrof = nrof; 586 tmp->nrof = nrof;
586 587
587 tmp->map = op->map; 588 op->insert (tmp);
588
589 tmp = insert_ob_in_ob (tmp, op);
590 esrv_send_item (op, tmp);
591 589
592 /* Let's put this created item on stack so dm can access it easily. */ 590 /* Let's put this created item on stack so dm can access it easily. */
593 dm_stack_push (op->contr, tmp->count); 591 dm_stack_push (op->contr, tmp->count);
594 592
595 return 1; 593 return 1;
673 /* Wonder if we really want to push all of these, but since 671 /* Wonder if we really want to push all of these, but since
674 * things like rods have nrof 0, we want to cover those. 672 * things like rods have nrof 0, we want to cover those.
675 */ 673 */
676 dm_stack_push (op->contr, head->count); 674 dm_stack_push (op->contr, head->count);
677 675
678 if (at->randomitems != NULL && !at_spell) 676 if (at->randomitems && !at_spell)
679 create_treasure (at->randomitems, head, GT_APPLY, op->map->difficulty, 0); 677 create_treasure (at->randomitems, head, GT_APPLY, op->map->difficulty, 0);
680
681 esrv_send_item (op, head);
682 } 678 }
683 679
684 /* free the one we used to copy */ 680 /* free the one we used to copy */
685 tmp->destroy (); 681 tmp->destroy ();
686 } 682 }
1593 return 0; 1589 return 0;
1594 } 1590 }
1595 1591
1596 if (!QUERY_FLAG (right, FLAG_REMOVED)) 1592 if (!QUERY_FLAG (right, FLAG_REMOVED))
1597 right->remove (); 1593 right->remove ();
1594
1598 inserted = insert_ob_in_ob (right, left); 1595 insert_ob_in_ob (right, left);
1599 if (left->type == PLAYER)
1600 if (inserted == right)
1601 esrv_send_item (left, right);
1602 else
1603 esrv_update_item (UPD_WEIGHT | UPD_NAME | UPD_NROF, left, inserted);
1604 1596
1605 new_draw_info_format (NDI_UNIQUE, 0, op, "Inserted %s in %s", query_name (inserted), query_name (left)); 1597 new_draw_info_format (NDI_UNIQUE, 0, op, "Inserted %s in %s", query_name (inserted), query_name (left));
1606 1598
1607 return 0; 1599 return 0;
1608 1600

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines