uox3/source/PartySystem.cpp

419 lines
12 KiB
C++
Raw Normal View History

#include "PartySystem.h"
#include "uox3.h"
#include "network.h"
#include "CPacketSend.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 <mutex>
// CPartyEntry code goes here
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
const size_t BIT_LEADER = 0;
const size_t BIT_LOOTABLE = 1;
CChar * CPartyEntry::Member( void ) const { return member; }
bool CPartyEntry::IsLeader( void ) const { return settings.test( BIT_LEADER ); }
bool CPartyEntry::IsLootable( void ) const { return settings.test( BIT_LOOTABLE ); }
void CPartyEntry::Member( CChar *valid ) { member = valid; }
void CPartyEntry::IsLeader( [[maybe_unused]] bool value ) { settings.set( BIT_LEADER, true ); }
void CPartyEntry::IsLootable( [[maybe_unused]] bool value ) { settings.set( BIT_LOOTABLE, true ); }
CPartyEntry::CPartyEntry() : member( nullptr ) { settings.reset(); }
CPartyEntry::CPartyEntry( CChar *m, bool isLeader, bool isLootable ) : member( m )
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
{
settings.set( BIT_LEADER, isLeader );
settings.set( BIT_LOOTABLE, isLootable );
}
void UpdateStats( CBaseObject *mObj, UI08 x );
//o------------------------------------------------------------------------------------------------o
//| Function - Party::AddMember()
//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 - Add new member to party
//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
bool Party::AddMember( CChar *i )
{
bool retVal = false;
if( ValidateObject( i ) && IsOnline( *i ))
{
if( !HasMember( i ))
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
{
CPartyEntry *toAdd = new CPartyEntry( i );
PartyFactory::GetSingleton().AddLookup( this, i );
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
members.push_back( toAdd );
2021-06-12 07:30:23 -04:00
SendList( nullptr );
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
retVal = true;
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
CSocket *newSock = i->GetSocket();
newSock->SysMessage( 9072 ); // You have been added to the party.
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
// Send status update to ALL party members
for( size_t j = 0; j < members.size(); ++j )
{
CPartyEntry *toFind = members[j];
CChar *partyMember = toFind->Member();
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
if( partyMember != nullptr )
{
if( partyMember->GetSerial() != i->GetSerial() )
{
// If party member is online, send them info on the new member
if( IsOnline( *partyMember ))
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
{
CSocket *s = partyMember->GetSocket();
// Send stat window update for new member to existing party members
s->StatWindow( i );
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
// Prepare the stat update packet for new member to existing party members
CPUpdateStat toSendHp(( *i ), 0, true );
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
s->Send( &toSendHp );
CPUpdateStat toSendMana(( *i ), 1, true );
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
s->Send( &toSendMana );
CPUpdateStat toSendStam(( *i ), 2, true );
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
s->Send( &toSendStam );
// Also send info on the existing party member to the new member!
// Send stat window update packet for existing member to new party member
newSock->StatWindow( partyMember );
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
// Prepare the stat update packet for existing member to new party members
CPUpdateStat toSendHp2(( *partyMember ), 0, true );
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
newSock->Send( &toSendHp2 );
CPUpdateStat toSendMana2(( *partyMember ), 1, true );
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
newSock->Send( &toSendMana2 );
CPUpdateStat toSendStam2(( *partyMember ), 2, true );
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
newSock->Send( &toSendStam2 );
UOX3 0.99.6-RC6 Removed arbitrary and hidden restrictions on refreshing list of online players shown with 'wholist command Fixed an issue where player ghosts that get teleported would not see themselves get updated to new location Fixed a server crash from clients disconnecting while running server in debug mode Improved how container updates are sent to players; now only sends to clients that have actually opened the container, and who are still within range Added more information about UO data files being loaded during server startup Enhanced the GM 'add menu to allow clicking directly on images of items/npcs to add them, and adjusted size of menus to accommodate this Fixed an issue with fleeing NPCs that could cause them to attempt to flee across time and space, regardless of distance to target/attacker in combat Added NPC AI that runs away from players if they get too close (even outside combat). Applied to hind, rabbits, squirrels, ferrets and various birds by default: AI_ANIMAL_SCARED (aitype 12) Fixed issues with NPCs fleeing forever, or getting stuck in flee/don't flee loop, by introducing max fleeing distance (50 tiles) and cooldown (30 sec) on fleeing Updated onNameRequest JS Event to include third parameter with origin of name request, so script responses can be tailored appropriately: onNameRequest( myObj, requestedBy, requestSource ) Potential values for requestSource: 0 - Speech/System Messages 1 - Guild Menus 2 - Stat Window (self) 3 - Stat Window (other) 4 - Tooltip 5 - Paperdoll Journal 6 - Paperdoll 7 - Single Click / All-Names 8 - System 9 - Secure Trade Window Added Adaptive Performance System (APS) that dynamically adjust how often NPC AI/movement is checked based on overall shard performance. If performance drops below defined threshold, UOX3 gradually slows down checks for NPC AI/movement to prioritize player movement/speech/command responsiveness. If performance climbs back up above threshold, slowdowns are gradually removed. The following UOX.INI options have been added under [system] category to support this system: APSPERFTHRESHOLD=50 // Performance threshold (measured in simulation cycles/sec) below which the APS kicks in APSINTERVAL=100 // How often (in milliseconds) the APS checks performance and makes adjustments (if needed) to balance out shard performance APSDELAYSTEP=50 // How much the delay timer is modified by (in milliseconds) each time APS makes adjustments APSDELAYMAXCAP=2000 // Max amount of of delay APS can introduce for NPC AI/movement handling when attempting to restore shard performance Added new JS Methods for Region objects: .GetOrePrefs( oreType ) // Get ore preference data for ore type found in town region. Returned as an array containing the following data: orePrefData -> [ oreName, // name of ore color, // color of ore minskill, // min skill to mine ore ingotName, // name of ingot created from ore makemenu, // makemenu entry for crafting something from ingot oreChance, // default global chance of finding this ore type scriptID // script attached to mined ore ], orePrefChance // Chance of finding this ore type in given town region .GetOreChance() // Get base chance of finding any ore in town region Moved Mining skill plus gravedigging feature from hard code to scripts (js/skill/mining.js) to make it easier to maintain and/or customize, and removed hard coded variants Gravedigging now relies on the ore resource system behind the scenes to restrict how often graves in a given area can be dug up Fixed some incorrect references to .worldNumber Character property in misc scripts (should be .worldnumber) Made some "hard-scripted" system messages in misc scripts use dictionary system instead Added spawn region for banker NPCs in Serpent's Hold (dfndata/spawn/felucca/spawn_town_serpents_hold.dfn, dfndata/spawn/trammel/spawn_town_serpents_hold.dfn) Fixed region definition of Ocllo to actually cover the entire town (dfndata/regions/regions.dfn) Added numerous additional locations accessible with 'goplace # command, for key locations in Ilshenar, Malas, Tokuno Islands and Ter Mur (dfndata/location/location.dfn) Revised travel-menu portion of GM menu (shortcut: 'travel) to include more travel options based on new locations (dfndata/items/travelmenu.dfn and travelmenu.bulk.dfn) Fixed an issue where NPCs could attempt to attack targets in other worlds/instances Added new JS Event that triggers for characters who are about to deal damage in combat. Complimentary to onDamage, which triggers for chars receiving damage: onDamageDeal( dmgDealer, dmgReceiver, damageValue, damageType ) Added new JS Event that can trigger in global script upon creation of new player chars. Note that this will trigger in place of onCreateDFN event for player characters: onCreatePlayer( pChar ) Added new JS Event that triggers for characters selecting a target with a spell. Complimentary to onSpellTarget, which triggers for targets selected with a spell: onSpellTargetSelect( caster, target, spellNum ) Updated onCombatStart and onCombatEnd JS Events to also trigger for the other party in combat Updated onPickup JS Event to include a third parameter - the potential container item was picked up from. Event now also triggers event in scripts attached to said containers: onPickup( iPickedUp, pChar, iCont ) Added tracking of total playtime per individual character, and per account across all characters, and exposed these properties to JS engine: .totalPlayTime // Account property, total playtime across all chars .playTime // Character property, total playtime on given character only Added new player-accessible command ('playtime) to spit out the playtime of current character/account as a whole (js/commands/playtime.js) Implemented first version of Young Player System: Replaced the UNUSED9 account flag with YOUNG, to be used by Young/New Player System Added new JS Account property that gets/sets whether player account is considered Young: .isYoung Added new Char timers: TIMER_YOUNGHEAL // Restricts how often Young players are healed by NPC healers TIMER_YOUNGMESSAGE // Restricts how often Young players are warned about dangerous looking monsters in overworld Updated GM commands 'get and 'set to get/set .isYoung property of player's account (js/commands/targeting/get.js and set.js) Added new UOX.INI setting to enable/disable Young Player System (enabled by default): YOUNGPLAYERSYSTEM=1 If Young Player System is enabled, all newly created player accounts are automatically marked with Young flag Added new script to handle various restrictions and functions related to Young characters (js/player/young_player.js): Young characters will have [Young] displayed over their head Young characters will have their Young status checked and verified on every login + every stat/skill gain, to revoke the Young status if any of the following is true: Account has a total playtime of more than 40 hours Any character has more than 350 total (base) skill points Any character has more than 70 skill points in a single skill Any character has more than 150 total stat points Any character has more than 80 stat points in a single stat Young characters can renounce their Young status manually by saying the words "I renounce my young player status" Young characters get two additional items upon creation: a new player ticket (can be combined with any other players new player ticket for both players to get a reward) a sextant (shows Young players directions to nearest moongate/bank regardless of where they are, as long as outdoors) Young characters cannot target other player characters with hostile spells or skills Young characters cannot be the target of other player characters' hostile spells or skills Young characters can only cast beneficial spells upon themselves or other Young characters Young characters can only be the target of beneficial spells from other Young players Young players (and their pets/followers) cannot attack or harm any other players (or their pets/followers), nor themselves be attacked or harmed by any other players (or their pets/followers), whether from combat, spells, skills or items Young players don't lose any of their items on death, and are teleported to the nearest healer upon death with all their items intact Young players receive a warning upon entering dungeons that monsters there will be hostile Updated global script (js/server/global.js) to: Check/Verify Young status of players upon login Attach young player script on login/creation for players on Young accounts Give specific items to Young players upon creation Added new script (js/item/corpse.js) that is assigned to all freshly created corpses. This script handles restrictions related to Young players interactions with corpses, and the interactions of other players with corpses of Young players Updated JS Method .Carve() to return true/false depending on whether carving a corpse was successful Updated Healer AI in code to heal nearby injured Young players Updated Evil AI and Evil Caster AI in code to avoid selecting Young players as targets in combat outside of dungeons Added a new section to UOX.INI - [young player starting locations] - that can be used to define starting locations for Young players. If only one such location is provided, all players start there. Otherwise, it matches the same starting location setup as the regular one - with one entry per town in Britannia. Restricted transferring and/or friending of pets (code) and hirelings (hirelings.js) between Young and non-Young players Restricted Young players from recalling or gating to Felucca facet Young players can instantly logout from anywhere, at any time
2023-07-01 20:02:40 +08:00
s->SysMessage( 9076, i->GetNameRequest( partyMember, NRS_SPEECH ).c_str() ); // %s joined the party.
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
}
}
}
}
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
}
}
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
return retVal;
}
//o------------------------------------------------------------------------------------------------o
//| Function - Party::Find()
//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 - Check if character is a member of party
//o------------------------------------------------------------------------------------------------o
CPartyEntry *Party::Find( CChar *i, SI32 *location )
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
{
if( ValidateObject( i ))
{
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
for( size_t j = 0; j < members.size(); ++j )
{
CPartyEntry *toFind = members[j];
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
if( toFind->Member() == i )
{
2021-06-12 07:30:23 -04:00
if( location != nullptr )
{
( *location ) = static_cast<int>( j );
}
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
return toFind;
}
}
}
2021-06-12 07:30:23 -04:00
return nullptr;
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
}
bool Party::HasMember( CChar *find )
{
2021-06-12 07:30:23 -04:00
return ( Find( find ) != nullptr );
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
}
//o------------------------------------------------------------------------------------------------o
//| Function - Party::RemoveMember()
//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 - Remove a character from the party
//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
bool Party::RemoveMember( CChar *i )
{
bool retVal = false;
if( ValidateObject( i ))
{
SI32 removeSpot;
CPartyEntry *toFind = Find( i, &removeSpot );
2021-06-12 07:30:23 -04:00
if( toFind != nullptr )
{
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
delete members[removeSpot];
members.erase( members.begin() + removeSpot );
PartyFactory::GetSingleton().RemoveLookup( i );
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
CPPartyMemberRemove toSend( i );
for( size_t j = 0; j < members.size(); ++j )
{
CPartyEntry *toFind = members[j];
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
toSend.AddMember( toFind->Member() );
if( IsOnline( *toFind->Member() ) && !toFind->IsLeader() )
{
toFind->Member()->GetSocket()->SysMessage( 9075 ); // A player has been removed from your party.
}
}
2021-06-12 07:30:23 -04:00
SendPacket( &toSend, nullptr );
if( i->GetSocket() != nullptr )
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
{
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
SendPacket( &toSend, i->GetSocket() );
i->GetSocket()->SysMessage( 9074 ); // You have been removed from the party.
0.99.4x Fixed an issue where the color of NPC corpse names would not always match up with the NPC's flag color Fixed a bug where the baseRange and maxRange properties of ranged weapons would not get saved to world files. These values are now saved in the format of RANGE=baseRange,maxRange Changed the way items are added to containers, to ensure that the order in which the items are displayed to the player always reflects the order in which they were added; now the most recent item added/moved in a container will always be rendered on top of older items. Made adjustments to how items are randomly added to containers; should use more of a given container gump's available area now Exposed Item property to JS engine, which contains serial of the creator of an item: .creator // contains serial of the creator of an item. If set, maker's marks will show up in the item's tooltip Fixed an issue where JS engine would lose track of script context if one script used CreateDFNItem() or SpawnNPC() functions and the new objects had events that triggered upon creation. UOX3 now restores the original script context at the tail end of these functions. Added new JS Event to allow inserting custom tooltip text for objects, which will be displayed in tooltips right after the object name. Any text returned from the event will be displayed, and the text can make use of the same HTML tags as gumps to make changes to color, font, etc. onTooltip( myObj ) // Triggers for objects right before the object's tooltip properties are sent to client Updated 'tweak and 'set commands to refresh item being modified if movable state of item changes, so the change is reflected in nearby clients Fixed an issue with NPC vendors and items bought from players not being properly removed from the vendor's "bought container" when players buy them again Ported Item Identification skill from code to JS (js/skill/itemid.js) and removed hard-coded version Implemented magic item generator in JS (js/item/magic_item.js). When this script is attached to an NPC, it has a chance to generate magic weapons, armors, wands/staffs and rings as loot on the NPC's corpse when slain. The chance of getting quality magical items increases with the fame level of the NPC in question. The types of magical items generated follows the pattern of such items as implemented in UO prior to the AoS expansion. Examples: exceedingly accurate war hammer of vanquishing substantial, accurate axe of power and Daemon's Breath silver long sword massive platemail arms of Protection metal shield of defense durable ringmail tunic of guarding All magic items have a chance to have spell effects attached (with rings/wands being guaranteed to have these), with a limited amount of charges available. For weapons, these effects activate on successful hits in combat, while for armors they activate on equip, and then periodically as long as the item is worn. Rings and wands/staffs have to be manually activated and targeted - with the exception of rings of invisibility, which activate the moment you equip them! Related scripts: js/item/magic_armor_equipeffects.js js/item/magic_weapon_accbonus.js js/item/magic_weapon_equip.js js/item/magic_weapon_spell_attack.js The magic item loot generation script has been attached to a number of different NPCs, all of which now have a chance to drop magic items as loot when defeated. A bonus magical item - the glacial staff - has also been implemented (js/item/magic_glacial_staff.js), and has a chance to drop as loot from Giant Ice Serpents! Fixed an issue with CustomTarget where the target message would not be displayed if the cursorType parameter was provided Fixed bug with 'rename command, which referenced a non-existing variable that caused a script crash Added additional object properties to 'get and 'set commands: .shouldSave // Determines if an item should be saved in worldfiles or not .baseRange // Determines the base range of a ranged weapon, less than which it becomes less effective .maxRange // Determines the max range of a ranged weapon, beyond which it cannot reach its target The feature that allows stats like Strength, Dexterity and Intelligence to provide bonuses to skill checks has been turned into a UOX.INI setting, which is disabled by default. The bonuses have also been nerfed; they will no longer contribute more to the success of a skill check than the actual skill being checked! STATSAFFECTSKILLCHECKS=0/1 // If enabled, stats can provide bonuses to skill checks based on the weighting for those stats as setup in dfndata/skills/skills.dfn Updated damage tracking code to include the type of damage that was dealt (PHYSICAl vs HEAT vs COLD, etc) Updated Character JS Method Damage() to include a new parameter that can specify the type of damage that was dealt to the character. The new parameter must always be included if other optional parameters are used. Note that updates might be required for scripts making use of this method.Updated syntax: .Damage( amount ) .Damage( amount, damageType ) .Damage( amount, damageType, attacker ) .Damage( amount, damageType, attacker, doRepsys ) Supported damageTypes: PHYSICAL = 1 LIGHT = 2 RAIN = 3 COLD = 4 HEAT = 5 LIGHTNING = 6 // magic damage POISON = 7 SNOW = 8 Updated JS Event OnDamage to include an additional parameter that describes the type of damage that was dealt. New syntax: onDamage( damaged, attacker, damageValue, damageType ) Updated JS Event OnSpellTarget to allow rejecting a spell being cast on a target by returning a value of 2 from the script Split the character priv flag for magic reflection into a temporary one (one-time magic reflection spell) and a permanent one (innate permanent reflection ability). The temporary effect is put in place by Magic Reflection spell, and is removed after a successful spell reflect. The permanent one is an innate ability of a character and is not removed even after a spell is reflected. Added new Character JS property to get/set state of a character's permanent magic reflect ability: .permanentMagicReflect // 0 = disable, 1 = enable Added special abilities/effects for the following NPCs: Acid Elementals now have a chance to damage the melee weapons of their attackers Dull Copper Elementals now explode on death Shadow Iron Elemental is immune to targeted spell damage Copper Elementals have permanent magic reflect, and reflect some physical damage back at their attacker Bronze Elementals deal passive area damage to nearby players every 5 to 10 seconds Valorite Elementals have permanent magic reflect, reflect some physical damage back at their attacker Snow/Ice Elementals deal passive area damage to nearby players every 5 to 10 seconds Lava Serpents deal passive area damage to nearby players every 5 to 10 seconds Phoenixes deal passive area damage to nearby players every 5 to 10 seconds Pixies have a chance to cast a random spell upon receiving a death blow: Bless (target) Curse (target) Explosion (target) Greater Poison (target) Greater Heal (self, prevents death) Ethereal Warriors will now resurrect dead players with positive karma Ethereal Warriors now have a chance to drain target's health, stamina or mana on hit Fire Breath special ability added to the following NPCs, with the random ability damage scaling with the NPCs current health: Hell Cat, 5 to 8 dmg at max health Fire Steed, 6 to 9 dmg at max health Hell Hounds, 8 to 11 dmg at max health Lava Lizard, 8 to 11 dmg at max health Predator Hell Cat, 9 to 14 dmg at max health Sea Serpent, 11 to 17 dmg at max health Swamp Dragon, 15 to 22 dmg at max health Armored Swamp Dragon, 15 to 22 dmg at max health Fire Gargoyle, 20 to 30 dmg at max health Deep Sea Serpent, 21 to 32 dmg at max health Serpentine Dragon, 22 to 32 dmg at max health Drake (Gray), 22 to 32 dmg at max health Drake (Red), 22 to 32 dmg at max health Nightmare, 26 to 39 dmg at max health Dark Steed, 26 to 39 dmg at max health Silver Steed, 26 to 39 dmg at max health Kraken, 39 to 59 dmg at max health Dragon (Red), 41 to 62 dmg at max health Dragon (Gray), 41 to 62 dmg at max health Shadow Wyrm, 50 to 75 dmg at max health Reptalon, 51 to 77 dmg at max health Skeletal Dragon, 52 to 77 dmg at max health Ancient Wyrm, 60 to 90 dmg at max health Update stats, skills and loot for all currently implemented NPCs Removed an ancient piece of code that prevented corpses from being generated for various elementals and blade spirits on death. This was originally put in place because these creatures had no corpses, and would replace it with a backpack instead, but these creatures now all have corpses in all client versions supported by UOX3 Updated potions script (js/item/potion.js) with updated formula for amount of hitpoints healed by healing potions, and added restrictions for using them when at full health and/or if poisoned (Dragon Slayer) Fixed a bug where creatures (and humans, if FORCENEWANIMATIONPACKET was disabled in uox.ini) would play animations with wrong frame count, causing the animations to either freeze for a few frames at the end, or get cut off a couple of frames early Implemented bonus hit chance for Archery skill, based on mention of such a bonus in Publish 5 patch notes and related UO House of Commons chat. This has been exposed as a UOX.INI setting where this bonus can be tweaked: ARCHERYHITBONUS=10 // Bonus hit chance for Archery skill added to regular hit chance in combat. Defaults to 10% Implemented optional extra delay between moving and being able to shoot with ranged weapons in combat (in addition to whatever delay is there due to speed of the ranged weapon). This is exposed as a UOX.INI setting: ARCHERYSHOOTDELAY=0.5 // Minimum delay in seconds from a player stops moving until they can start to fire their ranged weapon. Defaults to 0.5s Fixed a bug where players who never entered combat mode could fire ranged weapons while moving Updated Add-menu with some improvements for usability: Menu now directly on the Objects (previously "Shard") tab for quicker access, with a small welcome text and quick-link button for UOX3 docs Settings tab contains some (persistent, will be saved with character) options for how the Add-menu behaves, along with a few quick-access buttons to some useful commands. Available options: Option to add chosen item at specific location instead of in GM's backpack Option to add chosen item repeatedly until cancelled Option to automatically reopen Add-menu on last menu that was open when a selection is made Option to force decayable state of all added items to either off (doesn't decay), on (decays) or nothing (use item default) Option to force movable state of all added items to either off (not movable), on (movable) or nothing (use item default) Added a Home button at the bottom of the menu, that takes the user back to the front page of the Add-menu regardless of which menu page they're on Updated Character/Socket JS Method SysMessage() with an optional parameter to specify the color used to display the system message. Updated syntax: .SysMessage( "Text" ) // Display "Text" to user as a system message with default system message color from ini .SysMessage( "Text %s %s", txtArg1, txtArg2 ) // Display "Text" to player with string arguments injected into text .SysMessage( txtColor, "Text" ) // Display "Text" to user with a specified color .SysMessage( txtColor, "Text %s %s", txtArg1, txtArg2 ) // Combination of text color, text and string arguments Fixed a bug where hair/beard items could show up inside corpses Fixed a bug where items could sometimes vanish (visually) from containers when bouncing back because player was not able to pick them up Fixed a bug where players would be unable to pick up a freely movable item from a locked down container Updated handling of item bouncing on pickup to use UOX3 dictionary messages instead of hard-coded client messages Added support for new Dictionary language: dictionary.POL - Polish (SERVERLANGUAGE=8 in uox.ini, or client language 83 if SERVERLANGUAGE is set to 0) Added taming restrictions for Unicorn, Ki-Rin and Cu Sidhe (js/skill/taming.js) Added modification of some creatures stats after they've been tamed (js/skill/taming.js) Added restrictions for who can ride certain creatures (Unicorn, Ki-Rin, Cu Sidhe) Updated words of power for Meteor Swarm spell to follow the same logic as other spells using Kal (Summon): Kal Des Flam Ylem Added new Item/Character JS Methods to get/set temporary custom tags which don't persist across worldsaves (or across reconnects, for players): .GetTempTag( "tagName" ) .SetTempTag( "tagName", tagValue ) When applying HPMAX, STAMINAMAX AND MANAMAX DFN tags to new NPCs, their current HP, STAMINA and MANA properties will now be automatically updated to match Fixed a server crash caused by empty speech messages sent from certain clients Fixed a bug that prevented teleport locations in Felucca/Trammel from working properly Updated calculations in code for duration and damage of existing poison strengths (1 - Lesser, 2 - Normal, 3 - Greater, 4 - Deadly) to match with ~Publish 15 (LBR/pre-AoS), and added another poison strength for monster usage (5 - Lethal) The strength of the Poison and Poison Field spells is now based on the average of the caster's Magery and Poisoning skills, the distance from the target (Poison spell only) and the target's Resisting Spells skill. If caster is further away than 2 tiles from target, the poison strength always equals Lesser Poison, otherwise the following rules apply: If caster's combined skill is higher than 100.0, poison strength equals Greater Poison, with 5% chance of Deadly Poison (if Poison spell) or Deadly Poison (if Poison Field spell) If caster's combined skill is higher than 70.2, poison strength equals Greater Poison If caster's combined skill is higher than 30.2, poison strength equals Normal Poison If caster's combined skill is 30.2 or lower, poison strength equals Lesser Poison If target resists spell, poison strength is reduced by 1 level, unless it's already at the lowest level Fixed an issue that would would let players move faster than they should have been allowed to Fixed misc issues with Party System: Mana and Stamina should now update for Party Members when added to the party, when going in/out of range and when their stats update while in range Players who get disconnected or relog should now find themselves back in the same party they were in previously Added system messages to inform party members about updates to their party, and to let invited players know they've successfully joined a party (or rejoined, if relogging) World saves now operate on the principle of only saving changes done since the last world save. Combined with the fact that NPCs in UOX3 are only active if there are players in the same/neighbouring map regions, shard owners may expect to see a decrease in world save times ranging from ~11% to ~99%, depending on how active and how spread out their player base is. If no changes have taken place since last save, saves are virtually instantaneous!
2021-09-20 21:35:17 +08:00
}
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
retVal = true;
}
}
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
return retVal;
}
//o------------------------------------------------------------------------------------------------o
//| Function - Party::Leader()
//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 - Set a party member as party leader
//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
void Party::Leader( CChar *member )
{
SI32 newLeaderPos;
CPartyEntry *newLeader = Find( member, &newLeaderPos );
2021-06-12 07:30:23 -04:00
if( newLeader != nullptr )
{
2021-06-12 07:30:23 -04:00
if( leader != nullptr )
{
SI32 oldLeaderPos;
CPartyEntry *mFind = Find( leader, &oldLeaderPos );
2021-06-12 07:30:23 -04:00
if( mFind != nullptr )
{
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
mFind->IsLeader( false );
// We need to swap their position in the array, because the first cab
// off the rank is the leader, and the client makes assumptions about
// this
members[oldLeaderPos] = newLeader;
members[newLeaderPos] = mFind;
}
}
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
leader = newLeader->Member();
newLeader->IsLeader( true );
}
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
}
CChar *Party::Leader( void )
{
return leader;
}
Party::Party( bool npc ) : leader( nullptr ), isNPC( npc )
{
}
2021-06-12 07:30:23 -04:00
Party::Party( CChar *ldr, bool npc ) : leader( nullptr ), isNPC( npc )
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
{
if( ValidateObject( ldr ))
{
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
AddMember( ldr );
Leader( ldr );
}
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
}
//o------------------------------------------------------------------------------------------------o
//| Function - Party::SendPacket()
//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 - Send list of party members to client
//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
void Party::SendPacket( CPUOXBuffer *toSend, CSocket *toSendTo )
{
2021-06-12 07:30:23 -04:00
if( toSendTo != nullptr )
{
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
toSendTo->Send( toSend );
}
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
else
{
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
for( size_t k = 0; k < members.size(); ++k )
{
CPartyEntry *toFind = members[k];
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
CSocket *tSock = toFind->Member()->GetSocket();
2021-06-12 07:30:23 -04:00
if( tSock != nullptr )
{
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
tSock->Send( toSend );
}
}
}
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
}
void Party::SendList( CSocket *toSendTo )
{
CPPartyMemberList toSend;
for( size_t j = 0; j < members.size(); ++j )
{
CPartyEntry *toFind = members[j];
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
toSend.AddMember( toFind->Member() );
}
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
SendPacket( &toSend, toSendTo );
}
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
bool Party::IsNPC( void ) const
{
return isNPC;
}
void Party::IsNPC( bool value )
{
isNPC = value;
}
/** This class is responsible for the creation and destruction of parties
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
*/
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
//-------------------------------------------------------------------------------------------------
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
PartyFactory& PartyFactory::GetSingleton( void )
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::mutex lock;
std::scoped_lock scope( lock );
static PartyFactory instance;
return instance;
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
}
//-------------------------------------------------------------------------------------------------
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
void PartyFactory::AddLookup( Party *toQuickLook, CChar *toSave )
{
if( ValidateObject( toSave ))
{
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
partyQuickLook[toSave->GetSerial()] = toQuickLook;
}
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
}
void PartyFactory::RemoveLookup( CChar *toRemove )
{
if( ValidateObject( toRemove ))
{
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
std::map< SERIAL, Party * >::iterator toFind = partyQuickLook.find( toRemove->GetSerial() );
if( toFind != partyQuickLook.end() )
{
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
partyQuickLook.erase( toFind );
}
}
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
}
PartyFactory::PartyFactory()
{
partyQuickLook.clear();
}
PartyFactory::~PartyFactory()
{
for( Party *obj = parties.First(); !parties.Finished(); obj = parties.Next() )
{
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
delete obj;
2021-06-12 07:30:23 -04:00
obj = nullptr;
}
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
}
Party *PartyFactory::Create( CChar *leader )
{
2021-06-12 07:30:23 -04:00
Party *toAdd = nullptr;
if( ValidateObject( leader ))
{
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
toAdd = new Party( leader );
parties.Add( toAdd );
}
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
return toAdd;
}
void PartyFactory::Destroy( CChar *member )
{
Party *toRemove = Get( member );
Destroy( toRemove );
}
void PartyFactory::Destroy( Party *toRemove )
{
2021-06-12 07:30:23 -04:00
if( toRemove != nullptr )
{
std::vector<CPartyEntry *> *mList = toRemove->MemberList();
2021-06-12 07:30:23 -04:00
if( mList != nullptr )
{
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
for( size_t j = 0; j < mList->size(); ++j )
{
CPartyEntry *mEntry = ( *mList )[j];
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
RemoveLookup( mEntry->Member() );
}
}
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
parties.Remove( toRemove );
delete toRemove;
}
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
}
Party *PartyFactory::Get( CChar *member )
{
if( ValidateObject( member ))
{
std::map<SERIAL, Party *>::iterator toFind = partyQuickLook.find( member->GetSerial() );
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
if( toFind != partyQuickLook.end() )
{
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
return toFind->second;
}
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
else
{
2021-06-12 07:30:23 -04:00
return nullptr;
}
}
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
else
2021-06-12 07:30:23 -04:00
return nullptr;
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
}
//o------------------------------------------------------------------------------------------------o
//| Function - PartyFactory::CreateInvite()
//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 - Invite a player to the party
//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
void PartyFactory::CreateInvite( CSocket *inviter )
{
SERIAL serial = inviter->GetDWord( 7 );
CChar *toInvite = CalcCharObjFromSer( serial );
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
if( !ValidateObject( toInvite ) || toInvite->IsNpc() )
{
inviter->SysMessage( 9040 ); // You cannot invite an NPC or unknown player.
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
return;
}
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
CChar *inviterChar = inviter->CurrcharObj();
if( ValidateObject( inviterChar ) && inviterChar == toInvite )
{
inviter->SysMessage( 9041 ); // You cannot invite yourself to a party.
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
return;
}
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
Party *ourParty = Get( inviterChar );
2021-06-12 07:30:23 -04:00
if( ourParty == 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
//Party *tParty = Create( inviterChar );
Create( inviterChar);
}
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
CSocket *targSock = toInvite->GetSocket();
2021-06-12 07:30:23 -04:00
if( targSock != nullptr )
{
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
CPPartyInvitation toSend;
toSend.Leader( inviterChar );
targSock->Send( &toSend );
targSock->SysMessage( 9002 ); // You have been invited to join a party, type /accept or /decline to deal with the invitation
}
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
else
{
inviter->SysMessage( 9042 ); // That player is not online.
}
}
//o------------------------------------------------------------------------------------------------o
//| Function - PartyFactory::Kick()
//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 - Kick a member from the party
//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
void PartyFactory::Kick( CSocket *inviter )
{
SERIAL serial = inviter->GetDWord( 7 );
CChar *toRemove = CalcCharObjFromSer( serial );
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
if( !ValidateObject( toRemove ) || toRemove->IsNpc() )
{
inviter->SysMessage( 9043 ); // You cannot kick an NPC or unknown player.
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
return;
}
Party *ourParty = Get( inviter->CurrcharObj() );
2021-06-12 07:30:23 -04:00
if( ourParty == nullptr )
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
{
inviter->SysMessage( 9044 ); // You are not in a party and cannot kick them out.
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
return;
}
if(( ourParty->Leader() != inviter->CurrcharObj() ) && ( inviter->CurrcharObj() != toRemove ))
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
{
inviter->SysMessage( 9045 ); // Only the leader can kick someone from a party.
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
return;
}
if( ourParty->HasMember( toRemove ))
{
// even if they're offline, we can kick them out
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
ourParty->RemoveMember( toRemove );
inviter->SysMessage( 9046 ); // The player has been removed from the party.
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
}
}