diff --git a/conf/groups.yml b/conf/groups.yml index d61a6d6cc0..515b356e88 100644 --- a/conf/groups.yml +++ b/conf/groups.yml @@ -240,6 +240,7 @@ Body: bypass_stat_onclone: true bypass_max_stat: true macro_register: true + trade_unconditional: true #all_permission: true Footer: diff --git a/doc/permissions.txt b/doc/permissions.txt index e79b05a0a9..fb51d74828 100644 --- a/doc/permissions.txt +++ b/doc/permissions.txt @@ -125,6 +125,12 @@ item delay, etc). --------------------------------------- +*trade_unconditional + +Allows player to ignore the trade conditions of items (drop, trade, sell, cart, storage/gstorage, mail and auction). + +--------------------------------------- + ====================== | 3. Command-related | ====================== diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 8700b13436..ee6d0b811f 100755 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -1258,7 +1258,7 @@ bool pc_can_sell_item(map_session_data *sd, struct item *item, enum npc_subtype */ bool pc_can_give_items(map_session_data *sd) { - return pc_has_permission(sd, PC_PERM_TRADE); + return (pc_has_permission(sd, PC_PERM_TRADE) || pc_has_permission(sd, PC_PERM_TRADE_UNCONDITIONAL)); } /** @@ -1266,7 +1266,7 @@ bool pc_can_give_items(map_session_data *sd) */ bool pc_can_give_bounded_items(map_session_data *sd) { - return pc_has_permission(sd, PC_PERM_TRADE_BOUNDED); + return (pc_has_permission(sd, PC_PERM_TRADE_BOUNDED) || pc_has_permission(sd, PC_PERM_TRADE_UNCONDITIONAL)); } /** @@ -11156,9 +11156,15 @@ void pc_setmadogear(map_session_data *sd, bool flag, e_mado_type type) *------------------------------------------*/ bool pc_candrop(map_session_data *sd, struct item *item) { - if( item && ((item->expire_time || (item->bound && !pc_can_give_bounded_items(sd))) || (itemdb_ishatched_egg(item))) ) + if (sd->sc.cant.drop) return false; - if( !pc_can_give_items(sd) || sd->sc.cant.drop) //check if this GM level can drop items + if( item && itemdb_ishatched_egg(item) ) + return false; + if (pc_has_permission(sd, PC_PERM_TRADE_UNCONDITIONAL)) // no restriction + return true; + if( !pc_can_give_items(sd) ) + return false; + if( item && (item->expire_time || (item->bound && !pc_can_give_bounded_items(sd))) ) return false; return (itemdb_isdropable(item, pc_get_group_level(sd))); } diff --git a/src/map/pc_groups.hpp b/src/map/pc_groups.hpp index b0fab53cfd..172ac2c354 100644 --- a/src/map/pc_groups.hpp +++ b/src/map/pc_groups.hpp @@ -50,6 +50,7 @@ enum e_pc_permission : uint32 { PC_PERM_ATTENDANCE, PC_PERM_MACRO_DETECT, PC_PERM_MACRO_REGISTER, + PC_PERM_TRADE_UNCONDITIONAL, //.. add other here PC_PERM_MAX, }; @@ -88,6 +89,7 @@ static const struct s_pcg_permission_name { { "attendance",PC_PERM_ATTENDANCE }, { "macro_detect",PC_PERM_MACRO_DETECT }, { "macro_register",PC_PERM_MACRO_REGISTER }, + { "trade_unconditional",PC_PERM_TRADE_UNCONDITIONAL }, }; struct s_player_group{