1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
… | |
… | |
627 | pl->ns->look_position = tag & 0x7fffffff; |
627 | pl->ns->look_position = tag & 0x7fffffff; |
628 | pl->ns->floorbox_update (); |
628 | pl->ns->floorbox_update (); |
629 | return; |
629 | return; |
630 | } |
630 | } |
631 | |
631 | |
|
|
632 | // the object might be legally gone already |
632 | object *op = esrv_get_ob_from_count (pl->ob, tag); |
633 | if (object *op = esrv_get_ob_from_count (pl->ob, tag)) |
633 | |
|
|
634 | if (!op) |
|
|
635 | { |
|
|
636 | LOG (llevDebug, "Player '%s' tried to apply the unknown object (%d)\n", &pl->ob->name, tag); |
|
|
637 | return; |
|
|
638 | } |
|
|
639 | |
|
|
640 | pl->ob->apply (op, AP_TOGGLE); |
634 | pl->ob->apply (op, AP_TOGGLE); |
641 | } |
635 | } |
642 | |
636 | |
643 | /** Client wants to lock some object. Lets do so. */ |
637 | /** Client wants to lock some object. Lets do so. */ |
644 | void |
638 | void |
645 | LockItem (char *data, int len, player *pl) |
639 | LockItem (char *data, int len, player *pl) |