Hi everyone.
I would like to request the addition of a new flag to items (item_db), the autoloot flag, which will control if an item can be autolooted or not.
By default it should be NULL, which means it can be autolooted as usual, but for those items with a non null value, they won't be autolooted.
Instead of editing source mob.cpp to change autoloot behaviour (i've seen most of autoloot modifications are about prevent certain items to be looted) and made it easy to customize.
diff --git a/src/map/itemdb.cpp b/src/map/itemdb.cpp
index a6777190b..b4ca490dd 100644
--- a/src/map/itemdb.cpp
+++ b/src/map/itemdb.cpp
@@ -652,6 +652,18 @@ uint64 ItemDatabase::parseBodyNode(const YAML::Node &node) {
if (!exists)
item->flag.dropEffect = DROPEFFECT_NONE;
}
+
+ if (this->nodeExists(flagNode, "NoAutoLoot")) {
+ bool active;
+
+ if (!this->asBool(flagNode, "NoAutoLoot", active))
+ return 0;
+
+ item->flag.noautoloot = active;
+ } else {
+ i