|
From: Crossfire C. r. messages.
<cro...@li...> - 2020-11-18 20:12:19
|
Revision: 21550
http://sourceforge.net/p/crossfire/code/21550
Author: ryo_saeba
Date: 2020-11-18 20:12:18 +0000 (Wed, 18 Nov 2020)
Log Message:
-----------
Add feedback message to (client-issues) lock command, to be coherent with the 'lock' command the player can use.
Modified Paths:
--------------
server/trunk/socket/item.c
Modified: server/trunk/socket/item.c
===================================================================
--- server/trunk/socket/item.c 2020-11-18 18:53:55 UTC (rev 21549)
+++ server/trunk/socket/item.c 2020-11-18 20:12:18 UTC (rev 21550)
@@ -674,6 +674,7 @@
int flag, tag;
object *op;
object *tmp;
+ char name[HUGE_BUF];
if (len != 5) {
LOG(llevDebug, "Player '%s' sent bogus lock_item_cmd information\n", pl->ob->name);
@@ -700,10 +701,16 @@
return;
}
- if (!flag)
+ query_short_name(op, name, HUGE_BUF);
+ if (!flag) {
CLEAR_FLAG(op, FLAG_INV_LOCKED);
- else
+ draw_ext_info_format(NDI_UNIQUE, 0, pl->ob, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_FAILURE,
+ "Unlocked %s.", name);
+ } else {
SET_FLAG(op, FLAG_INV_LOCKED);
+ draw_ext_info_format(NDI_UNIQUE, 0, pl->ob, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_FAILURE,
+ "Locked %s.", name);
+ }
tmp = object_merge(op, NULL);
if (tmp == NULL) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|