Skip to content
Permalink
Browse files

Merge pull request #81 from nogu3ira/master

Hide warning gump and item drop.
  • Loading branch information...
frozenblit committed Feb 21, 2019
2 parents 8d0909c + 7b9727f commit c35faa41a323383edc60f0d03307ec03f6480071
@@ -954,6 +954,8 @@ PidFilePath=(where POL will write its .pid file {default ./})
[ReportAdminEmail=(string email {default ""})]
[ReportServer=(string servername {default "polserver.com"})]
[ReportURL=(string url {default "/pol/report_program_abort.php"})]
[HideWarningGump=(1/0 {default 0})]
[HideWarningItem=(1/0 {default 0})]
</structure>
<explain>Your own pol.cfg should give descriptions on most of these. I'll describe them here if people want me to.</explain>
ignition = uorice = none, 2.0.0x and due to autocalculation major.minor.build (no patch)
@@ -972,6 +974,8 @@ PidFilePath=(where POL will write its .pid file {default ./})
<explain>EnforceMountObjtype: will enforce that only items with the mount objtype (as defined in extobj.cfg) can be mounted.</explain>
<explain>AllowMultiClientsPerAccount: when true, will allow multiple characters from the same account to be logged in at the same time</explain>
<explain>ProfileCProps: when true, will record CProp usage statistics. Helps detecting unused CProps, at the cost of some RAM and an unnoticeable performance impact. It should be enabled from startup, or the core will be unable to detect the type of some CProps.</explain>
<explain>HideWarningGump: will hide unexpected gump warning messages on the console.</explain>
<explain>HideWarningItem: will hide equip item and drop item warning messages on the console.</explain>
</cfgfile>


@@ -5,6 +5,13 @@
<datemodified>02-02-2019</datemodified>
</header>
<version name="POL100">
<entry>
<date>02-18-2019</date>
<author>Skinny:</author>
<change type="Added">pol.cfg HideWarningGump and HideWarningItem.<br/>
Many players macros generate warnings messages on the console, causing flooding, especially if you have lots of players online.<br/>
You can enable setting HideWarningGump=1 and HideWarningItem=1 in the pol.cfg. Default value is 0.</change>
</entry>
<entry>
<date>02-02-2019</date>
<author>Yukiko:</author>
@@ -1,4 +1,8 @@
-- POL100 --
02-18-2019 Skinny:
Added: pol.cfg HideWarningGump and HideWarningItem.
Many players macros generate warnings messages on the console, causing flooding, especially if you have lots of players online.
You can enable setting HideWarningGump=1 and HideWarningItem=1 in the pol.cfg. Default value is 0.
02-02-2019 Yukiko:
Added: uoconvert.exe will now surface the AnimID for equippables to tiles.cfg. This can be used to look-up the gump pic for wearables that are displayed on the paper doll. Add this number to 50000 for male gumpart or 60000 for female gump art. The resulting number will be the gump art that is displayed in the paper doll.
01-21-2019 Nando:
@@ -799,16 +799,22 @@ void drop_item( Network::Client* client, PKTIN_08_V1* msg )
Items::Item* item = client->chr->gotten_item();
if ( item == nullptr )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but had not gotten an item.\n" )
<< client->chr->serial << item_serial;
if ( !Plib::systemstate.config.hide_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but had not gotten an item.\n" )
<< client->chr->serial << item_serial;
}
return;
}
if ( item->serial != item_serial )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but instead had gotten item 0x{:X}.\n" )
<< client->chr->serial << item_serial << item->serial;
if ( !Plib::systemstate.config.hide_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but instead had gotten item 0x{:X}.\n" )
<< client->chr->serial << item_serial << item->serial;
}
item->gotten_by( nullptr );
return;
}
@@ -869,16 +875,22 @@ void drop_item_v2( Network::Client* client, PKTIN_08_V2* msg )
Items::Item* item = client->chr->gotten_item();
if ( item == nullptr )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but had not gotten an item.\n" )
<< client->chr->serial << item_serial;
if ( !Plib::systemstate.config.hide_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but had not gotten an item.\n" )
<< client->chr->serial << item_serial;
}
return;
}
if ( item->serial != item_serial )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but instead had gotten item 0x{:X}.\n" )
<< client->chr->serial << item_serial << item->serial;
if ( !Plib::systemstate.config.hide_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to drop item 0x{:X}, but instead had gotten item 0x{:X}.\n" )
<< client->chr->serial << item_serial << item->serial;
}
item->gotten_by( nullptr );
return;
}
@@ -12,6 +12,7 @@
#include "../clib/clib_endian.h"
#include "../clib/logfacility.h"
#include "../clib/rawtypes.h"
#include "../plib/systemstate.h"
#include "item/item.h"
#include "layers.h"
#include "mobile/charactr.h"
@@ -43,18 +44,24 @@ void equip_item( Network::Client* client, PKTIN_13* msg )

if ( item == nullptr )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to equip item 0x{:X}, which did not exist in gotten_items.\n" )
<< client->chr->serial << serial;
if ( !Plib::systemstate.config.hide_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to equip item 0x{:X}, which did not exist in gotten_items.\n" )
<< client->chr->serial << serial;
}
send_item_move_failure( client, MOVE_ITEM_FAILURE_ILLEGAL_EQUIP ); // 5
return;
}

if ( item->serial != serial )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to equip item 0x{:X}, but had gotten item 0x{:X}\n" )
<< client->chr->serial << serial << item->serial;
if ( !Plib::systemstate.config.hide_warning_item )
{
POLLOG_ERROR.Format(
"Character 0x{:X} tried to equip item 0x{:X}, but had gotten item 0x{:X}\n" )
<< client->chr->serial << serial << item->serial;
}
send_item_move_failure( client, MOVE_ITEM_FAILURE_ILLEGAL_EQUIP ); // 5
item->gotten_by( nullptr );
return;
@@ -1474,10 +1474,13 @@ void gumpbutton_handler( Client* client, PKTIN_B1* msg )
UOExecutorModule* uoemod = client->gd->find_gumpmod( gumpid );
if ( uoemod == nullptr )
{
POLLOG_INFO.Format(
"\nWarning: Character 0x{:X} sent an unexpected gump menu selection. Gump ID 0x{:X}, "
"button ID 0x{:X}\n" )
<< client->chr->serial << gumpid << buttonid;
if ( !Plib::systemstate.config.hide_warning_gump )
{
POLLOG_INFO.Format(
"\nWarning: Character 0x{:X} sent an unexpected gump menu selection. Gump ID 0x{:X}, "
"button ID 0x{:X}\n" )
<< client->chr->serial << gumpid << buttonid;
}
return;
}

@@ -255,6 +255,9 @@ void PolConfig::read_pol_config( bool initial_load )
Plib::systemstate.config.thread_decay_statistics =
elem.remove_bool( "ThreadDecayStatistics", false );

Plib::systemstate.config.hide_warning_gump = elem.remove_bool( "HideWarningGump", false );
Plib::systemstate.config.hide_warning_item = elem.remove_bool( "HideWarningItem", false );

// store the configuration for the reporting system in the ExceptionParser
bool reportingActive = elem.remove_bool( "ReportCrashsAutomatically", false );
std::string reportingAdminEmail = elem.remove_string( "ReportAdminEmail", "" );
@@ -96,6 +96,9 @@ struct PolConfig
bool single_thread_decay;
bool thread_decay_statistics;

bool hide_warning_gump;
bool hide_warning_item;

/**
* @brief Returns true if program aborts are reported
*/

0 comments on commit c35faa4

Please sign in to comment.
You can’t perform that action at this time.