summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/atcommands.txt6
-rw-r--r--src/map/atcommand.c28
2 files changed, 26 insertions, 8 deletions
diff --git a/doc/atcommands.txt b/doc/atcommands.txt
index 4acc30ae6..c909440a7 100644
--- a/doc/atcommands.txt
+++ b/doc/atcommands.txt
@@ -584,6 +584,12 @@ Opens the Identification window if any unappraised items are in your inventory.
---------------------------------------
+@identifyall
+
+Identifies all unappraised items in your inventory.
+
+---------------------------------------
+
@trade <player name>
Opens the trade window with the specified player.
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3c454011f..a2db15f6c 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -6769,23 +6769,34 @@ ACMD(refreshall)
}
/*==========================================
- * @identify
+ * @identify / @identifyall
* => GM's magnifier.
*------------------------------------------*/
ACMD(identify)
{
int num = 0;
+ bool identifyall = (strcmpi(info->command, "identifyall") == 0);
- for (int i = 0; i < sd->status.inventorySize; i++) {
- if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify!=1){
- num++;
+ if (!identifyall) {
+ for (int i = 0; i < sd->status.inventorySize; i++) {
+ if (sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify != 1) {
+ num++;
+ }
}
- }
- if (num > 0) {
- clif->item_identify_list(sd);
} else {
- clif->message(fd,msg_fd(fd,1238)); // There are no items to appraise.
+ for (int i = 0; i < sd->status.inventorySize; i++) {
+ if (sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify != 1) {
+ skill->identify(sd, i);
+ num++;
+ }
+ }
}
+
+ if (num == 0)
+ clif->message(fd,msg_fd(fd,1238)); // There are no items to appraise.
+ else if (!identifyall)
+ clif->item_identify_list(sd);
+
return true;
}
@@ -10061,6 +10072,7 @@ static void atcommand_basecommands(void)
ACMD_DEF(refresh),
ACMD_DEF(refreshall),
ACMD_DEF(identify),
+ ACMD_DEF2("identifyall", identify),
ACMD_DEF(misceffect),
ACMD_DEF(mobsearch),
ACMD_DEF(cleanmap),