Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
Changes to 1.2.9 +nb
*motd.php --> month is now a valid DATETIME, so set to 31 as last day returns an error
*lib/clan/clan_default.php -> GROUP BY condition again (see mysql 8 issues) does not accept an order anymore (rightfully)
Changes to 1.2.8 +nb
*forest.php -> $packofmonsters set to false by default
*lib/dbwrapper.php -> was missing somewhere.. my bad
*lib/errorhandling.php -> fixes stuff that brakes in php 7.x, no magic quotes anymore!
*lib/modules.php -> "function" is now a reserved keyword, which suckes in the module_hooks table... as it is a row there.
*lib/pageparts.php -> petitions are now able to be hooked into and resorted (page display), allows now resorting
*lib/commentary.php -> multibyte fixes to substr functions
Changes to 1.2.7 +nb
*healer.php -> IamCanDoit pointed out that the level 1 healing costs 0 and doesn't require a partial heal. Changed. Also the IFs and Else in companion heal wasn't looking good. Comments on commit 97c74f9
*battle.php -> isset() needs to check for index values not existing
*prefs.php -> mail address defaulting to in email change email (not nice, not critical), changed
*lib/mail/case_read.php, lib/petitions/petition_default.php -> instead of GET (report to admin), POST works better with long mails and won't break
*modules/* -> modules updated to current
*modules/charrestore.hp -> added char restorer
Changes to 1.2.6 +nb
*lib/buffs.php -> added strip_companion($name) which removes one or more companions safely
*lib/phpmailer -> removed, now new phpmailer in ext
*lib/sendmail.php -> moved the phpmailer from lib/phpmailer to ext to composer.json in an effort to organize addons better
*lib/systemmail.php -> minor syntax fixes and autoload implementation of the ext-Folder
*newday.php -> added new setting "debtfloor" which will prevent people to get infinite minus gold in bank (will break database fields else!)
*lib/all_tables.php and several --> 0000-00-00 00:00:00 is not valid DATETIME since MySQL 5.7 anymore. Hence, new constants DATETIME_DATEMIN and _DATEMAX have been introduced in lib/constants.php. Default is set to 1970-01-01 ... and 2159-01-01 ... - max could be 9999-12-31, but if I get older than 160 years, I'll fix that for you - also set a few size values from int to bigint
*lib/events.php -> replaced $PHPSELF with $_SERVER['PHP_SELF']
*lib/fightnav.php -> replaced $PHPSELF with $_SERVER['PHP_SELF']
*lib/modules.php -> replaced $PHPSELF with $_SERVER['PHP_SELF']
*lib/pageparts.php -> companion array was counted before made sure it was an array
*lib/show_backtrace.php -> each() deprecated and now foreach()
*lib/translator.php -> $PHPSELF changes and some each() deprecation fixes
*motd.php --> critical SQL injection attack fix. Month in httppost was not escaped and directly patched into an SQL query!
*runmodule.php -> had a slow query log to /var/log/... leftover from my personal server, sorry!
Changes to 1.2.5 +nb
*creatures.php --> forest/graveyard active will now be displayed in editor
*lib/commentary.php --> added a new hook "gmcommentarea" with section and "allow_gm"=>false to handle module requests to allow /game comments
added a fix (GM titles didn't work due to wrong variable used)
*lib/forest.php --> new hook "forest" to add stuff before the description (i.e. for mobile buttons that need to be top)
*lib/mail/case_default.php --> javascript security confirmation for move/delete of mail
*lib/pageparts.php --> added ajax script for title change (in case of new mail), needed maillinktabtext() function
*list.php --> new setting (in lib/data/configuration.php) added to show only online folks in list.php on the frontpage (default true). reason: online spiders grabbing playerlists in total makes no sense
*mailinfo_common.php --> new, needed to send a short error page in case of a timeout for the ajax functions. a full page costs bandwidth
*rawsql.php --> small text adaption for when no changes are made. Also removed error text when an UPDATE/DELETE statement produced no affected rows to show (db_num_rows error on TRUE result)
*superuser.php --> new hook to make the section "switchable"
*stables.php --> If you lack DKs to show an existing available mount, it will display that mount now in the nav as unavailable
*stables.php --> added a mountpoint to influence mount data and cost
*lib/commentary.php --> forgot a closing > at a </div> - section close
*lib/dbwrapper_* + create.php + modules.php + list.php + logdnet.php --> mysql_real_escape_string depends on server type. made new function to wrappers for mysqli (mysql wrapper is now obsolete with ubuntu 15.04 LTS fyi)
*lib/user/user_del.php --> typo, "res" in line 8 should be "row".
Changes to 1.2.4 +nb
*home.php --> added a "forgotten password" link below the Login Button
*mailserver_info.php, lib/pageparts.php etc. --> AJAX reworked, removed faulty body implementation, made JQuery compliant and added JQ
*lib/playerfunctions.php, lib/pageparts.php --> Quality of life: added a atk/def explain how the value gets calculated.
*hof.php --> money sorting did not work with the cast() commands in the mysql syntax anymore (since mysql 5.5). Redid that and it works now (included even number formatting to full hundreds)
Changes to 1.2.3 +nb
*login.php, superuser.php --> now superusers who logout to the fields will be brought to the grotto on login (no newday). So people who "just check in" won't be bothered with a new day unless they want it. In superuser.php I put in a logout for superusers. In login.php it checks if a superuser with (!) grotto access logs out.
*login.php --> lowered the threshold for bans to 15 minutes
*lib/sanitize.php --> new function sanitize_mb($str), which will cut a string until it is a valid encoding - or 0.
Well, a big group of problems shows up with multibyte strings. substr breaks multibytes, hence causing errors.
*battle.php --> line 404. Fixed an error where no $creature['experiencegained'] was defined. Causing errors in PHP 5.3.3
*donators.php --> now if the exact name is found, it will be returned instead of <=100 alternatives.
*lib/commentary.php --> same here + added GM/MOD stuff to the names
*lib/mail/case_*.php --> fixed substrs and added sanitize_mb if stuff breaks from httpget (length)
*logdnet.php --> encoding fix for other servers
Changes to 1.2.2 +nb
*bans.php,user.php,lib/bans/*.php,lib/constants.php,superuser.php --> we have a new SU flag: SU_IS_BANMASTER. You can now assign (apart from SU_EDIT_USERS) a new flag that lets one edit bans, even if he/she has no user edit rights. This makes sense, because editing users and banning them is far apart - a ban can be revoked easily, if somebody wrecked havoc in user files, or even deleted (!) them, well. Nasty. I have not limited the powers currently, all included, including perma bans. I also split up the bans from user.php to bans.php and subdirs to make it better distinguishable.
*corenews.php (new), superuser.php, lib/data/configuration.php --> added a "Core News" Section where news about the +nb Editions (bugfixes, whatnot) can be fetched from the server. Easy access to see what's new
*lib/checkban.php --> added a "how much time left" to the bans (misleading if you play from a different timezone)
*lib/installer/installer_stage_5.php --> added an output to display the mysql user rights. Particularly useful to check for the LOCK TABLES privilege (I won't parse that really. Too much hassle for the effect.
*moderate.php --> bans could not be inserted if the banning member has ' or " in his name - there was no escape sequence for these chars in the SQL statement
*user.php --> Clan names with commas broke the view in the pulldown ...
*viewpetition.php,lib/petition/petition_default.php,lib/data/configuration.php --> added a category selection for the game. Now people who petition can select a category / type of the petition they enter. The points can be set in the settings.
*lib/bans/case_removeban.php --> DELETE query for bans altered and added the H:m:s as it was only for full days before. Added that query to lib/checkban.php too so we do a better cleanup.
*lib/charcleanup.php --> Finally found the nasty bug that caused CLAN_FOUNDERs to be demoted ... when a leader expires/deletes himself, the check was basically missing any founders, "promoting" them to CLAN_LEADER
*lib/lookup_user.php --> If you search for stuff that has a ' in it, the sql will break really hard as the insertion of % is after ANY char. Means it will "unescape" stuff. It should now work.
*lib/graveyard/case_question.php --> fixed a wrongful "restore soul" heal count if you have more soulpoints than your max (i.e. via event).
*lib/user.php --> words over 45 letters would always break, soap or not. Afkamm/Dragonprime reported this
*account.php --> new file, you can use the "accountstats" hook to add $array("title"=>$title,"value"=>$value) to the stat array that gets displayed. Please pre-translate any title output in your module ;) this is linked on the village page. If you don't want these stats, make a module and wipe above mentioned array clear.
*viewpetition.php --> small cleanup & nav moving
Changes to 1.2.1 +nb
*configuration.php, create.php, lib/settings.php, lib/settings_extended.php(new), lib/data/settings.php (new), lib/data/configuration.php(new), lib/dta/configuration_extended.php(new) --> Phew... quite some stuff. I removed the entire array from configuration.php and moved it to lib/data/configuration.php ... I added an extended section for settings - the text settings...all large chunks should go there - they are NOT necessary in each session. Just for sending mails and such. I also try to avoid the defaultvalue in function calls like "getsetting($name,$defaultvalue)" ... because I want the defaults in lib/data/settings.php ... defaults should not be spread over the entire installation. The extended settings are already complete with it, the normal settings will be on release.
So for instance you can freely (!) set now the mail text and mail subject people get when they register or request a forgotten password - without you having to translate it in order to customize it! =) Also you can set in a few variables, explained in the "Extended Settings" section in the "Game Settings" grotto menu
*configuration.php, newday.php, lib/graveyard/*.php --> you can now set the favorcosts for resurrections in your game settings
*configuration.php, lib/data*, lib/expire_chars.php --> you can now set the formerly hardcoded days a user gets email before his char expires (accounts only for >level 1 dk0 chars). The default is 5 days.
*configuration.php, lib/data*, lib/expire_chars.php --> the mail text for expiration notifications is now a setting.
*create.php --> added a display of the login name to the "An email has been sent to ... to verify..." section so people know their login name even if they get no mail (mistyped address i.e.). Also the server char expiration stuff is shown now
*create.php, login.php, lib/serverfunctions.class.php (new) --> now the cheat to bypass the maximum limit of players on the server through forgotten password / forgotten email functions has been solved in core. The newly create lib/serverfunctions features a new common class of useful functions that concern the entire server. I used ServerFunctions::isTheServerFull() to see if the server is full or not (if you allow all players, it will always return false)
*cron.php, lib/newday/newday_runonce.php and more in there --> you can now fully configure what you want to do with the cron: newday (hooks), char expiration, comment expiration, db optimization... selectable via a bitmask (see cron.php at the top) what to do. I recommend (on large servers) to make the a cron (commandline) with argument 1 (do only the newday) at your server newday times. THEN do a cron.php 14 at a relatively calm time of the day - there will be your db and comment cleanup stuff. This will make newdays swift and expirations (which take time and are high load) take place when you have enough ressources free.
*gamelog.php --> different highlighting and now always displaying a timestamp
*graveyard.php, newday.php, lib/graveyard/*.php --> Haunting got out of the core, it is now a module (enclosed with the core). Resurrections stay (for now) in the core - also added new hook "deathoverlord_actions" ... if you want to see how it works - see the graveyard_haunt.php module... ;)
*modules.php, lib/modules.php --> now if $modulename_install or $modulename_uninstall return values who are FALSE, the install / uninstall is thwarted. Be sure to always return true in your modules if everything is alright.
*news.php, lib/newday/newday-runonce.php --> The news cleanup has been moved to the newday-runonce (Made more sense).
*train.php, dragon.php, lib/playerfunctions.php, lib/forestoutcomes.php --> added get_player_dragonkillmod to determine the buff base points relying on a DK basis. You can edit that function to adapt it, but I advise using modules or editing of the creatures in your game to make that fitting.
*superuser.php, globaluserfunctions.php, lib/serverfunctions.class.php --> added a global reset of all dragonpoints for respending - including hook "dragonpointreset" and with automatic recalculation of HP
*lib/battle-skills.php, lib/data/configuration.php --> Enemy power attacks now settable in both frequency and multiplier
*lib/commentary.php, lib/data/configuration.php --> a new setting "chatlinelength" has been introduced. You can now set the line of the chat to almost any length via setting.
*lib/forestoutcomes.php --> $bonus for exp+gold on higher DKs will now be set lower each DK to reflect the higher atk/dmg enemies deal. Exact formula see file.
*lib/pvplist.php --> added a "anylocation" field to the $args['badguy'] which lets you attack any people in in any location
*lib/pullurl.php --> commented curl support out. base_dir is usually set and therefore it causes only problems.
*lib/sendmail.php --> new file, for email handling. Now uses PHPMailer() to ensure emails are delivered correctly. I set the language in there to "en" for English, rest to UTF-8. You can edit there (mind new versions). PHPMailer() is in /lib/phpmailer with a secured .htaccess deny-from-all. You can switch to new versions there if you like.
*dragon.php and train.php --> did not add the other stat values to make the enemy harder :(
*gamelog.php --> small error in line 39 caused the "by char expiration" link not to work
*modules.php, lib/datacache.php --> datacache should now correctly massinvalidate(). The function did not work properly before - files were never deleted, the file_exists checked only for the filename - without a path :-/
*lib/data/configuration.php --> somebody forgot to make the pvptimeout a setting here Oo it was used with 600 seconds default, and not changeable in the grotto...
*lib/installer/installer_sqlstatements.php --> forget to change not only the taunts but the masters stuff too.
*lib/modules.php --> bug caused to randomly have inactive events in the event selection, so "xxx was tried to be injected but is inactive" did occur randomly. The cause was a cached query that went for both inactive AND active events, hence they got mixed up randomly.
*updated installer and default template
*yarbrough template has the title.gif moved to its own folder
Changes to 1.2.0 +nb
*TEMPLATES: All colour code are now held in templates/common/colors.css, please modify your colours THERE for ALL templates. Existing templates MUST require it if you want to benefit from them.
To define a new colour including code, you now need to edit lib/output.php AND create a new class in templates/common/colors.css ...that's it. =) works everywhere.
-about.php --> Altered the sorting, and in /lib/about_default.php added the +nb Version Infos above the lotgd stuff. This is not meant to put it down, but to make people read the Version Info about this version first, before reaching the Lotgd stuff. A game does not have to be named "Legend of the Green Dragon", it's merely a core engine to me.
-battle.php --> if you have by any circumstance lost hitpoints, the fight will not be flawless. Enemy buffs/Poison will be prevented.
-battle.php --> If you have instant exp ON and have i.e. a fight done by a special and not handled by the forest, you will get EXP messages with "You receive 0 exp" once the enemy is dead. It should now work ONLY if the variable $badguy['creatureexp'] is set, it may be == 0.
-configuration.php --> datacache path and usage now shown again, along with other stats
-common.php --> smaller bugfixes in text outputs and put gzhandler into the settings file for people who activate zlib compression which is preferred.
-create.php --> Added Login display to the mail from forgotten password - nice to know what char it was for.
-create.php / prefs.php --> a new option has been put into service - you can now allow the auto-accept of email changes if you want. Choose a number of days after which after no reponse the request leads to an ingame choice to change the email to the new one IMMEDIATELY. Also you can now cancel change requests ingame (no notification). // NOTE: this got introduced into as a bug appeared which made it not smart to fix and then upgrade to this. If you have an older, you'll already have this.
-creatures.php --> added a refresh and simple move with stats from one level to the other
-lib/checkban.php --> now also the banner is displayed to the user
-lib/clan/clan_membership --> added a confirmation javascript if a founder tries to step down. Too many just hit the button and wait for a confirmation ...
-lib/forms.php --> outsourced again "previewfield", after minor modifications to make it work for normal fields and added a return value
-lib/graveyard/case_battle_search.php --> added hook graveyardfight-start passing the attackstack to modify
-lib/mail/case_default.php --> added arrows in /images/shapes to show the newly invented sort order. You may get the same functionality for add-on mail modules
-lib/pvpsupport.php --> function pvplist now does NOT anymore the 'select all and then count MANUALLY in a loop' ... I let myself do all the work, and put in one more query with a GROUP BY clause. This ALSO has the benefit that the pvplist now automatically has NO people from other locations in there that don't sleep there. It makes the hook 'pvpmodifytargets' much more reliable if you want to display i.e. WHY a certain user has been rendered invalid. On second thought, I'll just make the invalid field a text field... ;)
-lib/pvplist.php --> hook 'pvpmodifytargets' can have now a 'silentinvalid' which simply blocks it. If it's just the usual 'invalid' flag, then 'invalid', if !=1 is the message to display in brackets after the name. If ==1, then "Unable to attack" will be displayed. This message also gets translated to the user's language.
-lib/redirect.php --> Text now looks nicer and can be color encoded.
-lib/user/user_save.php --> now the previous value also goes into the debuglog when a SU saves stuff using the user editor. This previous value can be used to double check alterations to a char.
-lib/user/user_saveban.php --> bans now log out all affected players ;) setting loggedin=0. Saves you the time to log out that player via sql query manually, however you should speak with him/her ingame BEFORE you issue the ban now, else he/she won't hear you. No "you're banned on next login" will work.
-newday.php --> forgot to clear some code with the old at/de settings after a DK up. Now you cannot choose atk/def points, but they remain visible to the user and won't be displayed as unknown. If you write a module, hook in to the "dkpointlabelss" and set $args['canbuy']['at']=1 they can even choose that again.
-shades.php --> change of hook position to be BEFORE the comment.
-titleedit.php --> Editing and adding still displays the entire titles for easier editing/adding
-weaponeditor.php --> You can now set the weapon level directly.
-translatortool.php --> datacache was on cached translations wrongly invalidated ($namespace did not exist, $uri did)
-lib/all_tables.php --> defense and attack have a default of 0, not 1, in the database...
->note: if you have old race files that have buffs like
then you have a problem. defense is 0 (it's now calculated so this is only the weapondmg etc.) and hence you get defmod 0...means the user has NO defense at all... please edit all your racefiles to make sure you have
the last "1" is vital (!) to not lose anything. Adjust to 1.1 or whatever you want for players who have just killed the dragon with no weapon etc bought.
-lib/clan/applicant.php applicant_apply.php clan_withdraw.php --> titles with ' inside caused mysql queries to DELETE withdrawal/apply subjects from mail to break.
-lib/dbwrapper_* --> they never threw errors, as common.php is always defining IS_INSTALLER, even to false... that lead to the fact that the db_wrapper check with defined() always returned TRUE... hence no SQL errors EVER got displayed.
-lib/expire_chars.php --> emailed expiration mails now have the correct charset and additionally the number of updates was reduced from 1 per expired char to 1 for all expired chars in the while() loop. 100 notifications meant 100 queries, 99 unnecessary.
-lib/mail/case_write.php --> RE: was meant to be added once, but was checked if it was there (===) and then added again, instead of checking and NOT (!==) adding when already there
-lib/pvplist.php --> if an sql statement is given, the "who is sleeping where" will screw up =) $id,$loc,$levdiff etc were set ONLY if no sql statement was given, but used later on. Pure core bug. And thanks to the error in the dbwrappers, this never surfaced ;) thanks, DP Team ;)
-lib/systemmail.php --> emailed YOMs do now have the correct charset setting
-prefs.php & mounts.php --> removed the showTabFormIndex from the save so it gets dropped after httpallpost is done. Thanks to Iori for pointing it out.
-battle.php, configuration.php, lib/extended-battle.php, lib/battle-functions.php --> added healthbars to the forest creatures - it can be set in the grotto settings to either bar/bar+text/text(like currently). The bar class can be used for all kinds of bars and will be developed further. The user can choose a different display in his preferences.
-donators.php, lodge.php, payment.php, configuration.php --> added a setting to make X points per USD/EUR/whatnot: getsetting('dpointspercurrencyunit',100) is the standard call. Note: It would be good to give out the currency you use for paypal in your modules, setting paypalcurrency
-viewpetition.php --> added a counter for all categories (incl. user-cats) to the left hand side bar.
-viewpetiton.php --> added hook "petition-abuse" with argument acctid=abuser to be able to let module handle this
-lib/mail/case_read.php & petition files --> added abuseplayer field to process petitions reported for abuse... a moderator only cannot ban on mail only. Having the acctid of the offender there lets us do some stuff.
-lib/mail/case_default.php & case_read.php & playerfunctions.php --> added online/offline gif-image to view in the mail overview and read view. It's relatively efficient using new is_player_online($acctid) or mass_is_player_online($array_of_acctids) functions defined in the playerfunctions.php. You can use them too ;) is_player_online even caches if you already asked about a player ^^ Thanks to Raja Kavuru for the idea
-lib/pvplist.php --> now you can cap the max amount of EXP another player gets from a successful PvP ... if you have sitters (people who won't kill the dragon) then sometimes in a fluke a normal player wins against them... and then... he gets an insane amount of exp. This unbalances things... (ok, sitters do in general...)