Changelog 1.1 - novasdream/forgottenserver GitHub Wiki

=====================

Engine

  • Non-blocking SQL queries
  • The following item attributes can now be customized using setAttribute for items: name, article, pluralname, weight, attack, defense, extradefense, armor, hitchance and shootrange
  • Increased accuracy of scheduled events
  • Optimized dispatcher and scheduler code
  • Using integers instead of floating point numbers for item weight and player capacity
  • Using max packet length from MySQL in DBInsert class to know when it is appropriate to execute the query
  • Rewritten skills code to handle 64-bit tries for magic level and skills properly
  • Fixed a rounding bug with the formula for magic level offline training
  • Fixed a bug allowing players to equip two-handed weapons with a shield when using classic equipment slots
  • Fixed a bug where stamina wouldn't be consumed for some players in a party with shared experience enabled

Features

  • Mana drain now counts as damage

Source code

  • Use of more C++11 features:
    • final/override
    • emplace for map insertions
  • Updated pugixml to version 1.5
  • Removed XPath from pugixml
  • Removed virtual specifier from all functions that aren't being overridden
  • Fixed linking with LuaJIT on Mac OS X

Script interface

  • Breaking change: Creature userdata (creature) is now passed to every event callback instead of creature id (cid)
    • This also applies for all subclasses; Monster, NPC and Player
  • Items passed to Lua event callbacks can now be utilized directly as userdata. You can still access itemid, uid, actionid and type by accessing them as table properties.
  • Events
    • Creature
      • onChangeOutfit
      • onAreaCombat
      • onTargetCombat
    • Player
      • onGainSkillTries
  • New functions
    • item:hasAttribute(key)
    • item:getWeight()
    • itemType:getClientId()
    • itemType:getCharges()
    • itemType:getHitChange()
    • itemType:getShootRange()

Data pack

  • Updated scripts to utilize userdata objects more efficiently