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

Comparing deliantra/server/common/object.C (file contents):
Revision 1.163 by root, Sun Jul 1 05:00:17 2007 UTC vs.
Revision 1.164 by root, Thu Jul 5 08:10:29 2007 UTC

2700 esrv_update_item (UPD_FLAGS, this, new_container); 2700 esrv_update_item (UPD_FLAGS, this, new_container);
2701 esrv_send_inventory (this, new_container); 2701 esrv_send_inventory (this, new_container);
2702 } 2702 }
2703} 2703}
2704 2704
2705object *
2706object::force_find (const shstr name)
2707{
2708 /* cycle through his inventory to look for the MARK we want to
2709 * place
2710 */
2711 for (object *tmp = inv; tmp; tmp = tmp->below)
2712 if (tmp->type == FORCE && tmp->slaying == name)
2713 return splay (tmp);
2705 2714
2715 return 0;
2716}
2717
2718void
2719object::force_add (const shstr name, int duration)
2720{
2721 if (object *force = force_find (name))
2722 force->destroy ();
2723
2724 object *force = get_archetype (FORCE_NAME);
2725
2726 force->slaying = name;
2727 force->stats.food = 1;
2728 force->speed_left = -1.f;
2729
2730 force->set_speed (duration ? 1.f / duration : 0.f);
2731 force->flag [FLAG_IS_USED_UP] = true;
2732 force->flag [FLAG_APPLIED] = true;
2733
2734 insert (force);
2735}
2736
2737

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines