|
@@ -199,7 +199,9 @@ static void itemdb_pc_get_itemgroup_sub(struct map_session_data *sd, struct s_it
|
|
|
// Do loop for non-stackable item
|
|
|
for (i = 0; i < data->amount; i++) {
|
|
|
char flag = 0;
|
|
|
+#ifdef ENABLE_ITEM_GUID
|
|
|
tmp.unique_id = data->GUID ? pc_generate_unique_id(sd) : 0; // Generate UID
|
|
|
+#endif
|
|
|
if ((flag = pc_additem(sd, &tmp, tmp.amount, LOG_TYPE_SCRIPT)))
|
|
|
clif_additem(sd, 0, 0, flag);
|
|
|
else if (!flag && data->isAnnounced) {
|
|
@@ -442,17 +444,17 @@ bool itemdb_isequip2(struct item_data *id)
|
|
|
*/
|
|
|
bool itemdb_isstackable2(struct item_data *id)
|
|
|
{
|
|
|
- nullpo_ret(id);
|
|
|
- switch(id->type) {
|
|
|
- case IT_WEAPON:
|
|
|
- case IT_ARMOR:
|
|
|
- case IT_PETEGG:
|
|
|
- case IT_PETARMOR:
|
|
|
- case IT_SHADOWGEAR:
|
|
|
- return false;
|
|
|
- default:
|
|
|
- return true;
|
|
|
- }
|
|
|
+ nullpo_ret(id);
|
|
|
+ switch(id->type) {
|
|
|
+ case IT_WEAPON:
|
|
|
+ case IT_ARMOR:
|
|
|
+ case IT_PETEGG:
|
|
|
+ case IT_PETARMOR:
|
|
|
+ case IT_SHADOWGEAR:
|
|
|
+ return false;
|
|
|
+ default:
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -662,7 +664,9 @@ static void itemdb_read_itemgroup_sub(const char* filename, bool silent)
|
|
|
if (str[3] != NULL) entry.amount = cap_value(atoi(str[3]),1,MAX_AMOUNT);
|
|
|
if (str[5] != NULL) entry.isAnnounced= atoi(str[5]);
|
|
|
if (str[6] != NULL) entry.duration = cap_value(atoi(str[6]),0,UINT16_MAX);
|
|
|
+#ifdef ENABLE_ITEM_GUID
|
|
|
if (str[7] != NULL) entry.GUID = atoi(str[7]);
|
|
|
+#endif
|
|
|
if (str[8] != NULL) entry.bound = cap_value(atoi(str[8]),BOUND_NONE,BOUND_MAX-1);
|
|
|
if (str[9] != NULL) entry.isNamed = atoi(str[9]);
|
|
|
|
|
@@ -917,7 +921,9 @@ static bool itemdb_read_flag(char* fields[], int columns, int current) {
|
|
|
|
|
|
if (flag&1) id->flag.dead_branch = set ? 1 : 0;
|
|
|
if (flag&2) id->flag.group = set ? 1 : 0;
|
|
|
+#ifdef ENABLE_ITEM_GUID
|
|
|
if (flag&4 && itemdb_isstackable2(id)) id->flag.guid = set ? 1 : 0;
|
|
|
+#endif
|
|
|
|
|
|
return true;
|
|
|
}
|