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,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 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 |
… | |
… | |
46 | * |
46 | * |
47 | ******************************************************************************/ |
47 | ******************************************************************************/ |
48 | |
48 | |
49 | /** |
49 | /** |
50 | * This is a similar to query_name, but returns flags |
50 | * This is a similar to query_name, but returns flags |
51 | * to be sent to client. |
51 | * to be sent to client. |
52 | */ |
52 | */ |
53 | static unsigned int |
53 | static unsigned int |
54 | query_flags (object *op) |
54 | query_flags (object *op) |
55 | { |
55 | { |
56 | unsigned int flags = 0; |
56 | unsigned int flags = 0; |
… | |
… | |
178 | |
178 | |
179 | #define FINGER_UP "finger_up.x11" |
179 | #define FINGER_UP "finger_up.x11" |
180 | #define FINGER_DOWN "finger_down.x11" |
180 | #define FINGER_DOWN "finger_down.x11" |
181 | |
181 | |
182 | /** |
182 | /** |
183 | * Send the look window. Don't need to do animations here |
183 | * Send the look window. Don't need to do animations here |
184 | * This sends all the faces to the client, not just updates. This is |
184 | * This sends all the faces to the client, not just updates. This is |
185 | * because object ordering would otherwise be inconsistent. |
185 | * because object ordering would otherwise be inconsistent. |
186 | */ |
186 | */ |
187 | void |
187 | void |
188 | esrv_draw_look (player *pl) |
188 | esrv_draw_look (player *pl) |
… | |
… | |
642 | tag_t tag = net_uint32 ((uint8 *)data + 1); |
642 | tag_t tag = net_uint32 ((uint8 *)data + 1); |
643 | object *op = esrv_get_ob_from_count (pl->ob, tag); |
643 | object *op = esrv_get_ob_from_count (pl->ob, tag); |
644 | |
644 | |
645 | if (!op) |
645 | if (!op) |
646 | { |
646 | { |
647 | pl->failmsg ("Could not find object to lock/unlock"); |
647 | pl->failmsgf ("Could not find object %d to lock/unlock", tag); |
648 | return; |
648 | return; |
649 | } |
649 | } |
650 | |
650 | |
651 | if (!flag) |
651 | if (!flag) |
652 | op->clr_flag (FLAG_INV_LOCKED); |
652 | op->clr_flag (FLAG_INV_LOCKED); |
… | |
… | |
663 | tag_t tag = net_uint32 ((uint8 *)data); |
663 | tag_t tag = net_uint32 ((uint8 *)data); |
664 | object *op = esrv_get_ob_from_count (pl->ob, tag); |
664 | object *op = esrv_get_ob_from_count (pl->ob, tag); |
665 | |
665 | |
666 | if (!op) |
666 | if (!op) |
667 | { |
667 | { |
668 | pl->failmsg ("Could not find object to mark"); |
668 | pl->failmsgf ("Could not find object %d to mark", tag); |
669 | return; |
669 | return; |
670 | } |
670 | } |
671 | |
671 | |
672 | pl->mark = op; |
672 | pl->mark = op; |
673 | pl->ob->statusmsg (format ("Marked item %s", query_name (op))); |
673 | pl->ob->statusmsg (format ("Marked item %s", query_name (op))); |