1
0

41 Commits

Author SHA1 Message Date
Emagi
5d191927cf Fix spells to properly cleanup in function SpellProcess::CheckRemoveTargetFromSpell -- RemoveEffectsFromLuaSpell was not properly cleaning up special effects like sneak/snare/root/so on lingered on to cause a crash with dead spells with /reload spells or other activity 2025-02-04 18:45:48 -05:00
Emagi
883f172312 make sure to remove spell effect so we don't try to access a dead spell ptr later 2025-01-21 09:20:04 -05:00
Emagi
19cd63878c Update LuaInterface.cpp 2025-01-21 08:03:17 -05:00
Emagi
bd9f1bd8ce Fix accidentally not nullifying the spell pointer when we remove a spell effect 2025-01-21 07:37:22 -05:00
Emagi
78db10105e Lua Function GetID(Spawn) added.. 2025, it's amazing...! 2025-01-19 11:46:04 -05:00
Emagi
dad7873dc5 LUA functions added: GetSpellCaster(Spell) and GetCasterSpellLevel(Spell) the Spell field is optional if in a spell script
db additionally had field added:

alter table character_spell_effects add column caster_level smallint(5) unsigned not null default 0;
2025-01-18 09:16:35 -05:00
Emagi
3efce0abd6 call spell remove function for reason "target_dead" and "target_removed" also address the long delay between calling the remove function and the death of a spawn. Lastly made it so we can reference the spawn group id after death for a spawn since we remove it from a spawn group. 2025-01-16 12:29:24 -05:00
Emagi
154ba64b9c lua spell function remove updated for lua arguments, eg. function remove(Caster, Target, Reason, ..data args..), similar to function cast(Caster, Target, ..data args..) 2025-01-15 15:03:30 -05:00
Emagi
3162106580 Added Lua Functions PlayAnimationString(Spawn: Spawn, String: EmoteStringCommand, Spawn: OptTarget, Boolean: SetNoTarget, Boolean: UseAllSpellTargets, Boolean: IgnoreSelf) and GetSpellTargets(Optional_Spell) if no argument must be in spell script. Fixed spells with no range that are group based to apply to all in group. 2025-01-10 19:08:47 -05:00
Emagi
b1b9ab8ed9 LUA Function GetSpellRequiredLevel(Player) added to retrun the required level for the spell based on the adventure class 2025-01-09 13:34:32 -05:00
Emagi
42173ceef2 Added support to create duplicated zones of public zones (non city zone). Additionally spawn locations can be limited to the primary public zone and not replicated (for epics). 2024-12-23 08:46:11 -05:00
Emagi
92b8e406e3 Set LUA User data stale and removing pointer references before actual mem deletion of any spell data 2024-12-15 08:07:38 -05:00
Emagi
4e07b26cc7 add LUA functions for player levels in an instance 2024-12-05 09:22:50 -05:00
Emagi
c17b4d5588 Added CreateChoiceWindow, ClearChoice and GetChoiceSpawnID lua functions, added base of tracking for min, max, avg, first level for raid/group into instances... more work to complete tomorrow 2024-12-04 21:53:57 -05:00
Emagi
adc9ee0846 Relocate where we set the state into the iterator 2024-12-02 09:40:38 -05:00
Emagi
716caffb14 Have zone pointer tracked in the luaspell so we can assure we delete the spell properly when zone shuts down or spawn is gone 2024-12-01 18:24:56 -05:00
Emagi
9e986f3ace rely on remaining targets to delete the spell, caster ptr is not reliable in this case 2024-12-01 17:55:42 -05:00
Emagi
428b73391c Omit bank/shared-bank from selling at a merchant, additionally prevent weight calculation for banked items on players weight 2024-11-23 09:24:41 -05:00
Emagi
6b73d3617a avoid a lockup condition due to already locked mutexes 2024-11-22 17:35:53 -05:00
Emagi
b848f78f41 graceful cleanup of spell and allowing player to recast 2024-11-22 15:20:16 -05:00
Emagi
79c3ec1fb2 Fix spells ticking after cancellation/expiring 2024-11-22 14:38:00 -05:00
Emagi
315ab1d0e7 Project Nebulark Part 1, So much to list, this is a rough summary
- Raid support and cross peer support for Isle of Refuge, DoF, KoS and AoM clients.
- Zone Persistence added to non-instanced zones.
- Commands: /whogroup, /whoraid, /raidinvite, /raid_looter, /kickfromgroup, /kickfromraid, /leaveraid, /split, /raidsay (rsay) added.
- Cross peer zone and instance support
- Cross tell support (along with ignore)
- Cross ooc support
- Cross group support (can chat, leave group, disband cross peers, update group options)
- Cross who all support
- houses/instances fixed no more cross objects/spawns/etc from other houses
- houses now display characters name with the house zone description
- 1000's of house items now properly work with wall/ceiling
- debug messages removed from housing placement
- Encounters locked to raid instead of group
- group options restricted to raid leader
- reload rules for following are peer wide:
COMMAND_RELOADSTRUCTS
COMMAND_RELOAD_QUESTS
COMMAND_RELOAD_SPELLS
COMMAND_RELOAD_ZONESCRIPTS
COMMAND_RELOAD_FACTIONS
COMMAND_RELOAD_MAIL
COMMAND_RELOAD_GUILDS
COMMAND_RELOAD_RULES
COMMAND_RELOAD_STARTABILITIES
COMMAND_RELOAD_VOICEOVERS
COMMAND_RELOADSPAWNSCRIPTS
COMMAND_RELOADREGIONSCRIPTS
COMMAND_RELOADLUASYSTEM
- special/static zones (always_loaded) are now defined by a peer_priority unsigned short (smallint(5)) in zones table.  peer_priority = server_config world.peerpriority will spawn on that exe instance, if it is not available it is distributed to all peers.  Using the value of 0 (assuming no peer has priority of 0) or 65535 will result in peer distribution of zones.
server_config.json "WorldServer" block updated with the following (web peer port information), priority must be unique for EACH peer:
        "peeraddress": "10.1.1.2",
        "peerport": "9102",
        "peerpriority": "1",

