2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| File - msgboard.cpp
//| Date - 16/04/1999
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Message Board Handling
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Changes - Version History
2012-11-03 18:11:04 +00:00
//|
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
//| 1.0 16th April 1999 - 0.69.03
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Initial implimentation
2012-11-03 18:11:04 +00:00
//|
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
//| 1.1 19th January 2000 - 0.70.02
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Additional features added to messageboard
//| Escort quests added / integrated with message board enhancements
2012-11-03 18:11:04 +00:00
//|
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
//| 2.0 10th August 2005 - 0.98-3.0g
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Complete rewrite of msgboard.cpp
//| Modified file i/o to use fstreams for faster file reads/writes.
//| Completely re-formatted the message board files to remove the need for two files, and reduce waste.
//| Made use of packet classes to simplify sending & receiving data from the client.
//| Added a maintenance function that will automatically clean up the message board files.
//| Added support for message board file deletion upon deleting the associated world object.
//|
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2002-04-07 21:27:53 +00:00
# include "uox3.h"
Added:
-JS Get/Set "vulnerable" handlers for character properties (Abaddon)
-willHunger with Get/Set HungerStatus() wrappers to CChar class (can now
selectively stop a character/creature from continuing to hunger)
-JS Get/Set "willhunger" handlers for character properties Changed:
Linux compile fixes (thanks Malketh)
Hash.h warning fixed (thanks Philantrop)
Fixes to getRootPack() and getPackOwner()
Removed many #includes from the global scope, including them in the specific files that need them
This should greatly reduce compile time and filesize, along with the need to recompile after altering most headers
Removed the linux ifdefs around typedefd function declarations, this should work with gcc 3.2
Moved global loading functions into a new cFileIO() class to take them out of global scope
Fixed an issue causing items to not be sent to the client (thanks Malketh)
Moved some global structs into the CWorldMain class
Fixed a bug causing a crash on character / item creation
Moved all effects stuff into its own class to take it out of global scope
Changed the variable CChar::region to CChar::regionNum to avoid conflicts with the cTownRegion region[] indexes
Moved getbestskill(), isHuman(), and inDungeon() into the CChar class to remove them from global scope
Took npcSimpleAttackTarget() out of global scope
Rewrote restock() to make use of restockNPC()
Changed the typedef'd iterator in hash.h to HASHITERATOR to kill a Linux warning
Renamed cEffects::soundeffect() to PlaySound() and removed unneeded overloads
Fixed a bug causing executebatch to be set with locationcount data
Rewrote cEffects::bgsound()
Documented sounds.cpp
Misc minor cleanups / fixes
Removed:
sendItemsInRange() (CChar::Teleport() does the same thing)
Many #includes that were not being used
deathMenu()
respawnnow() and moved all of its code into command_respawn()
one instance of cEffects::scpSoundEffect() and renamed the other to PlaySound()
3/13/2003
Changed
Fixed an issue allowing the server to not have a dictionary.ZRO (which would cause a crash when a dictionary entry was called with no language)
Fixed an issue causing the server to puke when it attempted a restart
Moved SpawnRandomItem() into cItem class
Moved SpawnRandomMonster() into cCharHandle class
Broke necro.dfn into fishing.dfn and digging.dfn
Made better use of SpawnRandomItem() and SpawnRandomMonster()
3/12/2003
Added:
CPOpenGump and CPSpeech packet class to remove some global vars (Note these are pretty basic classes and someone
with a better understanding of how we handle sending/recieving packets could probably expand these to make better use of them)
Changed:
Moved many global vars into the CWorldMain() class
Cleaned ResetVars() in uox3.cpp as ResetDefaults() in CWorldMain() now handles much of that
Added a check to ensure text wasn't sent twice in talking(), should fix double-speech
Cleaned up cmdtable.cpp removing a couple duplicate entries, etc
Changed target() to only require 4 values (as the first two were always 0 and 1)
Removed many unneeded typedefs and globals
Went through cServerData() and noted unused server.ini entries
Moved title1(), title2(), and title3() to cClick.cpp since that is their only usage, made use
of MAX_TITLE to ensure we wouldn't overrun the buffers, and renamed them matching what title they were
3/11/2003
Changed:
Fixed a potentially very serious bugs with how containers were being set upon loading the world
Fixed possible re-adding of weight to containers and characters at load
Fixed a bug causing equipped items that were not weapons to take damage in combat
Minor cleanups / warning fixes / Linux compatability issues (punt)
3/7/2003
Overhauls/Additions/Major Changes
Changed:
Tweaks/Object Conversions/Misc Small Changes
Changed:
Changed CItem::Get/SetLayer() to a UI08
Fixed a bug in speech causing you to see your own text twice
Fixed a nasty crash bug
2003-03-23 10:18:02 +00:00
# include "msgboard.h"
# include "townregion.h"
# include "cServerDefinitions.h"
2002-04-07 21:27:53 +00:00
# include "ssection.h"
Added:
-JS Get/Set "vulnerable" handlers for character properties (Abaddon)
-willHunger with Get/Set HungerStatus() wrappers to CChar class (can now
selectively stop a character/creature from continuing to hunger)
-JS Get/Set "willhunger" handlers for character properties Changed:
Linux compile fixes (thanks Malketh)
Hash.h warning fixed (thanks Philantrop)
Fixes to getRootPack() and getPackOwner()
Removed many #includes from the global scope, including them in the specific files that need them
This should greatly reduce compile time and filesize, along with the need to recompile after altering most headers
Removed the linux ifdefs around typedefd function declarations, this should work with gcc 3.2
Moved global loading functions into a new cFileIO() class to take them out of global scope
Fixed an issue causing items to not be sent to the client (thanks Malketh)
Moved some global structs into the CWorldMain class
Fixed a bug causing a crash on character / item creation
Moved all effects stuff into its own class to take it out of global scope
Changed the variable CChar::region to CChar::regionNum to avoid conflicts with the cTownRegion region[] indexes
Moved getbestskill(), isHuman(), and inDungeon() into the CChar class to remove them from global scope
Took npcSimpleAttackTarget() out of global scope
Rewrote restock() to make use of restockNPC()
Changed the typedef'd iterator in hash.h to HASHITERATOR to kill a Linux warning
Renamed cEffects::soundeffect() to PlaySound() and removed unneeded overloads
Fixed a bug causing executebatch to be set with locationcount data
Rewrote cEffects::bgsound()
Documented sounds.cpp
Misc minor cleanups / fixes
Removed:
sendItemsInRange() (CChar::Teleport() does the same thing)
Many #includes that were not being used
deathMenu()
respawnnow() and moved all of its code into command_respawn()
one instance of cEffects::scpSoundEffect() and renamed the other to PlaySound()
3/13/2003
Changed
Fixed an issue allowing the server to not have a dictionary.ZRO (which would cause a crash when a dictionary entry was called with no language)
Fixed an issue causing the server to puke when it attempted a restart
Moved SpawnRandomItem() into cItem class
Moved SpawnRandomMonster() into cCharHandle class
Broke necro.dfn into fishing.dfn and digging.dfn
Made better use of SpawnRandomItem() and SpawnRandomMonster()
3/12/2003
Added:
CPOpenGump and CPSpeech packet class to remove some global vars (Note these are pretty basic classes and someone
with a better understanding of how we handle sending/recieving packets could probably expand these to make better use of them)
Changed:
Moved many global vars into the CWorldMain() class
Cleaned ResetVars() in uox3.cpp as ResetDefaults() in CWorldMain() now handles much of that
Added a check to ensure text wasn't sent twice in talking(), should fix double-speech
Cleaned up cmdtable.cpp removing a couple duplicate entries, etc
Changed target() to only require 4 values (as the first two were always 0 and 1)
Removed many unneeded typedefs and globals
Went through cServerData() and noted unused server.ini entries
Moved title1(), title2(), and title3() to cClick.cpp since that is their only usage, made use
of MAX_TITLE to ensure we wouldn't overrun the buffers, and renamed them matching what title they were
3/11/2003
Changed:
Fixed a potentially very serious bugs with how containers were being set upon loading the world
Fixed possible re-adding of weight to containers and characters at load
Fixed a bug causing equipped items that were not weapons to take damage in combat
Minor cleanups / warning fixes / Linux compatability issues (punt)
3/7/2003
Overhauls/Additions/Major Changes
Changed:
Tweaks/Object Conversions/Misc Small Changes
Changed:
Changed CItem::Get/SetLayer() to a UI08
Fixed a bug in speech causing you to see your own text twice
Fixed a nasty crash bug
2003-03-23 10:18:02 +00:00
# include "cEffects.h"
2012-11-03 18:11:04 +00:00
# include "CPacketSend.h"
# include "classes.h"
# include "Dictionary.h"
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
# include "StringUtility.hpp"
2022-03-05 09:12:21 -05:00
# include "osunique.hpp"
2022-06-09 08:02:49 -04:00
# include <filesystem>
2022-10-24 18:39:33 +08:00
using namespace std : : string_literals ;
//o------------------------------------------------------------------------------------------------o
//| Function - GetMsgBoardFile()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 8/6/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
//| Purpose - Creates the proper MessageBoard filename based on the messageType and board Serial
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
std : : string GetMsgBoardFile ( const SERIAL msgBoardSer , const UI08 msgType )
{
std : : string fileName ;
switch ( msgType )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
case PT_GLOBAL :
fileName = " global.bbf " ;
break ;
case PT_REGIONAL :
CItem * msgBoard ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
CTownRegion * mbRegion ;
2022-10-24 18:39:33 +08:00
msgBoard = CalcItemObjFromSer ( msgBoardSer ) ;
mbRegion = CalcRegionFromXY ( msgBoard - > GetX ( ) , msgBoard - > GetY ( ) , msgBoard - > WorldNumber ( ) , msgBoard - > GetInstanceId ( ) ) ;
fileName = std : : string ( " region " ) + oldstrutil : : number ( mbRegion - > GetRegionNum ( ) ) + std : : string ( " .bbf " ) ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
break ;
2022-10-24 18:39:33 +08:00
case PT_LOCAL :
fileName = oldstrutil : : number ( msgBoardSer , 16 ) + std : : string ( " .bbf " ) ;
break ;
default :
Console . Error ( " GetMsgBoardFile() Invalid post type, aborting " ) ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
break ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
return fileName ;
2002-04-07 21:27:53 +00:00
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardOpen()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/16/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Opens the Messageboard and Advises the client of the messages
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
void MsgBoardOpen ( CSocket * mSock )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
const SERIAL boardSer = mSock - > GetDWord ( 1 ) ;
2022-10-24 18:39:33 +08:00
CItem * msgBoard = CalcItemObjFromSer ( boardSer ) ;
if ( ! ValidateObject ( msgBoard ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2002-04-07 21:27:53 +00:00
return ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2002-04-07 21:27:53 +00:00
2012-11-03 18:11:04 +00:00
char buffer [ 4 ] ;
std : : string fileName , dirPath ;
2002-04-07 21:27:53 +00:00
2012-11-03 18:11:04 +00:00
mSock - > PostClear ( ) ;
CPOpenMessageBoard mbPost ( mSock ) ;
mSock - > Send ( & mbPost ) ;
CPSendMsgBoardPosts mbSend ;
if ( ! cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) . empty ( ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
dirPath = cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
for ( UI08 currentFile = 1 ; currentFile < 4 & & mSock - > PostCount ( ) < MAXPOSTS ; + + currentFile )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
fileName = dirPath + GetMsgBoardFile ( boardSer , currentFile ) ;
std : : ifstream file ( fileName . c_str ( ) , std : : ios : : in | std : : ios : : binary ) ;
if ( file . is_open ( ) )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
MsgBoardPost_st msgBoardPost ;
2012-11-03 18:11:04 +00:00
file . seekg ( 0 , std : : ios : : beg ) ;
while ( file & & mSock - > PostCount ( ) < MAXPOSTS )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
SERIAL tmpSerial = 0 ;
UI08 tmpToggle = 0 ;
UI16 tmpSize = 0 ;
2022-11-14 21:12:12 -05:00
[[maybe_unused]] SERIAL repliedTo = 0 ;
2012-11-03 18:11:04 +00:00
file . read ( buffer , 2 ) ;
2022-10-24 18:39:33 +08:00
tmpSize = static_cast < UI16 > ( ( buffer [ 0 ] < < 8 ) + buffer [ 1 ] ) ;
2012-11-03 18:11:04 +00:00
file . read ( buffer , 1 ) ;
tmpToggle = buffer [ 0 ] ;
file . read ( buffer , 4 ) ;
2022-10-24 18:39:33 +08:00
repliedTo = CalcSerial ( buffer [ 0 ] , buffer [ 1 ] , buffer [ 2 ] , buffer [ 3 ] ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
file . seekg ( tmpSize - 11 , std : : ios : : cur ) ;
2012-11-03 18:11:04 +00:00
file . read ( buffer , 4 ) ;
2022-10-24 18:39:33 +08:00
tmpSerial = CalcSerial ( buffer [ 0 ] , buffer [ 1 ] , buffer [ 2 ] , buffer [ 3 ] ) ;
2012-11-03 18:11:04 +00:00
if ( ! file . fail ( ) )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
if ( tmpToggle ) // If it's 0, flagged for deletion
{
mbSend . CopyData ( mSock , tmpSerial , tmpToggle , boardSer ) ;
mSock - > PostAcked ( tmpSerial ) ;
}
2002-04-07 21:27:53 +00:00
}
}
2012-11-03 18:11:04 +00:00
file . close ( ) ;
2002-04-07 21:27:53 +00:00
}
}
2012-11-03 18:11:04 +00:00
if ( mSock - > PostCount ( ) > 0 )
{
mbSend . Finalize ( ) ;
mSock - > Send ( & mbSend ) ;
mSock - > PostAckCount ( 0 ) ;
}
2002-04-07 21:27:53 +00:00
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardList()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/16/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Sends the summary of each message to the client
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
void MsgBoardList ( CSocket * mSock )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
char buffer [ 4 ] ;
std : : string fileName , dirPath ;
2002-04-07 21:27:53 +00:00
2022-10-24 18:39:33 +08:00
CItem * msgBoard = CalcItemObjFromSer ( mSock - > GetDWord ( 4 ) ) ;
if ( ! ValidateObject ( msgBoard ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
return ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
if ( ! cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) . empty ( ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
dirPath = cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
for ( UI08 currentFile = 1 ; currentFile < 4 & & mSock - > PostCount ( ) > 0 ; + + currentFile )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
fileName = dirPath + GetMsgBoardFile ( msgBoard - > GetSerial ( ) , currentFile ) ;
std : : ifstream file ( fileName . c_str ( ) , std : : ios : : in | std : : ios : : binary ) ;
if ( file . is_open ( ) )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
size_t totalSize = 0 ;
2022-10-24 18:39:33 +08:00
MsgBoardPost_st msgBoardPost ;
2012-11-03 18:11:04 +00:00
file . seekg ( 0 , std : : ios : : beg ) ;
while ( file )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
file . read ( buffer , 2 ) ;
2022-10-24 18:39:33 +08:00
msgBoardPost . size = static_cast < UI16 > ( ( buffer [ 0 ] < < 8 ) + buffer [ 1 ] ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
file . seekg ( msgBoardPost . size - 6 , std : : ios : : cur ) ;
2012-11-03 18:11:04 +00:00
file . read ( buffer , 4 ) ;
2022-10-24 18:39:33 +08:00
msgBoardPost . serial = CalcSerial ( buffer [ 0 ] , buffer [ 1 ] , buffer [ 2 ] , buffer [ 3 ] ) ;
2012-11-03 18:11:04 +00:00
for ( SERIAL postAck = mSock - > FirstPostAck ( ) ; ! mSock - > FinishedPostAck ( ) ; )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
if ( msgBoardPost . serial = = postAck )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
postAck = mSock - > RemovePostAck ( ) ;
2022-10-24 18:39:33 +08:00
file . seekg ( totalSize + 2 , std : : ios : : beg ) ;
2012-11-03 18:11:04 +00:00
file . read ( buffer , 1 ) ;
if ( buffer [ 0 ] = = 0x05 )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
file . read ( buffer , 4 ) ;
2022-10-24 18:39:33 +08:00
msgBoardPost . parentSerial = CalcSerial ( buffer [ 0 ] , buffer [ 1 ] , buffer [ 2 ] , buffer [ 3 ] ) ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
else
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
file . seekg ( 4 , std : : ios : : cur ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
file . read ( buffer , 1 ) ;
2022-10-24 18:39:33 +08:00
file . read ( msgBoardPost . poster , buffer [ 0 ] ) ;
msgBoardPost . posterLen = buffer [ 0 ] ;
2012-11-03 18:11:04 +00:00
file . read ( buffer , 1 ) ;
2022-10-24 18:39:33 +08:00
file . read ( msgBoardPost . subject , buffer [ 0 ] ) ;
msgBoardPost . subjectLen = buffer [ 0 ] ;
2012-11-03 18:11:04 +00:00
file . read ( buffer , 1 ) ;
2022-10-24 18:39:33 +08:00
file . read ( msgBoardPost . date , buffer [ 0 ] ) ;
msgBoardPost . dateLen = buffer [ 0 ] ;
2012-11-03 18:11:04 +00:00
if ( file . fail ( ) )
{
2022-10-24 18:39:33 +08:00
Console . Warning ( oldstrutil : : format ( " Malformed MessageBoard post, MessageID: 0x%X " , msgBoardPost . serial ) ) ;
2012-11-03 18:11:04 +00:00
file . close ( ) ;
}
else
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
CPOpenMsgBoardPost mbPost ( mSock , msgBoardPost , false ) ;
mSock - > Send ( & mbPost ) ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
break ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
else
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
postAck = mSock - > NextPostAck ( ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2002-04-07 21:27:53 +00:00
}
2022-10-24 18:39:33 +08:00
totalSize + = msgBoardPost . size ;
2012-11-03 18:11:04 +00:00
file . seekg ( totalSize , std : : ios : : beg ) ;
2022-10-24 18:39:33 +08:00
if ( totalSize > 3000 | | msgBoardPost . serial = = 0 ) //HACCKKKK!!!1one. Without this in place, it will loop for ever :(
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
file . close ( ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
file . close ( ) ;
2002-04-07 21:27:53 +00:00
}
}
2012-11-03 18:11:04 +00:00
if ( ! mSock - > FinishedPostAck ( ) )
{
mSock - > PostClear ( ) ;
2022-10-24 18:39:33 +08:00
Console . Error ( oldstrutil : : format ( " Failed to list all posts for MessageBoard ID: 0x%X " , mSock - > GetDWord ( 4 ) ) ) ;
2012-11-03 18:11:04 +00:00
}
}
2002-04-07 21:27:53 +00:00
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - GetMaxSerial()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/22/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Purpose - Updates nextMsgId with the next available message serial.
//o------------------------------------------------------------------------------------------------o
bool GetMaxSerial ( const std : : string & fileName , UI08 * nextMsgId , const PostTypes msgType )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
SERIAL msgIdSer = ( CalcSerial ( nextMsgId [ 0 ] , nextMsgId [ 1 ] , nextMsgId [ 2 ] , nextMsgId [ 3 ] ) ) ;
if ( msgIdSer = = INVALIDSERIAL )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
switch ( msgType )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
case PT_GLOBAL : msgIdSer = BASEGLOBALPOST ; break ;
case PT_REGIONAL : msgIdSer = BASEREGIONPOST ; break ;
case PT_LOCAL : msgIdSer = BASELOCALPOST ; break ;
2002-04-07 21:27:53 +00:00
}
}
2012-11-03 18:11:04 +00:00
else
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2022-10-24 18:39:33 +08:00
+ + msgIdSer ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
nextMsgId [ 0 ] = static_cast < UI08 > ( msgIdSer > > 24 ) ;
nextMsgId [ 1 ] = static_cast < UI08 > ( msgIdSer > > 16 ) ;
nextMsgId [ 2 ] = static_cast < UI08 > ( msgIdSer > > 8 ) ;
nextMsgId [ 3 ] = static_cast < UI08 > ( msgIdSer % 256 ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
if ( nextMsgId [ 1 ] = = 0xFF & & nextMsgId [ 2 ] = = 0xFF & & nextMsgId [ 3 ] = = 0xFF )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
Console . Warning ( oldstrutil : : format ( " Maximum Posts reached for board %s, no further posts can be created " , fileName . c_str ( ) ) ) ;
2012-11-03 18:11:04 +00:00
return false ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
return true ;
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardWritePost()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 8/10/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Writes a new post to the .bbf file
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2023-08-27 21:42:47 -04:00
void MsgBoardWritePost ( std : : ostream & mFile , const MsgBoardPost_st & msgBoardPost )
2012-11-03 18:11:04 +00:00
{
char wBuffer [ 4 ] ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Add post size to 2 bytes of buffer, and write buffer to file
2022-10-24 18:39:33 +08:00
wBuffer [ 0 ] = static_cast < SI08 > ( msgBoardPost . size > > 8 ) ;
wBuffer [ 1 ] = static_cast < SI08 > ( msgBoardPost . size % 256 ) ;
mFile . write ( ( const char * ) & wBuffer , 2 ) ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Write the value of Toggle as the next byte
2022-10-24 18:39:33 +08:00
mFile . write ( ( const char * ) & msgBoardPost . toggle , 1 ) ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Add parent serial to 4 bytes of buffer, and write buffer to file
2022-10-24 18:39:33 +08:00
wBuffer [ 0 ] = static_cast < SI08 > ( msgBoardPost . parentSerial > > 24 ) ;
wBuffer [ 1 ] = static_cast < SI08 > ( msgBoardPost . parentSerial > > 16 ) ;
wBuffer [ 2 ] = static_cast < SI08 > ( msgBoardPost . parentSerial > > 8 ) ;
wBuffer [ 3 ] = static_cast < SI08 > ( msgBoardPost . parentSerial % 256 ) ;
mFile . write ( ( const char * ) & wBuffer , 4 ) ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Write length of poster's name as next byte, and
// then write poster's name as next X bytes
2022-10-24 18:39:33 +08:00
mFile . write ( ( const char * ) & msgBoardPost . posterLen , 1 ) ;
mFile . write ( ( const char * ) & msgBoardPost . poster , msgBoardPost . posterLen ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Write length of post's subject in next byte, and
// then write post subject as next X bytes
2022-10-24 18:39:33 +08:00
mFile . write ( ( const char * ) & msgBoardPost . subjectLen , 1 ) ;
mFile . write ( ( const char * ) & msgBoardPost . subject , msgBoardPost . subjectLen ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Write length of post's date string in next byte, and
// then write date string as next X bytes
2022-10-24 18:39:33 +08:00
mFile . write ( ( const char * ) & msgBoardPost . dateLen , 1 ) ;
mFile . write ( ( const char * ) & msgBoardPost . date , msgBoardPost . dateLen ) ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Write number of lines in post as next byte, and
// then loop through each line
2022-10-24 18:39:33 +08:00
mFile . write ( ( const char * ) & msgBoardPost . lines , 1 ) ;
std : : for_each ( msgBoardPost . msgBoardLine . begin ( ) , msgBoardPost . msgBoardLine . end ( ) , [ & mFile ] ( const std : : string & entry )
{
// Write length of line as next byte, and
// then write the line as next X bytes
2022-10-24 23:42:16 +08:00
auto lineSize = static_cast < UI08 > ( entry . size ( ) ) ;
2022-10-24 18:39:33 +08:00
mFile . write ( ( const char * ) & lineSize , 1 ) ;
2022-06-06 11:27:53 -04:00
mFile . write ( entry . c_str ( ) , lineSize ) ;
} ) ;
2002-04-07 21:27:53 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Finally, add actual post serial to 4 bytes of buffer, and write buffer to file
2022-10-24 18:39:33 +08:00
wBuffer [ 0 ] = static_cast < SI08 > ( msgBoardPost . serial > > 24 ) ;
wBuffer [ 1 ] = static_cast < SI08 > ( msgBoardPost . serial > > 16 ) ;
wBuffer [ 2 ] = static_cast < SI08 > ( msgBoardPost . serial > > 8 ) ;
wBuffer [ 3 ] = static_cast < SI08 > ( msgBoardPost . serial % 256 ) ;
mFile . write ( ( const char * ) & wBuffer , 4 ) ;
2012-11-03 18:11:04 +00:00
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardWritePost()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/22/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Writes a new post to the .bbf file, returning the messages SERIAL
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
SERIAL MsgBoardWritePost ( MsgBoardPost_st & msgBoardPost , const std : : string & fileName , const PostTypes msgType )
2012-11-03 18:11:04 +00:00
{
2022-10-24 18:39:33 +08:00
SERIAL msgId = INVALIDSERIAL ;
2012-11-03 18:11:04 +00:00
std : : string fullFile ;
if ( ! cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) . empty ( ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
fullFile = cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) + fileName ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
std : : ifstream file ( fullFile . c_str ( ) , std : : ios : : in | std : : ios : : ate | std : : ios : : binary ) ;
2022-10-24 18:39:33 +08:00
UI08 nextMsgId [ 4 ] ;
memset ( nextMsgId , 0xFF , 4 ) ;
2012-11-03 18:11:04 +00:00
if ( file . is_open ( ) )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
file . seekg ( - 4 , std : : ios : : cur ) ;
2022-10-24 18:39:33 +08:00
file . read ( ( char * ) & nextMsgId , 4 ) ;
2012-11-03 18:11:04 +00:00
file . close ( ) ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
if ( ! GetMaxSerial ( fileName , & nextMsgId [ 0 ] , msgType ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2022-10-24 18:39:33 +08:00
return msgId ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2002-04-07 21:27:53 +00:00
else
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2022-10-24 18:39:33 +08:00
msgId = CalcSerial ( nextMsgId [ 0 ] , nextMsgId [ 1 ] , nextMsgId [ 2 ] , nextMsgId [ 3 ] ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
auto timet = std : : chrono : : system_clock : : to_time_t ( std : : chrono : : system_clock : : now ( ) ) ;
2022-03-04 19:04:58 -05:00
struct tm timeOfPost ;
2022-10-24 18:39:33 +08:00
lcltime ( timet , timeOfPost ) ;
lcltime ( timet , timeOfPost ) ;
auto time = oldstrutil : : format ( " Day %i @ %i:%02i \0 " , ( timeOfPost . tm_yday + 1 ) , timeOfPost . tm_hour , timeOfPost . tm_min ) ;
time . resize ( time . size ( ) + 1 ) ;
const UI08 timeSize = static_cast < UI08 > ( time . size ( ) ) ;
const UI08 posterSize = static_cast < UI08 > ( msgBoardPost . posterLen ) ;
const UI08 subjSize = static_cast < UI08 > ( msgBoardPost . subjectLen ) ;
auto totalSize = static_cast < UI16 > ( 15 + posterSize + subjSize + timeSize ) ;
std : : for_each ( msgBoardPost . msgBoardLine . begin ( ) , msgBoardPost . msgBoardLine . end ( ) , [ & totalSize ] ( const std : : string & entry )
{
2022-10-24 23:42:16 +08:00
totalSize + = 1 + static_cast < UI16 > ( entry . size ( ) ) ;
2022-06-06 11:27:53 -04:00
} ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
msgBoardPost . size = totalSize ;
msgBoardPost . dateLen = timeSize ;
strncopy ( msgBoardPost . date , 256 , time . c_str ( ) , timeSize ) ;
msgBoardPost . serial = msgId ;
2012-11-03 18:11:04 +00:00
std : : ofstream mFile ( fullFile . c_str ( ) , std : : ios : : out | std : : ios : : app | std : : ios : : binary ) ;
MsgBoardWritePost ( mFile , msgBoardPost ) ;
mFile . close ( ) ;
2022-10-24 18:39:33 +08:00
return msgId ;
2002-04-07 21:27:53 +00:00
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardPost()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/22/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Handles the client requesting to post a new message
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
void MsgBoardPost ( CSocket * tSock )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
CChar * tChar = tSock - > CurrcharObj ( ) ;
2022-10-24 18:39:33 +08:00
if ( ! ValidateObject ( tChar ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
return ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
const PostTypes msgType = static_cast < PostTypes > ( tChar - > GetPostType ( ) ) ;
2012-11-03 18:11:04 +00:00
if ( msgType ! = PT_LOCAL & & tChar - > GetCommandLevel ( ) < CL_GM )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
tSock - > SysMessage ( 9036 ) ; // Only GM's may post Global or Regional messages
2012-11-03 18:11:04 +00:00
return ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
SERIAL repliedTo = tSock - > GetDWord ( 8 ) ;
2022-10-24 18:39:33 +08:00
if ( ( repliedTo & BASEITEMSERIAL ) = = BASEITEMSERIAL )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
repliedTo - = BASEITEMSERIAL ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
if ( repliedTo ! = 0 & & repliedTo < BASELOCALPOST )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
tSock - > SysMessage ( 729 ) ; // You can not reply to global or regional posts.
2012-11-03 18:11:04 +00:00
return ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
std : : string fileName = GetMsgBoardFile ( tSock - > GetDWord ( 4 ) , msgType ) ;
if ( fileName . empty ( ) )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
tSock - > SysMessage ( 725 ) ; // Invalid post type.
2012-11-03 18:11:04 +00:00
return ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
std : : vector < UI08 > internalBuffer ;
2012-11-03 18:11:04 +00:00
const UI16 length = tSock - > GetWord ( 1 ) ;
internalBuffer . resize ( length ) ;
memcpy ( & internalBuffer [ 0 ] , tSock - > Buffer ( ) , length ) ;
2022-10-24 18:39:33 +08:00
MsgBoardPost_st msgBoardPost ;
msgBoardPost . toggle = 0x05 ;
msgBoardPost . parentSerial = repliedTo ;
2012-11-03 18:11:04 +00:00
UI08 i = 0 ;
UI16 offset = 11 ;
2022-10-24 18:39:33 +08:00
msgBoardPost . posterLen = static_cast < UI08 > ( tChar - > GetName ( ) . size ( ) ) + 1 ;
strncopy ( msgBoardPost . poster , 128 , tChar - > GetName ( ) . c_str ( ) , msgBoardPost . posterLen ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
msgBoardPost . subjectLen = internalBuffer [ + + offset ] ;
strncopy ( msgBoardPost . subject , 256 , ( const char * ) & internalBuffer [ + + offset ] , msgBoardPost . subjectLen ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
offset + = msgBoardPost . subjectLen ;
2012-11-03 18:11:04 +00:00
msgBoardPost . msgBoardLine . resize ( internalBuffer [ offset ] ) ;
2022-10-24 18:39:33 +08:00
msgBoardPost . lines = internalBuffer [ offset ] ;
std : : vector < std : : string > : : iterator lIter ;
2021-05-03 18:08:20 +08:00
UI08 j = 0 ;
2012-11-03 18:11:04 +00:00
for ( lIter = msgBoardPost . msgBoardLine . begin ( ) ; lIter ! = msgBoardPost . msgBoardLine . end ( ) ; + + lIter )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
( * lIter ) . resize ( internalBuffer [ + + offset ] ) ;
for ( i = 0 ; i < ( * lIter ) . size ( ) ; + + i )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2022-10-24 18:39:33 +08:00
( * lIter ) [ i ] = internalBuffer [ + + offset ] ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2021-05-03 18:08:20 +08:00
// Check if line is null-terminated, and null-terminate it if not
if ( msgBoardPost . msgBoardLine [ j ] [ msgBoardPost . msgBoardLine [ j ] . size ( ) ] > 0 )
{
2022-10-24 18:39:33 +08:00
auto checkForNullTerminator = msgBoardPost . msgBoardLine [ j ] [ msgBoardPost . msgBoardLine [ j ] . size ( ) - 1 ] ;
2021-05-03 18:08:20 +08:00
if ( checkForNullTerminator ! = ' \0 ' )
{
2022-10-24 18:39:33 +08:00
msgBoardPost . msgBoardLine [ j ] [ msgBoardPost . msgBoardLine [ j ] . size ( ) - 1 ] = ' \0 ' ;
2021-05-03 18:08:20 +08:00
}
}
j + + ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
const SERIAL msgId = MsgBoardWritePost ( msgBoardPost , fileName , msgType ) ;
if ( msgId ! = INVALIDSERIAL )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
CPAddItemToCont toAdd ;
if ( tSock - > ClientVerShort ( ) > = CVS_6017 )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
toAdd . UOKRFlag ( true ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2022-10-24 18:39:33 +08:00
toAdd . Serial ( ( msgId | BASEITEMSERIAL ) ) ;
toAdd . Container ( tSock - > GetDWord ( 4 ) ) ;
2012-11-03 18:11:04 +00:00
tSock - > Send ( & toAdd ) ;
// Setup buffer to expect to receive an ACK from the client for this posting
2022-10-24 18:39:33 +08:00
tSock - > PostAcked ( msgId ) ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardReadPost()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 8/10/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Reads in a post from its specified file.
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2023-08-27 21:42:47 -04:00
bool MsgBoardReadPost ( std : : istream & file , MsgBoardPost_st & msgBoardPost , SERIAL msgSerial = INVALIDSERIAL )
2012-11-03 18:11:04 +00:00
{
char buffer [ 4 ] ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Read two first bytes of post, which contains total size
2012-11-03 18:11:04 +00:00
file . read ( buffer , 2 ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
if ( file . gcount ( ) ! = 2 )
{
// Return early if we failed to read 2 bytes into buffer
return false ;
}
2022-10-24 18:39:33 +08:00
msgBoardPost . size = ( ( buffer [ 0 ] < < 8 ) + buffer [ 1 ] ) ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Seek to position of msgboardpost serial stored at end of the post, and read it into buffer
2022-10-24 18:39:33 +08:00
file . seekg ( msgBoardPost . size - 6 , std : : ios : : cur ) ;
2012-11-03 18:11:04 +00:00
file . read ( buffer , 4 ) ;
2022-10-24 18:39:33 +08:00
msgBoardPost . serial = CalcSerial ( buffer [ 0 ] , buffer [ 1 ] , buffer [ 2 ] , buffer [ 3 ] ) ;
if ( ! file . fail ( ) & & ( msgBoardPost . serial = = msgSerial | | msgSerial = = INVALIDSERIAL ) )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
char tmpLine [ 256 ] ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Seek to start of post, right after 2 bytes containing size
2022-10-24 18:39:33 +08:00
file . seekg ( - ( msgBoardPost . size - 2 ) , std : : ios : : cur ) ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Get toggle value from next byte
2012-11-03 18:11:04 +00:00
file . read ( buffer , 1 ) ;
2022-10-24 18:39:33 +08:00
msgBoardPost . toggle = buffer [ 0 ] ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Get parent serial from next 4 bytes
2012-11-03 18:11:04 +00:00
file . read ( buffer , 4 ) ;
2022-10-24 18:39:33 +08:00
msgBoardPost . parentSerial = CalcSerial ( buffer [ 0 ] , buffer [ 1 ] , buffer [ 2 ] , buffer [ 3 ] ) ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Get size of poster's name from next byte, and then get poster's name
2012-11-03 18:11:04 +00:00
file . read ( buffer , 1 ) ;
2022-10-24 18:39:33 +08:00
file . read ( msgBoardPost . poster , buffer [ 0 ] ) ;
msgBoardPost . posterLen = buffer [ 0 ] ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Get size of post's subject from next byte, and then get subject string
2012-11-03 18:11:04 +00:00
file . read ( buffer , 1 ) ;
2022-10-24 18:39:33 +08:00
file . read ( msgBoardPost . subject , buffer [ 0 ] ) ;
msgBoardPost . subjectLen = buffer [ 0 ] ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Get size of post's date string from next byte, and then get date string
2012-11-03 18:11:04 +00:00
file . read ( buffer , 1 ) ;
2022-10-24 18:39:33 +08:00
file . read ( msgBoardPost . date , buffer [ 0 ] ) ;
msgBoardPost . dateLen = buffer [ 0 ] ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Get number of lines from next byte, then read each line from post
2012-11-03 18:11:04 +00:00
file . read ( buffer , 1 ) ;
2022-10-24 18:39:33 +08:00
msgBoardPost . lines = buffer [ 0 ] ;
for ( UI08 i = 0 ; i < msgBoardPost . lines ; + + i )
2002-04-07 21:27:53 +00:00
{
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Get line length from next byte, then read line string into tmpLine
2012-11-03 18:11:04 +00:00
file . read ( buffer , 1 ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
file . read ( tmpLine , buffer [ 0 ] ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
// Stuff contents of tmpLine into msgBoardLine std::vector<std::string> in msgBoardPost struct, then add null terminator
2012-11-03 18:11:04 +00:00
msgBoardPost . msgBoardLine . push_back ( tmpLine ) ;
2022-10-24 18:39:33 +08:00
msgBoardPost . msgBoardLine [ msgBoardPost . msgBoardLine . size ( ) - 1 ] + = ' \0 ' ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
file . seekg ( 4 , std : : ios : : cur ) ;
2022-10-24 18:39:33 +08:00
if ( msgBoardPost . toggle ! = 0x00 )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
return true ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// If Toggle value has been set to 0x00 for a post, return false so it won't be included when writing posts back to file later
2012-11-03 18:11:04 +00:00
return false ;
2002-04-07 21:27:53 +00:00
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardOpenPost()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/16/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Opens a post on a message board when double clicked.
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
void MsgBoardOpenPost ( CSocket * mSock )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
std : : string fileName = GetMsgBoardFile ( mSock - > GetDWord ( 4 ) , ( mSock - > GetByte ( 8 ) - 0x40 ) ) ;
2012-11-03 18:11:04 +00:00
if ( fileName . empty ( ) )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
mSock - > SysMessage ( 732 ) ; // Post not valid, please notify GM!
2012-11-03 18:11:04 +00:00
return ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
if ( ! cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) . empty ( ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
fileName = cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) + fileName ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
MsgBoardPost_st msgBoardPost ;
2012-11-03 18:11:04 +00:00
bool foundEntry = false ;
const SERIAL msgSerial = ( mSock - > GetDWord ( 8 ) - BASEITEMSERIAL ) ;
2022-10-24 18:39:33 +08:00
std : : ifstream file ( fileName . c_str ( ) , std : : ios : : in | std : : ios : : binary ) ;
2012-11-03 18:11:04 +00:00
if ( file . is_open ( ) )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
file . seekg ( 0 , std : : ios : : beg ) ;
while ( file & & ! foundEntry )
{
2022-10-24 18:39:33 +08:00
if ( MsgBoardReadPost ( file , msgBoardPost , msgSerial ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
foundEntry = true ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
}
file . close ( ) ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
else
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2022-10-24 18:39:33 +08:00
Console . Error ( oldstrutil : : format ( " Failed to open MessageBoard file for reading MessageID: 0x%X " , msgSerial ) ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
if ( foundEntry )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
CPOpenMsgBoardPost mbPost ( mSock , msgBoardPost , true ) ;
mSock - > Send ( & mbPost ) ;
2002-04-07 21:27:53 +00:00
}
else
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2022-10-24 18:39:33 +08:00
Console . Warning ( oldstrutil : : format ( " Failed to find MessageBoard file for MessageID: 0x%X " , msgSerial ) ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardRemovePost()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/17/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Removes a post from a message board
2012-11-03 18:11:04 +00:00
//|
//| Note: The client should trigger this function, but I have
//| been unable to find a way through the client to send the
//| remove post packet.
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
void MsgBoardRemovePost ( CSocket * mSock )
{
CChar * mChar = mSock - > CurrcharObj ( ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
if ( ! ValidateObject ( mChar ) | | ( ValidateObject ( mChar ) & & ! mChar - > IsGM ( ) ) )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
mSock - > SysMessage ( 9037 ) ; // Only GMs may delete posts!
2002-04-07 21:27:53 +00:00
return ;
}
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// If the messageboard is not found, do nothing
2022-10-24 18:39:33 +08:00
CItem * msgBoard = CalcItemObjFromSer ( mSock - > GetDWord ( 4 ) ) ;
if ( ! ValidateObject ( msgBoard ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
return ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// If the messageboard filename is not returned properly, do nothing
2022-10-24 18:39:33 +08:00
std : : string fileName = GetMsgBoardFile ( msgBoard - > GetSerial ( ) , ( mSock - > GetByte ( 8 ) - 0x40 ) ) ;
2012-11-03 18:11:04 +00:00
if ( fileName . empty ( ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
return ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// If the folder storing messageboard files exists, construct a path for the filename
2012-11-03 18:11:04 +00:00
if ( ! cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) . empty ( ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
fileName = cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) + fileName ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
bool foundPost = false ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Fetch the serial of the messageboard post in need of removal
2022-10-24 18:39:33 +08:00
const SERIAL msgSer = ( mSock - > GetDWord ( 8 ) - BASEITEMSERIAL ) ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Let's grab the size of the file so we can use it later
2021-06-03 14:22:50 +08:00
std : : size_t fileSize = 0 ;
2022-10-24 18:39:33 +08:00
try
{
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
fileSize = std : : filesystem : : file_size ( fileName ) ;
2022-10-24 18:39:33 +08:00
}
catch ( . . . )
{
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
fileSize = 0 ;
}
// If file size is zero, not much point in continuing!
if ( fileSize = = 0 )
{
if ( ValidateObject ( mChar ) )
{
2022-10-24 18:39:33 +08:00
mSock - > SysMessage ( 9038 ) ; // Failed to remove post; file size not found! Check server log for more details.
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2022-10-24 18:39:33 +08:00
Console . Error ( oldstrutil : : format ( " Could not fetch file size for file %s " , fileName . c_str ( ) ) ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
return ;
}
// Open a filestream in binary mode to read in data from the messageboard file
2012-11-03 18:11:04 +00:00
std : : fstream file ( fileName . c_str ( ) , std : : ios : : in | std : : ios : : out | std : : ios : : binary ) ;
if ( file . is_open ( ) )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
SERIAL tmpSerial = 0 ;
size_t totalSize = 0 ;
UI16 tmpSize = 0 ;
char rBuffer [ 4 ] ;
bool removeReply = true ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
2012-11-03 18:11:04 +00:00
while ( ! file . eof ( ) )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
removeReply = false ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Read first 2 characters from filestream into rBuffer, starting from first line in file
2012-11-03 18:11:04 +00:00
file . read ( rBuffer , 2 ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Shift first byte up eight bytes, add to second byte
2022-10-24 18:39:33 +08:00
tmpSize = ( ( rBuffer [ 0 ] < < 8 ) + rBuffer [ 1 ] ) ;
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Move stream's "get" position relative to current position
2012-11-03 18:11:04 +00:00
file . seekg ( 1 , std : : ios : : cur ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Read the next 4 characters from filestream into rBuffer, and use this to attempt calculating post serial
2012-11-03 18:11:04 +00:00
file . read ( rBuffer , 4 ) ;
2022-10-24 18:39:33 +08:00
tmpSerial = CalcSerial ( rBuffer [ 0 ] , rBuffer [ 1 ] , rBuffer [ 2 ] , rBuffer [ 3 ] ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// If the serial matches the serial of post to be removed, prepare to check for
// any replies to the post/thread as well, which will also need to be removed
if ( tmpSerial = = msgSer )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
removeReply = true ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Move stream's "set" position to the start of the post in question, and overwrite first 2 bytes with 0x00 to mark it for deletion
// This will hide it from view, but not actually delete it from the file itself; that's handled by message board maintenance
2022-10-24 18:39:33 +08:00
file . seekp ( totalSize + 2 , std : : ios : : beg ) ;
2012-11-03 18:11:04 +00:00
file . put ( 0x00 ) ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// If looking for replies to remove, or we haven't found the post to remove yet
2012-11-03 18:11:04 +00:00
if ( removeReply | | ! foundPost )
2002-04-07 21:27:53 +00:00
{
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Move stream's "get" position relative to current position, to... what? Look for a reply?
2022-10-24 18:39:33 +08:00
file . seekg ( tmpSize - 11 , std : : ios : : cur ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Read another serial candidate into the buffer, and try to calculate post serial from buffer
2012-11-03 18:11:04 +00:00
file . read ( rBuffer , 4 ) ;
2022-10-24 18:39:33 +08:00
tmpSerial = CalcSerial ( rBuffer [ 0 ] , rBuffer [ 1 ] , rBuffer [ 2 ] , rBuffer [ 3 ] ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
2012-11-03 18:11:04 +00:00
if ( removeReply )
2002-04-07 21:27:53 +00:00
{
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Send packet to remove item (each post is an item in a container - the container being the message board) visually from message board
2012-11-03 18:11:04 +00:00
CPRemoveItem toRemove ;
2022-10-24 18:39:33 +08:00
toRemove . Serial ( ( tmpSerial + BASEITEMSERIAL ) ) ;
2012-11-03 18:11:04 +00:00
mSock - > Send ( & toRemove ) ;
2002-04-07 21:27:53 +00:00
}
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
else if ( tmpSerial = = msgSer )
2002-04-07 21:27:53 +00:00
{
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Mark post as found, but don't break out of the loop, in order to get all replies
2012-11-03 18:11:04 +00:00
foundPost = true ;
2002-04-07 21:27:53 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Move stream's "set" position to the start of the post in question, and overwrite first 2 bytes with 0x00 to mark it for deletion
// This will hide it from view, but not actually delete it from the file itself; that's handled by message board maintenance
2022-10-24 18:39:33 +08:00
file . seekp ( totalSize + 2 , std : : ios : : beg ) ;
2012-11-03 18:11:04 +00:00
file . put ( 0x00 ) ;
2002-04-07 21:27:53 +00:00
2022-10-24 18:39:33 +08:00
mSock - > SysMessage ( 734 ) ; // Post removed.
2012-11-03 18:11:04 +00:00
}
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Make sure we don't get stuck in an infinite loop... don't allow seeking past the end of the file!
2012-11-03 18:11:04 +00:00
totalSize + = tmpSize ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
if ( totalSize < fileSize )
{
file . seekg ( totalSize , std : : ios : : beg ) ;
}
else
{
break ;
}
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
file . close ( ) ;
2002-04-07 21:27:53 +00:00
}
else
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2022-10-24 18:39:33 +08:00
Console . Error ( oldstrutil : : format ( " Could not open file %s for reading " , fileName . c_str ( ) ) ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// If we found the post to remove previously, remove it at this point, since all potential replies to it have been removed already
2012-11-03 18:11:04 +00:00
if ( foundPost )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
CPRemoveItem toRemove ;
2022-10-24 18:39:33 +08:00
toRemove . Serial ( mSock - > GetDWord ( 8 ) ) ;
2012-11-03 18:11:04 +00:00
mSock - > Send ( & toRemove ) ;
2002-04-07 21:27:53 +00:00
}
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - CPIMsgBoardEvent::Handle()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/22/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Handles a mesage board event from the client.
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
bool CPIMsgBoardEvent : : Handle ( void )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
UI08 msgType = tSock - > GetByte ( 3 ) ;
if ( tSock - > GetByte ( 0 ) = = 0x06 )
2022-10-24 18:39:33 +08:00
{
2002-04-07 21:27:53 +00:00
msgType = 0 ;
2022-10-24 18:39:33 +08:00
}
2012-11-03 18:11:04 +00:00
2002-04-07 21:27:53 +00:00
switch ( msgType )
{
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
case 0 : MsgBoardOpen ( tSock ) ; break ;
case 3 : MsgBoardOpenPost ( tSock ) ; break ;
case 4 :
tSock - > PostAckCount ( tSock - > PostAckCount ( ) + 1 ) ;
if ( tSock - > PostAckCount ( ) ! = tSock - > PostCount ( ) )
return true ;
tSock - > PostAckCount ( 0 ) ;
MsgBoardList ( tSock ) ;
break ;
case 5 : MsgBoardPost ( tSock ) ; break ;
case 6 : MsgBoardRemovePost ( tSock ) ; break ;
default : break ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
return true ;
2002-04-07 21:27:53 +00:00
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardPostQuest()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/23/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Creates an escort quest post on regional messageboards
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
auto MsgBoardPostQuest ( CChar * mNPC , const QuestTypes questType ) - > bool
{
MsgBoardPost_st msgBoardPost ;
2021-04-27 00:26:38 +08:00
std : : string sect , tag , data ;
2022-06-09 08:02:49 -04:00
auto fileName = " region " s + oldstrutil : : number ( mNPC - > GetQuestOrigRegion ( ) ) + " .bbf " s ;
2022-10-24 18:39:33 +08:00
CScriptSection * EscortData = nullptr , * Escort = nullptr ;
2022-06-09 08:02:49 -04:00
size_t totalEntries = 0 ;
std : : string tmpSubject = " " ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
switch ( questType )
{
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
case QT_ESCORTQUEST :
2022-10-24 18:39:33 +08:00
msgBoardPost . toggle = QT_ESCORTQUEST ;
tmpSubject = Dictionary - > GetEntry ( 735 ) ; // Escort: Needed!
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
Escort = FileLookup - > FindEntry ( " ESCORTS " , msgboard_def ) ;
2022-10-24 18:39:33 +08:00
if ( Escort = = nullptr )
{
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
return false ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
totalEntries = Escort - > NumEntries ( ) ;
2022-10-24 18:39:33 +08:00
if ( totalEntries = = 0 )
{
Console . Error ( " MsgBoardPostQuest() No msgboard dfn entries found " ) ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
return false ;
2012-11-03 18:11:04 +00:00
}
2022-10-24 18:39:33 +08:00
Escort - > MoveTo ( RandomNum ( static_cast < size_t > ( 0 ) , totalEntries - 1 ) ) ;
2022-06-09 08:02:49 -04:00
sect = " ESCORT " s + Escort - > GrabData ( ) ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
EscortData = FileLookup - > FindEntry ( sect , msgboard_def ) ;
2022-10-24 18:39:33 +08:00
if ( EscortData = = nullptr )
{
Console . Error ( oldstrutil : : format ( " MsgBoardPostQuest() Couldn't find entry %s " , sect . c_str ( ) ) ) ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
return false ;
2012-11-03 18:11:04 +00:00
}
2022-10-24 18:39:33 +08:00
for ( const auto & sec : EscortData - > collection ( ) )
{
tag = sec - > tag ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
std : : string fullLine = tag ;
size_t position = fullLine . find ( " %n " ) ;
2022-10-24 18:39:33 +08:00
while ( position ! = std : : string : : npos )
{
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
fullLine . replace ( position , 2 , mNPC - > GetName ( ) ) ;
position = fullLine . find ( " %n " ) ;
}
position = fullLine . find ( " %l " ) ;
2022-10-24 18:39:33 +08:00
while ( position ! = std : : string : : npos )
{
fullLine . replace ( position , 2 , oldstrutil : : format ( " %d %d " , mNPC - > GetX ( ) , mNPC - > GetY ( ) ) ) ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
position = fullLine . find ( " %l " ) ;
}
2012-11-03 18:11:04 +00:00
position = fullLine . find ( " %t " ) ;
2022-10-24 18:39:33 +08:00
while ( position ! = std : : string : : npos )
{
std : : string mNPCTitle = GetNpcDictTitle ( mNPC ) ;
0.99.4v
Added JS command to reload dictionaries
'reloaddictionaries
Fixed a server crash related to casting of spells
Fixed some issues with Line-of-Sight checks related to items under/above ground, LoS checks between different floors of buildings, etc.
Updated handling of skill-training keywords to be based on language-independent keyword IDs rather than trying to match player-input text to specific skill-names
Updated animal-trainer/stablemasterscript (js/npc/ai/stablemaster.js) with several changes:
Fixed an issue where the same pet would be stabled in all available slots if payment was taken from player's bank account instead of their backpack
Fixed an issue where stablemaster would not pause walking for a while when a player interacts with them
Converted all system messages and text messages in stablemaster script to dictionary entries
Added new NPC AI type to source - AI_STABLEMASTER (9) - and assigned this to animal trainers. This is used to identify this type of NPCs for the purpose of displaying relevant context menus
Reworked banker AI script (js/npc/ai/banker.js) to use triggerwords from client instead of hard-defined strings, to work better with multiple languages (and work with all relevant triggerwords)
Fixed a bug with banker AI script (js/npc/ai/banker.js) that prevented players from using the "withdraw" command
Re-added NPC AI 8 to banker NPCs (dfndata/npc/male_vendors.dfn and female_vendors.dfn) so code can check for presence of this AI when handling context menus
Removed remaining hard-coded banking functionality - all handled by script anyway
Added new context menu option for NPC bankers - Open Bankbox
Updated code handling of context menus to only show context menus when relevant:
Open Paperdoll - Shows for all characters with a paperdoll
Open Backpack - Shows for player's character, pack animals and hirelings
Open Bankbox - Shows for banker NPCs (if within 8 tiles)
Buy/Sell - Shows for vendor NPCs (if within 8 tiles, and if they have anything for sale/are buying anything)
Added new context menu entries for pets, which can be used if player is within 12 tiles of pet:
Command: Kill
Command: Stop
Command: Follow
Command: Stay
Command: Guard
Add Friend
Remove Friend
Transfer
Release
Added new context menu entries for stablemasters/animal trainers:
Claim All Pets
Stable Pet
Added new context menu entries for Escort Quest NPCs
Ask Destination (if within 3 tiles)
Accept Escort (if within 3 tiles)
Abandon Escort
Added new context menus for NPCs that can teach skills to players (limited to max 10 per NPC)
Train [skillName]
Added new AI script for NPC hirelings (3204=js/npc/ai/hireling.js), who can be hired to follow the player around for a limited amount of time, and function the same way as pets. In addition to the regular pet commands, these speech commands are supported:
hire // The hireling will respond with the cost to hire them
dismiss // Replaces the "release" command for pets; will dismiss the hireling
patrol // The hireling will patrol between it's current location and a second targeted location nearby
move // The hireling will try to shuffle out of the way
fetch // The hireling will try to fetch a targeted item
drop // The hireling will drop to the ground all loot they're currently carrying
report // The hireling will report on the remaining time they're hired for
Added new NPC DFN tag used by code to detect hireling NPCs for the purpose of displaying context menus:
HIRELING // No additional value/data needed for tag
Added new context menu entries for Hireling NPCs, in addition to the ones for regular pets:
Hire // Can be used within 3 steps of the hireling, who will respond with cost to hire them
Dismiss // Replaces the "release" command for pets, will dismiss the hireling
Added HIRELING tag and SCRIPT=3204 to and updated stats of various NPCs that will be hireable:
m_fighter, f_fighter, m_beggar, f_beggar, m_peasant, f_peasant, m_sailor, f_sailor, m_pirate, f_pirate
Added new hireling NPC:
m_paladin, f_paladin
Added new UOX ini setting to enable/disable context menus
CONTEXTMENUS=1/0 (defaults to 1)
Added new Item JS Method to check if an item's ID is on a specified food list
.IsOnFoodList( foodList ) // Returns true/false if item's ID is on specified foodList
Added new OMNIVORE food list and assigned it to [basehuman] DFN section
Added new Character JS Properties
.isGuarded // Gets/Sets whether character is guarded by a pet/hireling
.guarding // Gets/Sets the object (if any) being guarded by a pet/hireling
Fixed multiple issues with health bars, flagging and character highlighting
Added some crash protection for invalid data used with CUSTOMINTTAG and CUSTOMSTRINGTAG DFN tags for Items, NPCs and Multis
Fixed an issue which prevented hard-coded checks from running when using items
Added new global js object (Timer) to make the use of character timers in JS more robust, with properties matching timer names from enum in source.
Properties:
.TIMEOUT // Time until next attack can be done in combat
.INVIS // Time until invisible character becomes visible
.HUNGER // Time until character grows more hungry
.THIRST // Time until character grows more thirsty
.POISONTIME // Time until next tick of poison damage
.POISONTEXT // Time until next message about suffering from poison
.POISONWEAROFF // Time until poison wears off
.SPELLTIME // Time until spell cast is completed. Can be set to 0 to interrupt
.ANTISPAM // Time until next speech message can be sent (for anti spam purposes)
.CRIMFLAG // Time until criminal flag runs out
.MURDERRATE // Time until next murder count decay
.PEACETIMER // Time until character can re-enter combat after being affected by peacemaking
.FLYINGTOGGLE // Time until next time flying ability can be toggled for gargoyles
.MOVETIME // Time until NPC can move again
.SPATIMER // Time until next time NPC can cast a spell
.SUMMONTIME // Time until a summoned NPC will vanish
.EVADETIME // Time until an NPC will exit evade state
.LOGOUT // Time it takes for a player char to vanish after logout
Examples of use:
var hungerTimer = myChar.GetTimer( Timer.HUNGER )
myChar.SetTimer( Timer.HUNGER, 15000 )
Added new Character JS Methods to add, remove and list friends of a pet/hireling:
.AddFriend( playerToAdd ) // Adds player to friend list
.RemoveFriend( playerToRemove ) // Removes player from friend list
.GetFriendList() // Gets list of friends
.ClearFriendList() // Clears list of friends
Added new Character JS Method to fetch a player character's list of pets/followers
.GetPetList() // Gets list of pets/followers
Added new persistent NPC property to keep track of a pet's previous owners, whether those tamed the pet or had it transferred to them. Every time a pet is tamed, or is transferred to a new owner, this list is updated:
GenericList< CChar * > petOwnerList
Added new Character JS Method to check if a player is on a pet's owner list as a previous owner:
.HasBeenOwner( mChar )
Previous owners of a pet can re-tame it with guaranteed chance of success
Updated JS Method Refresh() to be usable with both items or characters, to send updated state of object to nearby players
Added character tooltip [Guarded] for characters being guarded by a pet/hireling
Pets/hirelings that are transferred will now immediately start following their new master instead of wandering freely
Pets/hirelings can no longer be transferred between players as long as either party is flagged as a criminal
Pets/hirelings can no longer be transferred to dead players
Pets/hirelings can no longer be transferred to NPCs
Summoned creatures can no longer be transferred to other players
Summoned creatures can no longer have friends
Friend lists of pets/hirelings are now cleared when the pet/hireling is transferred to another player
Added new UOX.INI settings to control how many pets players can have active:
MAXCONTROLSLOTS=0 // Maximum number of pet control slots available to player. Disabled if 0
MAXFOLLOWERS=5 // Maximum pets/followers a player can have active at the same time. Used if control slots are disabled
MAXPETOWNERS=5 // Maximum number of different owners a pet can have over its lifetime before it becomes impossible to retame
Added new NPC property and NPC DFN tag that keeps track of how many pet control slots an NPC would take up if owned by a player:
UI08 controlSlots // source property
CONTROLSLOTS=# // DFN tag
Added new Character JS properties:
.ownerCount // Get the total number of owners a pet/hireling has had, based on NPC's petOwnerList
.controlSlots // Get/Set number of pet control slots an NPC will occupy
.controlSlotsUsed // Get/Set the number of control slots used by a player
Updated get (js/commands/targeting/get.js) and set (js/commands/targeting/set.js) commands to support getting/setting the following character properties:
deaths
ownerCount (read only)
controlSlots
controlSlotsUsed
Updated NPC DFNs with default CONTROLSLOT=# tags
Increased the max distance from player that onSpeech JS event will trigger from 7 to 12
Updated how "all attack" and "all follow" commands for pets are handled. Now loops through all pets owned by character and executes command for each eligible pet
Fixed an issue where NPCs could follow characters in different worlds/instances than them selves
Updated default max amount of items that can be sold to NPC vendors from 5 to 250
Guards can no longer train players in skills
Updated equipment itemlists (dfndata/items/itemlists/itemlists.dfn) with blank entries to introduce some more variety in the type of clothes NPCs wear in general
Added new NPCs to DFNs (dfndata/npc/undead.dfn) and added them to undead npclist:
[skeletalmage] // variation of [bonemage]
[skeletalknight] // variation of [boneknight]
Updated Titles (dfndata/titles/titles.dfn) with up-to-date titles for skills around Pub 15, and added titles for skills added after that. Also added "Elder" and "Legendary" titles for 110 and 120 skillpoints
Updated EQUIPITEM tag in newbie.dfn (dfndata/newbie/newbie.dfn) to support an optional hue parameter (EQUIPITEM=id,hue)
Updated starting equipment for new characters (dfndata/newbie/newbie.dfn), with commented out practice weapons. Uncomment to use
Added item definitions for practice weapons (dfndata/items/gear/weapons/practice_weapons.dfn):
practice_skinning_knife
practice_hatchet
practice_axe
practice_mace
practice_longsword
practice_spear
practice_bow
practice_club
practice_crook
practice_gnarled_staff
Updated mount statues DFN (dfndata/items/misc/mount-statues.dfn) and JS (js/npc/pets/*.js) files to include pet control slot related stuff
Pets now inherit the karma of their owners, but revert to their original karma upon release
Pets and hirelings will no longer follow the ghosts of their dead owners, but stay to guard their corpse
Added optional 9th parameter for JS Function CreateDFNItem to specify a color for item created. This comes before the other optional parameters - worldNumber and instanceID (which are only used if character is NULL):
CreateDFNItem( mSock, mChar, sectionName, inPack, iAmount, itemType, iColor, worldNumber, instanceID )
Added ID of Giant Beetle to various pack animal checks
Pack animals will now drop any newbie/blessed items stored in their packs upon death
Added new NPC properties to track pet loyalty, and exposed these as Character JS properties, and NPC DFN tags:
JS Properties
.maxLoyalty // Defaults to 100
.loyalty // Starts at 25
DFN Tags
MAXLOYALTY=# // Defaults to 100
LOYALTY=# // Starts at 25
Updated TriggerEvent JS function to support return values (int, bool, string, object) from called script
Updated various JS scripts to make use of new TriggerEvent functionality and reduce reliance on custom tags:
js/item/archerybutte.js
js/item/trainingdummy.js
js/server/data/combatanims.js
js/server/data/weapontypes.js
Updated archerybutte script to use dictionary for system and text messages
Updated archerybutte script to support increased range, distance penalty and dex/str bonuses when calculating score
Added new UOX.INI settings under [pets and hirelings] section related to pet control and loyalty:
CHECKPETCONTROLDIFFICULTY=1 // Enable/Disable pet control difficulty system
PETLOYALTYGAINONSUCCESS=1 // Amount of pet loyalty gained on successful pet command use
PETLOYALTYLOSSONFAILURE=3 // Amount of pet loyalty lost on failed pet command use
PETLOYALTYRATE=900 // Amount of seconds between each time pet loyalty is automatically reduced by 1. Takes 25 hours to deplete completely from max
Added new persistent NPC property that keeps track of the difficulty of taming and controlling a pet, and exposed it as a Character JS property:
.orneriness
Every time a tamed pet is released or goes wild, its "orneriness" increases, making it more difficult for other players to tame, and more difficult for anyone to control.
Updated CBasePetResponse::canControlPet() function to use pet control difficulty system if enabled, which checks player's animal taming/animal lore skill vs a pet's "orneriness" to determine chance of pet accepting a given pet command
On successful use of pet command, increases pet loyalty by value defined in PETLOYALTYGAINONSUCCESS ini setting
On failed use of pet command, decreases pet loyalty by value defined in PETLOYALTYLOSSONFAILURE ini setting
Added new Character JS Method to calculate chance of a player successfully controlling the pet:
.CalculateControlChance( mChar ) // Returns value between 0 and 1000 indicating chance of success
Feeding a pet will now restore its loyalty to maximum
Pets will now lose loyalty on hunger checks when at maximum hunger
Pets that are maximum hungry will now only have a chance to go wild if loyalty has dropped to zero
Added new DFN tag for creatures.dfn - TYPE - which contains a string describing the type of creature
Added secure pet trading. Players who trade pets will now see a pet transfer deed appear in a secure trade window with the name and type of creature, and upon completion of the trade the associated pet will be instantly transferred to the other player
Updated resource JS scripts (js/server/resource/*) to use dictionaries for all system messages
Updated skill JS scripts (js/skill/*) to use dictionaries for all system messages
Updated housing JS scripts (js/server/house/*) to use dictionaries for all system messages
Updated item JS scripts (js/item/*) to use dictionaries for all system messages
Updated magic JS scripts (js/magic/*) to use dictionaries for all system messages
Updated NPC AI JS scripts (js/npc/ai/*) to use dictionaries for all system messages
Updated command JS scripts (js/commands/*) to use dictionaries for all system messages, gump tooltips, etc
Updated code to use dictionaries for all system messages
Fixed incorrect spelling for UOX.INI setting HIDEW(H)ILEMOUNTED and updated hiding skill (js/skill/hiding.js) to actually allow/disallow hiding while mounted based on this setting
Added new Character JS Method to make it easier to make one NPC initiate combat with another:
.InitiateCombat( targetChar ) // Character attempts to initiate combat with target character
Updated parrying portion of combat code to be in line with Pub15/pre-AoS parrying mechanics. High AR shields now absorb more damage on a successful parry, while low AR shields have a higher chance of parrying. Shields are also now more effective against archery attacks (full absorption potential) than melee attacks (half absorption potential).
Updated combat damage calculations to be in line with Pub15/pre-AoS damage calculations
Adjusted default value of COMBATNPCDAMAGERATE ini setting (damage divisor when target is a player) from 2 to 1 to account for these changes.
Removed dictionary.UNK, and made dictionary.ZRO the default dictionary used for all unsupported languages
Added dictionary support for additional languages: Portuguese, Italian, Czech
Updated default dictionaries for the following languages: English, French
Added default dictionaries for the following languages: German, Spanish, Portuguese, Italian, Czech (note that translations have been provided by automatic services and will contain inaccuracies!)
Added new UOX.INI setting to allow specifying a default dictionary language for server, which if set will force that language for all dictionary messages, regardless of client settings:
SERVERLANGUAGE=0 // Set default server dictionary language. Supported languages: 0 - None/language used by each client, 1 - English, 2 - German, 3 - Spanish, 5 - French, 6 - Portuguese, 7 - Italian, 8 - Czech
Added new function in combat.cpp - AdjustArmorClassDamage() - which adjusts the damage dealt in combat based on whether armour class (AC DFN tag or .ac JS property) of weapon and armour equipped on hit location of target match up. A weapon with armour class 1 would essentially be doubly effective against armour of armour class 1. Allows setting up things like piercing weapons being better against some armor types than mace weapons, etc.
Added new UOX.INI setting under [combat] to enable/disable double damage from armour class bonuses:
ARMORCLASSDAMAGEBONUS=0/1 //defaults to 0)
2021-07-28 16:02:56 +08:00
fullLine . replace ( position , 2 , mNPCTitle ) ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
position = fullLine . find ( " %t " ) ;
}
2012-11-03 18:11:04 +00:00
position = fullLine . find ( " %r " ) ;
2022-10-24 18:39:33 +08:00
while ( position ! = std : : string : : npos )
{
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
fullLine . replace ( position , 2 , cwmWorldState - > townRegions [ mNPC - > GetQuestDestRegion ( ) ] - > GetName ( ) ) ;
position = fullLine . find ( " %r " ) ;
}
2012-11-03 18:11:04 +00:00
position = fullLine . find ( " %R " ) ;
2022-10-24 18:39:33 +08:00
while ( position ! = std : : string : : npos )
{
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
fullLine . replace ( position , 2 , mNPC - > GetRegion ( ) - > GetName ( ) ) ;
position = fullLine . find ( " %R " ) ;
}
2012-11-03 18:11:04 +00:00
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
fullLine . resize ( fullLine . size ( ) + 1 ) ;
msgBoardPost . msgBoardLine . push_back ( fullLine ) ;
}
break ;
case QT_BOUNTYQUEST :
2022-10-24 18:39:33 +08:00
tmpSubject = Dictionary - > GetEntry ( 736 ) ; // Bounty: Reward!
msgBoardPost . toggle = QT_BOUNTYQUEST ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
break ;
case QT_ITEMQUEST :
2022-10-24 18:39:33 +08:00
tmpSubject = Dictionary - > GetEntry ( 737 ) ; // Lost valuable item.
msgBoardPost . toggle = QT_ITEMQUEST ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
break ;
default :
2022-10-24 18:39:33 +08:00
Console . Error ( oldstrutil : : format ( " MsgBoardPostQuest() Invalid questType %d " , questType ) ) ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
return false ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
msgBoardPost . lines = static_cast < UI08 > ( msgBoardPost . msgBoardLine . size ( ) ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
msgBoardPost . subjectLen = static_cast < UI08 > ( tmpSubject . size ( ) + 1 ) ;
strncopy ( msgBoardPost . subject , 256 , tmpSubject . c_str ( ) , tmpSubject . size ( ) ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
msgBoardPost . posterLen = static_cast < UI08 > ( mNPC - > GetName ( ) . size ( ) + 1 ) ;
strncopy ( msgBoardPost . poster , 128 , mNPC - > GetName ( ) . c_str ( ) , mNPC - > GetName ( ) . size ( ) ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
msgBoardPost . parentSerial = mNPC - > GetSerial ( ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
if ( MsgBoardWritePost ( msgBoardPost , fileName , PT_REGIONAL ) ! = INVALIDSERIAL )
{
2012-11-03 18:11:04 +00:00
return true ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2002-04-07 21:27:53 +00:00
return false ;
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardQuestEscortCreate()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/23/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Creates an escort quest assigning it a valid escort region
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
void MsgBoardQuestEscortCreate ( CChar * mNPC )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
const UI16 npcRegion = mNPC - > GetRegionNum ( ) ;
UOX3 0.99.6-RC3
Updated Item DFNs with ORIGIN and SECTIONID tags for relevant items
Added JS Function to make comparing eras (based on object origin or server settings) easier:
EraStringToNum( eraString ) // Takes an era string (uo, t2a, uor, td, lbr, aos, etc) and returns an int
Updated some JS scripts to use EraStringToNum() for era comparisons (potionkeg.js)
Default CORESHARDERA setting is now LBR
Removed PUB15 as a separate "era" - it's identical to late stage LBR anyway:
Removed support for GETPUB15 tag
Added support for GETUO tag for items/NPCs:
GETUO=<sectionID> // Inherit DFN section if core shard era is Ultima Online (original release, before T2A)
Rewrote portions of MsgBoardQuestEscortCreate() function in msgboard.cpp to ensure only escort regions within same world as NPC can be selected as destinations
Increased maximum number of possible escort regions that can exist from 255 to 65535
Added region definitions for all shrines in Britannia (Fel & Trammel), and marked them as valid destinations for NPC escorts (uox3/regions/regions.dfn)
Moved bankers from vendor to human DFN files, and made them inherit basehuman instead of basevendor - since they are not vendors
To address an issue with escorted NPCs not timing out and vanishing if they are left in a "dormant" area of the world with no player activity, the NPCs are marked as "always awake" the moment they arrive at their destination. Note that the uox.ini setting ALLOWAWAKENPCS needs to be enabled for this to work.
Fixed an issue where spawnsection of spawners did not show up correctly in tweak menu
Fixed an issue where the generic Orc AI script didn't have a return true at end of onDamage() event, which prevented all orcs from taking damage in combat (js/npc/ai/monster/orc.js)
Moved Anatomy skill-check in healing script (js/skill/healing.js) from onCallback1() function to onTimer() to prevent the skill-check from being spammable
Added mount ID for Frost Mite in creatures.dfn, allowing it to be used as mount
Exposed the following character properties to JS engine, which can be used to view/adjust the permanent hair/beard options for a character:
.hairStyle
.hairColour
.beardStyle
.beardColour
Updated 'kill hair, 'shavehair, 'shavebeard and 'remove commands to clear permanent hair/beard colour and style properties in addition to removing the item itself
Added a GM override to let GMs place as many houses as they want (js/server/house/houseDeed.js)
Fixed an issue where attempting to sell items to NPC shopkeepers could result in client crashing
Added a new JS Event:
onMultiLogout( iMulti, cPlayer ) // Handles players logging out while inside multis
Updated house script (js/server/house/house.js) with onMultiLogout event, which allows owners (always) and co-owners/friends/guests (if option enabled in uox.ini) to safely log out inside the house (without getting booted).
Added a "keyless" option for interacting with locked doors (js/item/doors.js) of player-owned houses, which lets owners/co-owners/friends/guests of a house use locked doors in the house without requiring a key in their backpack, if the options for that are enabled in UOX.INI. Enabled for owners/co-owners and friends by default (but not for guests)
Note that if option to safely log out is enabled, but keyless option is NOT enabled, then the server will check if the player has a key to the house in their backpack, and eject them from the house upon logging out if not. This is to make sure players don't get stuck inside a house they can't get out of because they lack the rights to open doors etc.
Added new UOX.INI options, under the [houses] section:
SAFECOOWNERLOGOUT=1 // Allow co-owners to safely and instantly log out inside house
SAFEFRIENDLOGOUT=1 // Allow friends to safely and instantly log out inside house
SAFEGUESTLOGOUT=1 // Allow guests to safely and instantly log out inside house
KEYLESSOWNERACCESS=1 // Allow owner of house to use locked doors in house without key in pack
KEYLESSCOOWNERACCESS=1 // Allow co-owners of house to use locked doors in house without key in pack
KEYLESSFRIENDACCESS=1 // Allow friends of house to use locked doors in house without key in pack
KEYLESSGUESTACCESS=0 // Allow guests of house to use locked doors in house without key in pack
Fixed NOHAIR tag from races.dfn not being loaded correctly
2023-03-04 22:50:55 +08:00
// Loop through all escort regions in the server and pick out all the ones in the same world as NPC
std : : vector < UI16 > regionCandidates ;
for ( const auto escortRegion : cwmWorldState - > escortRegions )
2002-04-07 21:27:53 +00:00
{
UOX3 0.99.6-RC3
Updated Item DFNs with ORIGIN and SECTIONID tags for relevant items
Added JS Function to make comparing eras (based on object origin or server settings) easier:
EraStringToNum( eraString ) // Takes an era string (uo, t2a, uor, td, lbr, aos, etc) and returns an int
Updated some JS scripts to use EraStringToNum() for era comparisons (potionkeg.js)
Default CORESHARDERA setting is now LBR
Removed PUB15 as a separate "era" - it's identical to late stage LBR anyway:
Removed support for GETPUB15 tag
Added support for GETUO tag for items/NPCs:
GETUO=<sectionID> // Inherit DFN section if core shard era is Ultima Online (original release, before T2A)
Rewrote portions of MsgBoardQuestEscortCreate() function in msgboard.cpp to ensure only escort regions within same world as NPC can be selected as destinations
Increased maximum number of possible escort regions that can exist from 255 to 65535
Added region definitions for all shrines in Britannia (Fel & Trammel), and marked them as valid destinations for NPC escorts (uox3/regions/regions.dfn)
Moved bankers from vendor to human DFN files, and made them inherit basehuman instead of basevendor - since they are not vendors
To address an issue with escorted NPCs not timing out and vanishing if they are left in a "dormant" area of the world with no player activity, the NPCs are marked as "always awake" the moment they arrive at their destination. Note that the uox.ini setting ALLOWAWAKENPCS needs to be enabled for this to work.
Fixed an issue where spawnsection of spawners did not show up correctly in tweak menu
Fixed an issue where the generic Orc AI script didn't have a return true at end of onDamage() event, which prevented all orcs from taking damage in combat (js/npc/ai/monster/orc.js)
Moved Anatomy skill-check in healing script (js/skill/healing.js) from onCallback1() function to onTimer() to prevent the skill-check from being spammable
Added mount ID for Frost Mite in creatures.dfn, allowing it to be used as mount
Exposed the following character properties to JS engine, which can be used to view/adjust the permanent hair/beard options for a character:
.hairStyle
.hairColour
.beardStyle
.beardColour
Updated 'kill hair, 'shavehair, 'shavebeard and 'remove commands to clear permanent hair/beard colour and style properties in addition to removing the item itself
Added a GM override to let GMs place as many houses as they want (js/server/house/houseDeed.js)
Fixed an issue where attempting to sell items to NPC shopkeepers could result in client crashing
Added a new JS Event:
onMultiLogout( iMulti, cPlayer ) // Handles players logging out while inside multis
Updated house script (js/server/house/house.js) with onMultiLogout event, which allows owners (always) and co-owners/friends/guests (if option enabled in uox.ini) to safely log out inside the house (without getting booted).
Added a "keyless" option for interacting with locked doors (js/item/doors.js) of player-owned houses, which lets owners/co-owners/friends/guests of a house use locked doors in the house without requiring a key in their backpack, if the options for that are enabled in UOX.INI. Enabled for owners/co-owners and friends by default (but not for guests)
Note that if option to safely log out is enabled, but keyless option is NOT enabled, then the server will check if the player has a key to the house in their backpack, and eject them from the house upon logging out if not. This is to make sure players don't get stuck inside a house they can't get out of because they lack the rights to open doors etc.
Added new UOX.INI options, under the [houses] section:
SAFECOOWNERLOGOUT=1 // Allow co-owners to safely and instantly log out inside house
SAFEFRIENDLOGOUT=1 // Allow friends to safely and instantly log out inside house
SAFEGUESTLOGOUT=1 // Allow guests to safely and instantly log out inside house
KEYLESSOWNERACCESS=1 // Allow owner of house to use locked doors in house without key in pack
KEYLESSCOOWNERACCESS=1 // Allow co-owners of house to use locked doors in house without key in pack
KEYLESSFRIENDACCESS=1 // Allow friends of house to use locked doors in house without key in pack
KEYLESSGUESTACCESS=0 // Allow guests of house to use locked doors in house without key in pack
Fixed NOHAIR tag from races.dfn not being loaded correctly
2023-03-04 22:50:55 +08:00
if ( escortRegion ! = npcRegion )
2022-10-24 18:39:33 +08:00
{
UOX3 0.99.6-RC3
Updated Item DFNs with ORIGIN and SECTIONID tags for relevant items
Added JS Function to make comparing eras (based on object origin or server settings) easier:
EraStringToNum( eraString ) // Takes an era string (uo, t2a, uor, td, lbr, aos, etc) and returns an int
Updated some JS scripts to use EraStringToNum() for era comparisons (potionkeg.js)
Default CORESHARDERA setting is now LBR
Removed PUB15 as a separate "era" - it's identical to late stage LBR anyway:
Removed support for GETPUB15 tag
Added support for GETUO tag for items/NPCs:
GETUO=<sectionID> // Inherit DFN section if core shard era is Ultima Online (original release, before T2A)
Rewrote portions of MsgBoardQuestEscortCreate() function in msgboard.cpp to ensure only escort regions within same world as NPC can be selected as destinations
Increased maximum number of possible escort regions that can exist from 255 to 65535
Added region definitions for all shrines in Britannia (Fel & Trammel), and marked them as valid destinations for NPC escorts (uox3/regions/regions.dfn)
Moved bankers from vendor to human DFN files, and made them inherit basehuman instead of basevendor - since they are not vendors
To address an issue with escorted NPCs not timing out and vanishing if they are left in a "dormant" area of the world with no player activity, the NPCs are marked as "always awake" the moment they arrive at their destination. Note that the uox.ini setting ALLOWAWAKENPCS needs to be enabled for this to work.
Fixed an issue where spawnsection of spawners did not show up correctly in tweak menu
Fixed an issue where the generic Orc AI script didn't have a return true at end of onDamage() event, which prevented all orcs from taking damage in combat (js/npc/ai/monster/orc.js)
Moved Anatomy skill-check in healing script (js/skill/healing.js) from onCallback1() function to onTimer() to prevent the skill-check from being spammable
Added mount ID for Frost Mite in creatures.dfn, allowing it to be used as mount
Exposed the following character properties to JS engine, which can be used to view/adjust the permanent hair/beard options for a character:
.hairStyle
.hairColour
.beardStyle
.beardColour
Updated 'kill hair, 'shavehair, 'shavebeard and 'remove commands to clear permanent hair/beard colour and style properties in addition to removing the item itself
Added a GM override to let GMs place as many houses as they want (js/server/house/houseDeed.js)
Fixed an issue where attempting to sell items to NPC shopkeepers could result in client crashing
Added a new JS Event:
onMultiLogout( iMulti, cPlayer ) // Handles players logging out while inside multis
Updated house script (js/server/house/house.js) with onMultiLogout event, which allows owners (always) and co-owners/friends/guests (if option enabled in uox.ini) to safely log out inside the house (without getting booted).
Added a "keyless" option for interacting with locked doors (js/item/doors.js) of player-owned houses, which lets owners/co-owners/friends/guests of a house use locked doors in the house without requiring a key in their backpack, if the options for that are enabled in UOX.INI. Enabled for owners/co-owners and friends by default (but not for guests)
Note that if option to safely log out is enabled, but keyless option is NOT enabled, then the server will check if the player has a key to the house in their backpack, and eject them from the house upon logging out if not. This is to make sure players don't get stuck inside a house they can't get out of because they lack the rights to open doors etc.
Added new UOX.INI options, under the [houses] section:
SAFECOOWNERLOGOUT=1 // Allow co-owners to safely and instantly log out inside house
SAFEFRIENDLOGOUT=1 // Allow friends to safely and instantly log out inside house
SAFEGUESTLOGOUT=1 // Allow guests to safely and instantly log out inside house
KEYLESSOWNERACCESS=1 // Allow owner of house to use locked doors in house without key in pack
KEYLESSCOOWNERACCESS=1 // Allow co-owners of house to use locked doors in house without key in pack
KEYLESSFRIENDACCESS=1 // Allow friends of house to use locked doors in house without key in pack
KEYLESSGUESTACCESS=0 // Allow guests of house to use locked doors in house without key in pack
Fixed NOHAIR tag from races.dfn not being loaded correctly
2023-03-04 22:50:55 +08:00
CTownRegion * tempRegion = cwmWorldState - > townRegions [ escortRegion ] ;
if ( tempRegion - > WorldNumber ( ) = = mNPC - > WorldNumber ( ) )
{
regionCandidates . push_back ( escortRegion ) ;
}
2022-10-24 18:39:33 +08:00
}
2012-11-03 18:11:04 +00:00
}
UOX3 0.99.6-RC3
Updated Item DFNs with ORIGIN and SECTIONID tags for relevant items
Added JS Function to make comparing eras (based on object origin or server settings) easier:
EraStringToNum( eraString ) // Takes an era string (uo, t2a, uor, td, lbr, aos, etc) and returns an int
Updated some JS scripts to use EraStringToNum() for era comparisons (potionkeg.js)
Default CORESHARDERA setting is now LBR
Removed PUB15 as a separate "era" - it's identical to late stage LBR anyway:
Removed support for GETPUB15 tag
Added support for GETUO tag for items/NPCs:
GETUO=<sectionID> // Inherit DFN section if core shard era is Ultima Online (original release, before T2A)
Rewrote portions of MsgBoardQuestEscortCreate() function in msgboard.cpp to ensure only escort regions within same world as NPC can be selected as destinations
Increased maximum number of possible escort regions that can exist from 255 to 65535
Added region definitions for all shrines in Britannia (Fel & Trammel), and marked them as valid destinations for NPC escorts (uox3/regions/regions.dfn)
Moved bankers from vendor to human DFN files, and made them inherit basehuman instead of basevendor - since they are not vendors
To address an issue with escorted NPCs not timing out and vanishing if they are left in a "dormant" area of the world with no player activity, the NPCs are marked as "always awake" the moment they arrive at their destination. Note that the uox.ini setting ALLOWAWAKENPCS needs to be enabled for this to work.
Fixed an issue where spawnsection of spawners did not show up correctly in tweak menu
Fixed an issue where the generic Orc AI script didn't have a return true at end of onDamage() event, which prevented all orcs from taking damage in combat (js/npc/ai/monster/orc.js)
Moved Anatomy skill-check in healing script (js/skill/healing.js) from onCallback1() function to onTimer() to prevent the skill-check from being spammable
Added mount ID for Frost Mite in creatures.dfn, allowing it to be used as mount
Exposed the following character properties to JS engine, which can be used to view/adjust the permanent hair/beard options for a character:
.hairStyle
.hairColour
.beardStyle
.beardColour
Updated 'kill hair, 'shavehair, 'shavebeard and 'remove commands to clear permanent hair/beard colour and style properties in addition to removing the item itself
Added a GM override to let GMs place as many houses as they want (js/server/house/houseDeed.js)
Fixed an issue where attempting to sell items to NPC shopkeepers could result in client crashing
Added a new JS Event:
onMultiLogout( iMulti, cPlayer ) // Handles players logging out while inside multis
Updated house script (js/server/house/house.js) with onMultiLogout event, which allows owners (always) and co-owners/friends/guests (if option enabled in uox.ini) to safely log out inside the house (without getting booted).
Added a "keyless" option for interacting with locked doors (js/item/doors.js) of player-owned houses, which lets owners/co-owners/friends/guests of a house use locked doors in the house without requiring a key in their backpack, if the options for that are enabled in UOX.INI. Enabled for owners/co-owners and friends by default (but not for guests)
Note that if option to safely log out is enabled, but keyless option is NOT enabled, then the server will check if the player has a key to the house in their backpack, and eject them from the house upon logging out if not. This is to make sure players don't get stuck inside a house they can't get out of because they lack the rights to open doors etc.
Added new UOX.INI options, under the [houses] section:
SAFECOOWNERLOGOUT=1 // Allow co-owners to safely and instantly log out inside house
SAFEFRIENDLOGOUT=1 // Allow friends to safely and instantly log out inside house
SAFEGUESTLOGOUT=1 // Allow guests to safely and instantly log out inside house
KEYLESSOWNERACCESS=1 // Allow owner of house to use locked doors in house without key in pack
KEYLESSCOOWNERACCESS=1 // Allow co-owners of house to use locked doors in house without key in pack
KEYLESSFRIENDACCESS=1 // Allow friends of house to use locked doors in house without key in pack
KEYLESSGUESTACCESS=0 // Allow guests of house to use locked doors in house without key in pack
Fixed NOHAIR tag from races.dfn not being loaded correctly
2023-03-04 22:50:55 +08:00
// Abort out if there are no valid escort region candidates
if ( regionCandidates . empty ( ) )
2012-11-03 18:11:04 +00:00
{
UOX3 0.99.6-RC3
Updated Item DFNs with ORIGIN and SECTIONID tags for relevant items
Added JS Function to make comparing eras (based on object origin or server settings) easier:
EraStringToNum( eraString ) // Takes an era string (uo, t2a, uor, td, lbr, aos, etc) and returns an int
Updated some JS scripts to use EraStringToNum() for era comparisons (potionkeg.js)
Default CORESHARDERA setting is now LBR
Removed PUB15 as a separate "era" - it's identical to late stage LBR anyway:
Removed support for GETPUB15 tag
Added support for GETUO tag for items/NPCs:
GETUO=<sectionID> // Inherit DFN section if core shard era is Ultima Online (original release, before T2A)
Rewrote portions of MsgBoardQuestEscortCreate() function in msgboard.cpp to ensure only escort regions within same world as NPC can be selected as destinations
Increased maximum number of possible escort regions that can exist from 255 to 65535
Added region definitions for all shrines in Britannia (Fel & Trammel), and marked them as valid destinations for NPC escorts (uox3/regions/regions.dfn)
Moved bankers from vendor to human DFN files, and made them inherit basehuman instead of basevendor - since they are not vendors
To address an issue with escorted NPCs not timing out and vanishing if they are left in a "dormant" area of the world with no player activity, the NPCs are marked as "always awake" the moment they arrive at their destination. Note that the uox.ini setting ALLOWAWAKENPCS needs to be enabled for this to work.
Fixed an issue where spawnsection of spawners did not show up correctly in tweak menu
Fixed an issue where the generic Orc AI script didn't have a return true at end of onDamage() event, which prevented all orcs from taking damage in combat (js/npc/ai/monster/orc.js)
Moved Anatomy skill-check in healing script (js/skill/healing.js) from onCallback1() function to onTimer() to prevent the skill-check from being spammable
Added mount ID for Frost Mite in creatures.dfn, allowing it to be used as mount
Exposed the following character properties to JS engine, which can be used to view/adjust the permanent hair/beard options for a character:
.hairStyle
.hairColour
.beardStyle
.beardColour
Updated 'kill hair, 'shavehair, 'shavebeard and 'remove commands to clear permanent hair/beard colour and style properties in addition to removing the item itself
Added a GM override to let GMs place as many houses as they want (js/server/house/houseDeed.js)
Fixed an issue where attempting to sell items to NPC shopkeepers could result in client crashing
Added a new JS Event:
onMultiLogout( iMulti, cPlayer ) // Handles players logging out while inside multis
Updated house script (js/server/house/house.js) with onMultiLogout event, which allows owners (always) and co-owners/friends/guests (if option enabled in uox.ini) to safely log out inside the house (without getting booted).
Added a "keyless" option for interacting with locked doors (js/item/doors.js) of player-owned houses, which lets owners/co-owners/friends/guests of a house use locked doors in the house without requiring a key in their backpack, if the options for that are enabled in UOX.INI. Enabled for owners/co-owners and friends by default (but not for guests)
Note that if option to safely log out is enabled, but keyless option is NOT enabled, then the server will check if the player has a key to the house in their backpack, and eject them from the house upon logging out if not. This is to make sure players don't get stuck inside a house they can't get out of because they lack the rights to open doors etc.
Added new UOX.INI options, under the [houses] section:
SAFECOOWNERLOGOUT=1 // Allow co-owners to safely and instantly log out inside house
SAFEFRIENDLOGOUT=1 // Allow friends to safely and instantly log out inside house
SAFEGUESTLOGOUT=1 // Allow guests to safely and instantly log out inside house
KEYLESSOWNERACCESS=1 // Allow owner of house to use locked doors in house without key in pack
KEYLESSCOOWNERACCESS=1 // Allow co-owners of house to use locked doors in house without key in pack
KEYLESSFRIENDACCESS=1 // Allow friends of house to use locked doors in house without key in pack
KEYLESSGUESTACCESS=0 // Allow guests of house to use locked doors in house without key in pack
Fixed NOHAIR tag from races.dfn not being loaded correctly
2023-03-04 22:50:55 +08:00
Console . Error ( oldstrutil : : format ( " MsgBoardQuestEscortCreate() No valid regions defined for escort quests " ) ) ;
2012-11-03 18:11:04 +00:00
mNPC - > Delete ( ) ;
return ;
}
UOX3 0.99.6-RC3
Updated Item DFNs with ORIGIN and SECTIONID tags for relevant items
Added JS Function to make comparing eras (based on object origin or server settings) easier:
EraStringToNum( eraString ) // Takes an era string (uo, t2a, uor, td, lbr, aos, etc) and returns an int
Updated some JS scripts to use EraStringToNum() for era comparisons (potionkeg.js)
Default CORESHARDERA setting is now LBR
Removed PUB15 as a separate "era" - it's identical to late stage LBR anyway:
Removed support for GETPUB15 tag
Added support for GETUO tag for items/NPCs:
GETUO=<sectionID> // Inherit DFN section if core shard era is Ultima Online (original release, before T2A)
Rewrote portions of MsgBoardQuestEscortCreate() function in msgboard.cpp to ensure only escort regions within same world as NPC can be selected as destinations
Increased maximum number of possible escort regions that can exist from 255 to 65535
Added region definitions for all shrines in Britannia (Fel & Trammel), and marked them as valid destinations for NPC escorts (uox3/regions/regions.dfn)
Moved bankers from vendor to human DFN files, and made them inherit basehuman instead of basevendor - since they are not vendors
To address an issue with escorted NPCs not timing out and vanishing if they are left in a "dormant" area of the world with no player activity, the NPCs are marked as "always awake" the moment they arrive at their destination. Note that the uox.ini setting ALLOWAWAKENPCS needs to be enabled for this to work.
Fixed an issue where spawnsection of spawners did not show up correctly in tweak menu
Fixed an issue where the generic Orc AI script didn't have a return true at end of onDamage() event, which prevented all orcs from taking damage in combat (js/npc/ai/monster/orc.js)
Moved Anatomy skill-check in healing script (js/skill/healing.js) from onCallback1() function to onTimer() to prevent the skill-check from being spammable
Added mount ID for Frost Mite in creatures.dfn, allowing it to be used as mount
Exposed the following character properties to JS engine, which can be used to view/adjust the permanent hair/beard options for a character:
.hairStyle
.hairColour
.beardStyle
.beardColour
Updated 'kill hair, 'shavehair, 'shavebeard and 'remove commands to clear permanent hair/beard colour and style properties in addition to removing the item itself
Added a GM override to let GMs place as many houses as they want (js/server/house/houseDeed.js)
Fixed an issue where attempting to sell items to NPC shopkeepers could result in client crashing
Added a new JS Event:
onMultiLogout( iMulti, cPlayer ) // Handles players logging out while inside multis
Updated house script (js/server/house/house.js) with onMultiLogout event, which allows owners (always) and co-owners/friends/guests (if option enabled in uox.ini) to safely log out inside the house (without getting booted).
Added a "keyless" option for interacting with locked doors (js/item/doors.js) of player-owned houses, which lets owners/co-owners/friends/guests of a house use locked doors in the house without requiring a key in their backpack, if the options for that are enabled in UOX.INI. Enabled for owners/co-owners and friends by default (but not for guests)
Note that if option to safely log out is enabled, but keyless option is NOT enabled, then the server will check if the player has a key to the house in their backpack, and eject them from the house upon logging out if not. This is to make sure players don't get stuck inside a house they can't get out of because they lack the rights to open doors etc.
Added new UOX.INI options, under the [houses] section:
SAFECOOWNERLOGOUT=1 // Allow co-owners to safely and instantly log out inside house
SAFEFRIENDLOGOUT=1 // Allow friends to safely and instantly log out inside house
SAFEGUESTLOGOUT=1 // Allow guests to safely and instantly log out inside house
KEYLESSOWNERACCESS=1 // Allow owner of house to use locked doors in house without key in pack
KEYLESSCOOWNERACCESS=1 // Allow co-owners of house to use locked doors in house without key in pack
KEYLESSFRIENDACCESS=1 // Allow friends of house to use locked doors in house without key in pack
KEYLESSGUESTACCESS=0 // Allow guests of house to use locked doors in house without key in pack
Fixed NOHAIR tag from races.dfn not being loaded correctly
2023-03-04 22:50:55 +08:00
// Choose an escort region at random based on non-empty collection of candidates
mNPC - > SetQuestDestRegion ( regionCandidates [ RandomNum ( static_cast < size_t > ( 0 ) , ( regionCandidates . size ( ) - 1 ) ) ] ) ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
2002-04-07 21:27:53 +00:00
// Set quest type to escort
2012-11-03 18:11:04 +00:00
mNPC - > SetQuestType ( QT_ESCORTQUEST ) ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
2002-04-07 21:27:53 +00:00
// Make sure they don't move until an player accepts the quest
2012-11-03 18:11:04 +00:00
mNPC - > SetNpcWander ( WT_NONE ) ;
mNPC - > SetNPCAiType ( AI_NONE ) ;
mNPC - > SetQuestOrigRegion ( npcRegion ) ;
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
2022-10-24 18:39:33 +08:00
if ( cwmWorldState - > ServerData ( ) - > SystemTimer ( tSERVER_ESCORTWAIT ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2022-10-24 18:39:33 +08:00
mNPC - > SetTimer ( tNPC_SUMMONTIME , cwmWorldState - > ServerData ( ) - > BuildSystemTimeValue ( tSERVER_ESCORTWAIT ) ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
if ( ! MsgBoardPostQuest ( mNPC , QT_ESCORTQUEST ) )
2002-04-07 21:27:53 +00:00
{
2022-10-24 18:39:33 +08:00
Console . Error ( oldstrutil : : format ( " MsgBoardQuestEscortCreate() Failed to add quest post for %s " , mNPC - > GetName ( ) . c_str ( ) ) ) ;
2012-11-03 18:11:04 +00:00
mNPC - > Delete ( ) ;
2002-04-07 21:27:53 +00:00
}
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardQuestEscortArrive()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/23/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Handles payment and release upon arrival of the escort
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
void MsgBoardQuestEscortArrive ( CSocket * mSock , CChar * mNPC )
2002-04-07 21:27:53 +00:00
{
CChar * mChar = mSock - > CurrcharObj ( ) ;
2022-10-24 18:39:33 +08:00
if ( ! ValidateObject ( mChar ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2002-04-07 21:27:53 +00:00
return ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2002-04-07 21:27:53 +00:00
2012-11-03 18:11:04 +00:00
CTownRegion * destReg = cwmWorldState - > townRegions [ mNPC - > GetQuestDestRegion ( ) ] ;
2021-04-13 22:27:24 +08:00
// Calculate payment for services rendered, partly based on escort's fame and partly based on a percentage (25%) of the amount of gold they're carrying
UI16 questReward = ( ( mNPC - > GetFame ( ) > 0 ? ( ( mNPC - > GetFame ( ) / 100 ) * 50 ) : 0 ) + std : : round ( GetItemAmount ( mNPC , 0x0EED ) * 0.25 ) ) ;
2002-04-07 21:27:53 +00:00
// If they have no money, well, oops!
2021-04-13 22:27:24 +08:00
if ( questReward = = 0 )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
UOX3 0.99.5b
Fixed an issue where karma titles would inadvertently have the space behind the title trimmed before being displayed in paperdoll, resulting in erroneous display of title + name there
Fixed an issue with a cooking script (js/skill/cooking/cooking.js) where sweet dough would not get consumed properly on cooking (Dragon Slayer)
Updated C++ function calcRegionFromXY to work with CBaseObject instead of CChar, so it also works for Items
Items now have current town region stored as an object property during runtime. This is calculated on load, when container property is updated, and when an item is picked up or dropped. The region is also accessible via the (read-only) JS Item property .region
Added new JS Event to allow capturing button presses from the old-school gump displayed by client via packet 0x76, which was originally used by the old-school crafting menus in T2A. The requirement for this to work is that the gump in question must have a gumpID between 0x4000 and 0xffff (which can be set when manually creating a packet with this ID via JS), and the Event itself must be in the global script:
onScrollingGumpPress( pSock, gumpID, buttonID )
Added new JS Event to allow better control over which names UOX3 sends to the client for characters:
onNameRequest( myObj, requestedBy ) // return custom string, or return empty string/nothing/true/false to use default name
Updated JS Events to also work for Items (previously only worked for Characters)
onLightChange( myObj, lightLevel )
onTempChange( myObj, temp )
onWeatherChange( myObj, weatherType )
Adjusted default temperature for town regions with no weather systems defined from 0 to 20 degrees Celsius
Updated some JS scripts (fishing.js, baking.js and cooking.js) to make use of GetTempTag/SetTempTag rather than GetTag/SetTag
Added cancel-checks to targeting functions in command script for add-commands (js/commands/targeting/add.js)
Updated get command script (js/commands/targeting/get.js) to allow retrieving region ID and name using 'get region
Updated misc command script (js/commands/custom/misc-cmd.js) to add 'gettemptag and 'settemptag commands, used to retrieve/set temporary custom tags from/on objects
Fixed a bug where Spirit Speak skill would be checked for race languages even if the race had LANGUAGEMIN defined as 0 (or not defined at all)
Fixed an issue where players using regular UO client would get stuck in a black void after teleporting between worlds, by adding an additional character refresh after the teleport
Fixed an issue where crafting tools for Blacksmithing and Carpentry would attempt to fetch the value of an incorrectly named INI setting to handle durability loss for the tools
Added new setting under [settings] section of UOX.INI to control whether it should be possible to craft weapons from coloured ingots or not:
CRAFTCOLOUREDWEAPONS=0/1 // If enabled(1), players can craft coloured weapons. Defaults to disabled(0)
Fixed an issue where the correct ingots were not consumed when attempting to craft items using colored ingots
Fixed a rogue debug message leftover in the scissor script
2022-02-13 22:49:37 +08:00
// Thank you %s for thy service. We have made it safely to %s. Alas, I seem to be a little short on gold. I have nothing to pay you with.
2021-06-04 01:20:22 +08:00
mNPC - > TextMessage ( mSock , 738 , TALK , 0 , mChar - > GetName ( ) . c_str ( ) , destReg - > GetName ( ) . c_str ( ) ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2002-04-07 21:27:53 +00:00
else // Otherwise pay the poor sod for his time
{
2021-04-13 22:27:24 +08:00
Items - > CreateScriptItem ( mSock , mChar , " 0x0EED " , questReward , OT_ITEM , true ) ;
2022-10-24 18:39:33 +08:00
Effects - > GoldSound ( mSock , questReward ) ;
UOX3 0.99.5b
Fixed an issue where karma titles would inadvertently have the space behind the title trimmed before being displayed in paperdoll, resulting in erroneous display of title + name there
Fixed an issue with a cooking script (js/skill/cooking/cooking.js) where sweet dough would not get consumed properly on cooking (Dragon Slayer)
Updated C++ function calcRegionFromXY to work with CBaseObject instead of CChar, so it also works for Items
Items now have current town region stored as an object property during runtime. This is calculated on load, when container property is updated, and when an item is picked up or dropped. The region is also accessible via the (read-only) JS Item property .region
Added new JS Event to allow capturing button presses from the old-school gump displayed by client via packet 0x76, which was originally used by the old-school crafting menus in T2A. The requirement for this to work is that the gump in question must have a gumpID between 0x4000 and 0xffff (which can be set when manually creating a packet with this ID via JS), and the Event itself must be in the global script:
onScrollingGumpPress( pSock, gumpID, buttonID )
Added new JS Event to allow better control over which names UOX3 sends to the client for characters:
onNameRequest( myObj, requestedBy ) // return custom string, or return empty string/nothing/true/false to use default name
Updated JS Events to also work for Items (previously only worked for Characters)
onLightChange( myObj, lightLevel )
onTempChange( myObj, temp )
onWeatherChange( myObj, weatherType )
Adjusted default temperature for town regions with no weather systems defined from 0 to 20 degrees Celsius
Updated some JS scripts (fishing.js, baking.js and cooking.js) to make use of GetTempTag/SetTempTag rather than GetTag/SetTag
Added cancel-checks to targeting functions in command script for add-commands (js/commands/targeting/add.js)
Updated get command script (js/commands/targeting/get.js) to allow retrieving region ID and name using 'get region
Updated misc command script (js/commands/custom/misc-cmd.js) to add 'gettemptag and 'settemptag commands, used to retrieve/set temporary custom tags from/on objects
Fixed a bug where Spirit Speak skill would be checked for race languages even if the race had LANGUAGEMIN defined as 0 (or not defined at all)
Fixed an issue where players using regular UO client would get stuck in a black void after teleporting between worlds, by adding an additional character refresh after the teleport
Fixed an issue where crafting tools for Blacksmithing and Carpentry would attempt to fetch the value of an incorrectly named INI setting to handle durability loss for the tools
Added new setting under [settings] section of UOX.INI to control whether it should be possible to craft weapons from coloured ingots or not:
CRAFTCOLOUREDWEAPONS=0/1 // If enabled(1), players can craft coloured weapons. Defaults to disabled(0)
Fixed an issue where the correct ingots were not consumed when attempting to craft items using colored ingots
Fixed a rogue debug message leftover in the scissor script
2022-02-13 22:49:37 +08:00
// Thank you %s for thy service. We have made it safely to %s. Here is thy pay as promised.
2021-06-04 01:20:22 +08:00
mNPC - > TextMessage ( mSock , 739 , TALK , 0 , mChar - > GetName ( ) . c_str ( ) , destReg - > GetName ( ) . c_str ( ) ) ;
2002-04-07 21:27:53 +00:00
}
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
2002-04-07 21:27:53 +00:00
// Inform the PC of what he has just been given as payment
2022-10-24 18:39:33 +08:00
std : : string mNPCTitle = GetNpcDictTitle ( mNPC , mSock ) ;
mSock - > SysMessage ( 740 , questReward , mNPC - > GetName ( ) . c_str ( ) , mNPCTitle . c_str ( ) ) ; // You have just received %d gold coins from %s %s.
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
2002-04-07 21:27:53 +00:00
// Take the NPC out of quest mode
2012-11-03 18:11:04 +00:00
mNPC - > SetNpcWander ( WT_FREE ) ; // Wander freely
2021-06-12 07:30:23 -04:00
mNPC - > SetFTarg ( nullptr ) ; // Reset follow target
2012-11-03 18:11:04 +00:00
mNPC - > SetQuestType ( 0 ) ; // Reset quest type
mNPC - > SetQuestDestRegion ( 0 ) ; // Reset quest destination region
Numerous changes with focus on feature and stability parity across Windows, Linux and MacOS platforms
Added new Makefile that handles compiling UOX3 and Spidermonkey on both Linux and MacOS (punt)
Added VS solution (SpiderMonkey.sln) and VC++ project files for compiling SpiderMonkey on Windows (Xuri)
Updated SpiderMonkey from v1.6.0 to v1.7.0
Added optimization flag -O2 for release build in CMakeLists.txt in project root (Xuri)
Added StringUtility file with general common string manipulation functions (punt)
Updated RandomNum function to use a "seedless" random number generator from C++11 instead of the old C rand() function. (punt)
Overall code cleanup to remove/replace platform-dependent code (punt)
Replaced potentially unsafe usage of C string stuff like sprintf, vsprintf, vsnprintf, strncat, strcpy and strlen throughout the code with calls to a format() function containing only a single, safe use of vsnprintf, ensuring there's a single place of failure if there's anything to fix and and making it easy to potentially replace this with std::format from C++20 when the time comes. (punt)
Replaced usage of char in many places with std::string (punt)
Started process of replacing UString usage with functions provided through StringUtility instead (punt)
Replaced platform specific fileIO handling in Windows/Linux with cross-platform C++17 standard std::filesystem (punt)
Replaced platform specific time handling by using cross-platform chrono library (punt)
Removed UOX namespace to reduce complexity (punt)
Elimitated template code approach to singletons for more modern c++ constructs, removing dependices in the process (punt)
Removed ODBC support; it hasn't been touched since the initial implementation in 2008, and there is a lack of someone to maintain the code. (punt)
Removed some platform specific files like uoxlinux.h, which is no longer required (punt)
Removed legacy crash protection code, and removed support for cluox (punt)
Removed legacy "support" for Borland compiler (punt)
Removed legacy VC++ 6 Workspace/Project files, VS2005 Solution/Project files, as these are no longer supported (Xuri)
Removed legacy BUILD folder with outdated compilation instructions (Xuri)
Removed old Changelog file (merged into Changelog.txt) (Xuri)
Fixed a pointer bug for items in multis on world load (punt)
Fixed a dictionary related issue that caused segmentation faults on Linux/MacOS (punt)
Fixed an issue with callbacks to JS scripts that caused segmentation faults on Linux/MacOS (punt)
Paths in uox.ini should now load properly on all platforms regardless of whether those paths use slashes or backslashes, and whether or not they end in a slash/backslash. (punt)
Moved to c++17 style of threading, and got rid of threadsafeobject.cpp/h (punt)
Replaced parsing of UOX.INI tags with a system that's more easily maintainable (punt)
Added some new commands to js/commands/custom/misc-cmd.js (Xuri)
cont // Targeted item will be made a container, set to nondecay and movable 2
endfight // Targeted character (and character being fought) will stop fighting
getmulti // Get multiObject for targeted item
finditem // Find item at layer X
movespeed // Set movement speed of target player (0x0 Normal, 0x1 Mounted, 0x2 Slow (walk only), 0x3 Hybrid ("jog"?), 0x4 Frozen)
Added new HTML based documentation in docs folder, and removed many old legacy docs that are either incorporated into this document already or no longer relevant for the current UOX3 version (Xuri)
Co-Authored-By: Charles Kerr <punt1959@users.noreply.github.com>
2020-09-07 18:09:55 +08:00
2002-04-07 21:27:53 +00:00
// Set a timer to automatically delete the NPC
2022-10-24 18:39:33 +08:00
mNPC - > SetTimer ( tNPC_SUMMONTIME , cwmWorldState - > ServerData ( ) - > BuildSystemTimeValue ( tSERVER_ESCORTDONE ) ) ;
2021-06-12 07:30:23 -04:00
mNPC - > SetOwner ( nullptr ) ;
UOX3 0.99.6-RC3
Updated Item DFNs with ORIGIN and SECTIONID tags for relevant items
Added JS Function to make comparing eras (based on object origin or server settings) easier:
EraStringToNum( eraString ) // Takes an era string (uo, t2a, uor, td, lbr, aos, etc) and returns an int
Updated some JS scripts to use EraStringToNum() for era comparisons (potionkeg.js)
Default CORESHARDERA setting is now LBR
Removed PUB15 as a separate "era" - it's identical to late stage LBR anyway:
Removed support for GETPUB15 tag
Added support for GETUO tag for items/NPCs:
GETUO=<sectionID> // Inherit DFN section if core shard era is Ultima Online (original release, before T2A)
Rewrote portions of MsgBoardQuestEscortCreate() function in msgboard.cpp to ensure only escort regions within same world as NPC can be selected as destinations
Increased maximum number of possible escort regions that can exist from 255 to 65535
Added region definitions for all shrines in Britannia (Fel & Trammel), and marked them as valid destinations for NPC escorts (uox3/regions/regions.dfn)
Moved bankers from vendor to human DFN files, and made them inherit basehuman instead of basevendor - since they are not vendors
To address an issue with escorted NPCs not timing out and vanishing if they are left in a "dormant" area of the world with no player activity, the NPCs are marked as "always awake" the moment they arrive at their destination. Note that the uox.ini setting ALLOWAWAKENPCS needs to be enabled for this to work.
Fixed an issue where spawnsection of spawners did not show up correctly in tweak menu
Fixed an issue where the generic Orc AI script didn't have a return true at end of onDamage() event, which prevented all orcs from taking damage in combat (js/npc/ai/monster/orc.js)
Moved Anatomy skill-check in healing script (js/skill/healing.js) from onCallback1() function to onTimer() to prevent the skill-check from being spammable
Added mount ID for Frost Mite in creatures.dfn, allowing it to be used as mount
Exposed the following character properties to JS engine, which can be used to view/adjust the permanent hair/beard options for a character:
.hairStyle
.hairColour
.beardStyle
.beardColour
Updated 'kill hair, 'shavehair, 'shavebeard and 'remove commands to clear permanent hair/beard colour and style properties in addition to removing the item itself
Added a GM override to let GMs place as many houses as they want (js/server/house/houseDeed.js)
Fixed an issue where attempting to sell items to NPC shopkeepers could result in client crashing
Added a new JS Event:
onMultiLogout( iMulti, cPlayer ) // Handles players logging out while inside multis
Updated house script (js/server/house/house.js) with onMultiLogout event, which allows owners (always) and co-owners/friends/guests (if option enabled in uox.ini) to safely log out inside the house (without getting booted).
Added a "keyless" option for interacting with locked doors (js/item/doors.js) of player-owned houses, which lets owners/co-owners/friends/guests of a house use locked doors in the house without requiring a key in their backpack, if the options for that are enabled in UOX.INI. Enabled for owners/co-owners and friends by default (but not for guests)
Note that if option to safely log out is enabled, but keyless option is NOT enabled, then the server will check if the player has a key to the house in their backpack, and eject them from the house upon logging out if not. This is to make sure players don't get stuck inside a house they can't get out of because they lack the rights to open doors etc.
Added new UOX.INI options, under the [houses] section:
SAFECOOWNERLOGOUT=1 // Allow co-owners to safely and instantly log out inside house
SAFEFRIENDLOGOUT=1 // Allow friends to safely and instantly log out inside house
SAFEGUESTLOGOUT=1 // Allow guests to safely and instantly log out inside house
KEYLESSOWNERACCESS=1 // Allow owner of house to use locked doors in house without key in pack
KEYLESSCOOWNERACCESS=1 // Allow co-owners of house to use locked doors in house without key in pack
KEYLESSFRIENDACCESS=1 // Allow friends of house to use locked doors in house without key in pack
KEYLESSGUESTACCESS=0 // Allow guests of house to use locked doors in house without key in pack
Fixed NOHAIR tag from races.dfn not being loaded correctly
2023-03-04 22:50:55 +08:00
// Mark NPC as always awake, to ensure they'll still get checked and removed by server when timer is up
mNPC - > SetAwake ( true ) ;
2002-04-07 21:27:53 +00:00
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardQuestEscortRemovePost()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 7/23/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Removes an escort quest post on regional messageboards
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
void MsgBoardQuestEscortRemovePost ( CChar * mNPC )
2002-04-07 21:27:53 +00:00
{
2021-04-27 00:26:38 +08:00
std : : string fileName ;
2012-11-03 18:11:04 +00:00
if ( ! cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) . empty ( ) )
2021-04-27 00:26:38 +08:00
{
2012-11-03 18:11:04 +00:00
fileName = cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) ;
2021-04-27 00:26:38 +08:00
}
2002-04-07 21:27:53 +00:00
2022-10-24 18:39:33 +08:00
fileName + = std : : string ( " region " ) + oldstrutil : : number ( mNPC - > GetQuestOrigRegion ( ) ) + std : : string ( " .bbf " ) ;
2021-06-03 14:22:50 +08:00
std : : size_t fileSize = 0 ;
2022-10-24 18:39:33 +08:00
try
{
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
fileSize = std : : filesystem : : file_size ( fileName ) ;
2022-10-24 18:39:33 +08:00
}
catch ( . . . )
{
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
fileSize = 0 ;
}
if ( fileSize = = 0 )
{
return ;
}
2012-11-03 18:11:04 +00:00
std : : fstream file ;
file . open ( fileName . c_str ( ) , std : : ios : : in | std : : ios : : out | std : : ios : : binary ) ;
if ( file . is_open ( ) )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
SERIAL tmpSerial = 0 ;
size_t totalSize = 0 ;
UI16 tmpSize = 0 ;
char rBuffer [ 4 ] ;
file . seekg ( 0 , std : : ios : : beg ) ;
while ( ! file . eof ( ) )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
file . read ( rBuffer , 2 ) ;
2022-10-24 18:39:33 +08:00
tmpSize = ( ( rBuffer [ 0 ] < < 8 ) + rBuffer [ 1 ] ) ;
2012-11-03 18:11:04 +00:00
file . seekg ( 1 , std : : ios : : cur ) ;
file . read ( rBuffer , 4 ) ;
2022-10-24 18:39:33 +08:00
tmpSerial = CalcSerial ( rBuffer [ 0 ] , rBuffer [ 1 ] , rBuffer [ 2 ] , rBuffer [ 3 ] ) ;
2012-11-03 18:11:04 +00:00
if ( tmpSerial = = mNPC - > GetSerial ( ) )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
file . seekp ( totalSize + 2 , std : : ios : : beg ) ;
file . put ( 0x00 ) ;
break ;
2002-04-07 21:27:53 +00:00
}
2012-11-03 18:11:04 +00:00
else
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
totalSize + = tmpSize ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
if ( totalSize < fileSize )
{
file . seekg ( totalSize , std : : ios : : beg ) ;
}
else
{
2022-10-24 18:39:33 +08:00
Console . Error ( oldstrutil : : format ( " Attempting to seek past end of file in %s " , fileName . c_str ( ) ) ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
break ;
}
2002-04-07 21:27:53 +00:00
}
}
2012-11-03 18:11:04 +00:00
file . close ( ) ;
2002-04-07 21:27:53 +00:00
}
else
2021-04-27 00:26:38 +08:00
{
2022-10-24 18:39:33 +08:00
Console . Error ( oldstrutil : : format ( " Could not open file %s for reading " , fileName . c_str ( ) ) ) ;
2021-04-27 00:26:38 +08:00
}
2002-04-07 21:27:53 +00:00
}
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardRemoveFile()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 8/10/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Removes the MessageBoard .bbf file attached to the specified serial
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
void MsgBoardRemoveFile ( const SERIAL msgBoardSer )
2002-04-07 21:27:53 +00:00
{
2012-11-03 18:11:04 +00:00
std : : string fileName ;
2002-04-07 21:27:53 +00:00
2012-11-03 18:11:04 +00:00
if ( ! cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) . empty ( ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
fileName = cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2002-04-07 21:27:53 +00:00
2022-10-24 18:39:33 +08:00
fileName + = oldstrutil : : number ( msgBoardSer , 16 ) + std : : string ( " .bbf " ) ;
2002-04-07 21:27:53 +00:00
2021-07-04 02:26:43 +08:00
[[maybe_unused]] int removeResult = remove ( fileName . c_str ( ) ) ;
2012-11-03 18:11:04 +00:00
2022-10-24 18:39:33 +08:00
Console . Print ( oldstrutil : : format ( " Deleted MessageBoard file for Board Serial 0x%X \n " , msgBoardSer ) ) ;
2012-11-03 18:11:04 +00:00
}
2002-04-07 21:27:53 +00:00
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
//| Function - MsgBoardMaintenance()
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Date - 8/10/2005
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
Instance-support and misc code cleanup
Misc code and documentation cleanup:
Updated and standardized function comment blocks throughout entire codebase
Grouped getters and setters together in pairs and documented them as one
Removed empty and/or non-useful information from comment blocks
Removed unused function from cItem.cpp/h - IncID() - formerly used to change IDs for doors
Added new feature - Instances
Objects (characters, items, multis, spawnregions) can now make use of a 5th parameter to determine their location in the game world. In addition to the traditional X, Y, Z and WORLDNUMBER parameters, a new one has been added - INSTANCEID - that allows objects to exist at the same coordinates in the same world, but in different "dimensions". Code has been updated in multiple places to support this, and a default instanceID of 0 is assumed if nothing else is specified.
Added support for new DFN tag in town regions, spawn regions and locations - INSTANCEID (defaults to 0 if not present)
Added support for another start location parameter after worldNum in UOX.INI representing instanceID (defaults to 0 if not present)
Updated TWEAK menu to include WorldNumber and instanceID
Fixed BaseWeight option in TWEAK menu
Updated CBase_Teleport - now takes an optional 5th parameter instanceID
Updated SE_SpawnNPC now takes an optional 5th parameter - instanceID
Updated SE_FindMulti now takes an optional 5th parameter - instanceID
Updated SE_GetItem now takes an optional 5th parameter - instanceID
Updated SE_FindItem now takes an optional 6th parameter - instanceID
Added new JS property for Items, Characters, Regions: .instanceID
Added JS property for Regions: .members - returns comma-separated list of town member serials
Updated JS scripts making use of the above-mentioned JS Methods/Functions
Updated dictionaries with new tweak menu entry texts
Exposed SpawnRegions to JS engine, and updated JS docs with details:
SpawnRegion JS Functions
IterateOverSpawnRegions()
GetSpawnRegion( spawnRegNum )
GetSpawnRegionCount()
SpawnRegion JS Properties
name
regionNum
itemList
npcList
item
npc
maxItems
maxNpcs
itemCount
npcCount
onlyOutside
prefZ
x1
y1
x2
y2
world
instanceID
minTime
maxTime
call
2020-08-08 13:57:15 +08:00
//| Purpose - Finds all .bbf files and cleans any deleted posts from them
//| It will also remove any empty .bbf files if necessary.
2022-10-24 18:39:33 +08:00
//o------------------------------------------------------------------------------------------------o
2012-11-03 18:11:04 +00:00
void MsgBoardMaintenance ( void )
{
2022-10-24 18:39:33 +08:00
std : : vector < MsgBoardPost_st > mbMessages ;
std : : vector < MsgBoardPost_st > : : const_iterator mbIter ;
2002-04-07 21:27:53 +00:00
2012-11-03 18:11:04 +00:00
std : : string dirName = " ./msgboards/ " ;
if ( ! cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) . empty ( ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2012-11-03 18:11:04 +00:00
dirName = cwmWorldState - > ServerData ( ) - > Directory ( CSDDP_MSGBOARD ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2002-04-07 21:27:53 +00:00
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
// Fetch file listing from msgboards directory
2022-10-24 18:39:33 +08:00
for ( auto & entry : std : : filesystem : : directory_iterator ( dirName ) )
2012-11-03 18:11:04 +00:00
{
2022-10-24 18:39:33 +08:00
if ( std : : filesystem : : is_regular_file ( entry . path ( ) ) )
2012-11-03 18:11:04 +00:00
{
2021-05-28 21:43:50 +08:00
// It is a regular file
if ( entry . path ( ) . extension ( ) = = " .bbf " )
2012-11-03 18:11:04 +00:00
{
2021-05-28 21:43:50 +08:00
// Open file stream for reading in binary mode
2022-10-24 18:39:33 +08:00
std : : ifstream file ( entry . path ( ) . string ( ) , std : : ios : : in | std : : ios : : binary ) ;
2021-05-28 21:43:50 +08:00
if ( file . is_open ( ) )
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
{
2021-05-28 21:43:50 +08:00
// Seek start of file
file . seekg ( 0 , std : : ios : : beg ) ;
// As long as end of file hasn't been reached, continue reading in more posts
while ( ! file . eof ( ) )
{
2022-10-24 18:39:33 +08:00
MsgBoardPost_st toAdd ;
2021-05-28 21:43:50 +08:00
// If post had Toggle value other than 0x00, add it to the list of posts to write back out to file later
2022-10-24 18:39:33 +08:00
if ( MsgBoardReadPost ( file , toAdd ) )
2021-05-28 21:43:50 +08:00
{
mbMessages . push_back ( toAdd ) ;
}
}
file . close ( ) ;
// If there are no more posts in the file, delete the file
if ( mbMessages . empty ( ) )
{
std : : filesystem : : remove ( entry . path ( ) ) ;
}
else
{
// Open an output file stream for the .bbf file in binary mode
std : : ofstream mFile ( entry . path ( ) , std : : ios : : out | std : : ios : : trunc | std : : ios : : binary ) ;
// Write each of the posts we want to keep back into the file
mFile . seekp ( 0 , std : : ios : : beg ) ;
for ( mbIter = mbMessages . begin ( ) ; mbIter ! = mbMessages . end ( ) ; + + mbIter )
{
2022-10-24 18:39:33 +08:00
MsgBoardWritePost ( mFile , ( * mbIter ) ) ;
2021-05-28 21:43:50 +08:00
}
mFile . close ( ) ;
}
// Clear the message vector to prepare it for next file (if any)
mbMessages . clear ( ) ;
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2021-05-28 21:43:50 +08:00
else
2012-11-03 18:11:04 +00:00
{
2022-10-24 18:39:33 +08:00
Console . Error ( oldstrutil : : format ( " Failed to open MessageBoard file for reading: %s " , entry . path ( ) . string ( ) . c_str ( ) ) ) ;
2012-11-03 18:11:04 +00:00
}
2021-05-28 21:43:50 +08:00
}
0.99.4k
Added layer=1 to spellbooks in dfndata/items/magic/misc_magic.dfn to allow NPCs to equip them (dragon slayer)
Fixed issue with wipe command (js/commands/targeting/wipe.js) not working because script was referencing wrong name for socket
Randomized initial position of items added inside containers via DFN tag PACKITEM
Fixed issue with get (js/commands/targeting/get.js) and set (js/commands/target/set.js) commands where wrong property name was used for getting/setting old npcwander type
Fixed various issues with in-game bulletin boards; posts can now be made, read and replied to using both regular client and ClassicUO client
Fixed issue with bulletin board post removal that could cause infinite loops
Fixed issues with and re-enabled bulletin board maintenance. Should no longer cause infinite loops, nor corrupt bulletin board posts when removing posts marked for deletion! This also fixes NPC escort quests not appearing on bulletin boards after initial quests were accepted and related posts removed.
Added new GM command in js/commands/msgmod.js:
'msgmod on/off // If on, GMs who open a bulletin board while using ClassicUO client will be able to remove any individual message
Added additional teleport locations in teleport.scp for Dragon Turtle Spawn area, Khaldun, Terathan Keep, Valley of Eodon, Minax Fortress, Stygian Abyss, Underworld
Some minor fixes to regions.dfn - Name of Covetous dungeon, a set of coordinates for Ice Dungeon
2021-05-03 03:38:25 +08:00
}
2012-11-03 18:11:04 +00:00
}
}