summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions/commands.cpp9
-rw-r--r--src/actions/commands.h1
-rw-r--r--src/dyetool/actions/commands.cpp1
-rw-r--r--src/enums/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h6
-rw-r--r--src/net/adminhandler.h2
-rw-r--r--src/net/eathena/adminhandler.cpp5
-rw-r--r--src/net/eathena/adminhandler.h2
-rw-r--r--src/net/tmwa/adminhandler.cpp4
-rw-r--r--src/net/tmwa/adminhandler.h2
10 files changed, 33 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 8ec8ca78b..2e7252985 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -1227,4 +1227,13 @@ impHandler(monsterInfo)
return true;
}
+impHandler(itemInfo)
+{
+ const std::string args = event.args;
+ if (args.empty())
+ return false;
+ adminHandler->itemInfo(args);
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 62b64b1b3..7f37f1656 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -98,6 +98,7 @@ namespace Actions
decHandler(removePickup);
decHandler(ignorePickup);
decHandler(monsterInfo);
+ decHandler(itemInfo);
} // namespace Actions
#undef decHandler
diff --git a/src/dyetool/actions/commands.cpp b/src/dyetool/actions/commands.cpp
index 2d4f71c13..45458ab65 100644
--- a/src/dyetool/actions/commands.cpp
+++ b/src/dyetool/actions/commands.cpp
@@ -98,5 +98,6 @@ impHandlerVoid(addPickup)
impHandlerVoid(removePickup)
impHandlerVoid(ignorePickup)
impHandlerVoid(monsterInfo)
+impHandlerVoid(itemInfo)
} // namespace Actions
diff --git a/src/enums/input/inputaction.h b/src/enums/input/inputaction.h
index 32b97864a..52344e683 100644
--- a/src/enums/input/inputaction.h
+++ b/src/enums/input/inputaction.h
@@ -627,6 +627,7 @@ enumStart(InputAction)
SEEN,
TARGET_SKILL_UNIT,
MONSTER_INFO,
+ ITEM_INFO,
TOTAL
}
enumEnd(InputAction);
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 65f28e6f9..c59203900 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -5251,6 +5251,12 @@ static const InputActionData inputActionData
"monsterinfo|mobinfo|mi",
UseArgs_true,
Protected_true},
+ {"keyItemInfo",
+ defaultAction(&Actions::itemInfo),
+ InputCondition::INGAME,
+ "iteminfo|ii",
+ UseArgs_true,
+ Protected_true},
};
#undef defaultAction
diff --git a/src/net/adminhandler.h b/src/net/adminhandler.h
index 87b8bf486..949b36d4e 100644
--- a/src/net/adminhandler.h
+++ b/src/net/adminhandler.h
@@ -98,6 +98,8 @@ class AdminHandler notfinal
virtual void requestStats(const std::string &name) const = 0;
virtual void monsterInfo(const std::string &name) const = 0;
+
+ virtual void itemInfo(const std::string &name) const = 0;
};
} // namespace Net
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp
index 878cd2156..ed328b57b 100644
--- a/src/net/eathena/adminhandler.cpp
+++ b/src/net/eathena/adminhandler.cpp
@@ -167,4 +167,9 @@ void AdminHandler::monsterInfo(const std::string &name) const
chatHandler->talk("@monsterinfo " + name, GENERAL_CHANNEL);
}
+void AdminHandler::itemInfo(const std::string &name) const
+{
+ chatHandler->talk("@iteminfo " + name, GENERAL_CHANNEL);
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h
index abbd292c9..51dca1b6f 100644
--- a/src/net/eathena/adminhandler.h
+++ b/src/net/eathena/adminhandler.h
@@ -73,6 +73,8 @@ class AdminHandler final : public Ea::AdminHandler
void monsterInfo(const std::string &name) const override final;
+ void itemInfo(const std::string &name) const override final;
+
protected:
static std::string mStatsName;
};
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index ba984ff01..ec3a8ffc3 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -130,4 +130,8 @@ void AdminHandler::monsterInfo(const std::string &name A_UNUSED) const
{
}
+void AdminHandler::itemInfo(const std::string &name A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h
index 32d535892..ca02ae7cd 100644
--- a/src/net/tmwa/adminhandler.h
+++ b/src/net/tmwa/adminhandler.h
@@ -74,6 +74,8 @@ class AdminHandler final : public Ea::AdminHandler
A_CONST;
void monsterInfo(const std::string &name) const override final A_CONST;
+
+ void itemInfo(const std::string &name) const override final A_CONST;
};
} // namespace TmwAthena