New Command Line Run Arguments for World Exe to override server_config.json values
Allowed options:
  --worldaddress arg         World address
  --internalworldaddress arg Internal world address
  --worldport arg (=0)       Web world port
  --webworldaddress arg      Web world address
  --webworldport arg (=0)    Web world port
  --peerpriority arg (=0)    Peer priority

- fixed Isle of Refuge client group struct (raids added also)
- new log category Peering
- new LUA Functions AddRespawn(Zone, LocationID, RespawnTime) and CreatePersistedRespawn(LocationID, SpawnType, RespawnTime, ZoneID)
2024-11-18 11:13:04 -05:00
Emagi
48ee02ea90 Fix proc to pop from the stack if isfunction call fails. 2024-09-25 06:52:43 -04:00
Emagi
555045cbe2 reload spells now works with the lua state redesign and we delete spell in the spell_scripts instead of other places (casttimer, active_spells, so on) 2024-09-10 09:14:40 -04:00
Emagi
297c17b177 Changed to have DestroySpells handle luaspell delete instead of active_spells 2024-09-10 08:27:05 -04:00
Emagi
6f8f5016a6 delete of lua spell takes place via remove_all_spells flag in these conditions 2024-09-08 16:40:02 -04:00
Emagi
f6097f490c Update LuaInterface.cpp 2024-09-07 15:54:32 -04:00
Emagi
2ea8088f1e can't risk the out of order for mspells lock and also allowing multiple to traverse the tree 2024-09-07 15:54:05 -04:00
Emagi
950a67ac94 protecting inner mutex with write lock to avoid duplicating the lua state on multiple scripts 2024-09-07 15:19:30 -04:00
Emagi
f85ef5eb61 ret should be set after with the createspellscript 2024-09-07 14:52:08 -04:00
Emagi
98c0aaf73b spell scripts mutex locking fixes 2024-09-07 14:50:01 -04:00
Emagi
fb592b4d76 Update LuaInterface::DestroySpells to assure we cover all the new lua states under the spell_scripts instead of the obselete spells map 2024-09-06 08:17:50 -04:00
Emagi
14003ee3a4 LUA Spell Scripts updated to have a queue much like SpawnScripts, but extended to LuaSpell for tracking procs and lifetime of the lua state
Need to avoid crashes/overrun of the lua stack.
2024-09-04 06:44:04 -04:00
Emagi
56e43288bf function call fixes and resets for procs / call spell process 2024-09-02 19:14:44 -04:00
Emagi
b7802d84db fix lua functions being called that don't exist 2024-09-02 10:01:04 -04:00
Emagi
184bc94aa1 lua function call protection 2024-09-02 09:45:36 -04:00
Emagi
950b8e1564 revert and check if "remove" function exists in script 2024-09-02 09:19:47 -04:00
Emagi
727040d2dd Attempt to fix deleting spells more than once if short durations 2024-09-02 08:15:41 -04:00
Emagi
85c6d48f70 WorldServer Updates
- Added DespawnByLocationID(Zone, Location_ID, Delay) - delay defaults as 0 (instant).
- SpawnGroupByID and SpawnByLocationID will now randomly pull from the locations list of entities, instead of the initial spawn available (iterator 0).
2024-08-17 04:22:52 -04:00
Emagi
ca28e77ae4 Crash fix, new lua function IsSpawnGroupAlive(Zone, Group_ID)
Crash fix for SpawnGroupByID on invalid group, IsSpawnGroupAlive(Zone, Group_ID) added.
2024-08-02 15:51:28 -04:00
Emagi
89194da149 EQ2Emu Source Base July 2024 2024-07-22 08:52:28 -04:00