[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4712: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4714: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4715: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4716: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
Weirdness: getSkillTotal versus getCappedSkillTotal | JoinUO Forums

Weirdness: getSkillTotal versus getCappedSkillTotal

The UO "Demo" is a slightly modified OSI UO Server and Client which was bundled on the Ultima Online Second Age retail CD. This forum seeks to reveal it's mysteries.

Site Admin
Posts: 372
Joined: Wed Apr 08, 2009 6:35 am
PostPosted: Fri Dec 18, 2009 12:03 pm
Today I discovered something weird with the Command List that defines what functions are available to the scripts.

There are 2 functions, getSkillTotal and getCappedSkillTotal, both of them will execute the same internal function and thus are equal even though the name suggests different return values.
The definition in the Command List table/array looks like this:
definition.jpg
definition.jpg (22.58 KiB) Viewed 2668 times


Both functions will be executed by the function I named COMMAND_getSkillTotal. When I was looking at that function I noticed that the core also has an internal function COMMAND_getCappedSkillTotal. The string reference to "getCappedSkillTotal" indicates that such an internal function really exists.
2 functions.jpg
2 functions.jpg (118.96 KiB) Viewed 2668 times

As you can see in the above screenshot, a "DATA XREF" comment is missing for COMMAND_getCappedSkillTotal showing that this function is unreferenced which means unused!

Because no script is using "getCappedSkillTotal" I'm thinking this was done on purpose and it is a left-over from older server code. For the record, only two scripts are calling "getSkillTotal": "info.m" and "repconvert.m".
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything

Return to UO Demo

Who is online

Users browsing this forum: No registered users and 1 guest

cron