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

Comparing deliantra/server/server/apply.C (file contents):
Revision 1.157 by root, Tue May 6 16:32:34 2008 UTC vs.
Revision 1.158 by root, Wed May 7 19:19:09 2008 UTC

2212} 2212}
2213 2213
2214void 2214void
2215apply_poison (object *op, object *tmp) 2215apply_poison (object *op, object *tmp)
2216{ 2216{
2217 // need to do it now when it is still on the map
2218 handle_apply_yield (tmp);
2219
2217 object *poison = tmp->split (1); 2220 object *poison = tmp->split (1);
2218 2221
2219 if (op->type == PLAYER) 2222 if (op->type == PLAYER)
2220 { 2223 {
2221 op->contr->play_sound (sound_find ("drink_poison")); 2224 op->contr->play_sound (sound_find ("drink_poison"));
2228 LOG (llevDebug, "Trying to poison player/monster for %d hp\n", poison->stats.hp); 2231 LOG (llevDebug, "Trying to poison player/monster for %d hp\n", poison->stats.hp);
2229 hit_player (op, poison->stats.hp, tmp, AT_POISON, 1); 2232 hit_player (op, poison->stats.hp, tmp, AT_POISON, 1);
2230 } 2233 }
2231 2234
2232 op->stats.food -= op->stats.food / 4; 2235 op->stats.food -= op->stats.food / 4;
2233 handle_apply_yield (poison);
2234 poison->destroy (); 2236 poison->destroy ();
2235} 2237}
2236 2238
2237/** 2239/**
2238 * This function return true if the exit is not a 2 ways one or it is 2 ways, valid exit. 2240 * This function return true if the exit is not a 2 ways one or it is 2 ways, valid exit.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines