Commit graph

1865 commits

Author SHA1 Message Date
Emagi
427964b7a0 Functionality:
- Corner cases with examine inventory in DoF resolved.  Now tracked through a max index id to avoid mis-indexing an item as "new" to the client array or building on the old array the client has already created (items get removed/added/so on, but this max id remains unchanged from the initial zone-in).
- Unfriendly spells are now removed from Entity/NPCs when ClearEncounter is called
- Food/Drink can be accessed equip/unequip on DoF client.

Performance:
- Improvements to ProcessMovement loop
- lua interface process cleanup now handled at World level (since zones may not be running to process it).  Every zone used to call lua process (ick).

Memory leaks:
- Spells no longer leak into memory (NPC spell lists, player spells and passive spells)
- Player languages no longer leaks memory
- No more memory leak from player mail
- Fixed memory leak in Map loading of V3
- item memory leak fix with lore conflict/no space in inventory
- Addressed a hangup issue shutting down the world server in that pthread_cond_destroy(&cond) cannot be called until pthread_cond_broadcast(&cond) is called first
2023-12-15 19:56:33 -05:00
Emagi
72a43fdbb4 OK FrostfangSea and some other huge exceptions for NPCs, restrict the attackable flag to bot, client and their pets 2023-12-11 06:32:10 -05:00
Emagi
3a256b21cc Remove the NPC->Player side of the check for attackable, allows statues or other npcs to aggro and attack you, but you cannot attack them 2023-12-11 06:12:45 -05:00
Emagi
486f8affdb temporarily removed debug logs due to compile error 2023-12-10 08:40:53 -05:00
Emagi
479e6ede00 Merge branch 'master' of https://git.eq2emu.com/devn00b/EQ2EMu 2023-12-10 08:20:48 -05:00
Emagi
e10aedb79d - Fix #549 - DoF inventory can now remove/add items freely. The lower bounds index <=255 is assigned to existing items on zone-in or replacing items in that existing index. Indexed items 256+ will represent new items that have to grow the clients item index array. This will distinguish properly what the client is trying to examine when requests come in (versus getting no index).
- Fixed server crashing trying to send spawn packets when handling a bad version of the client entering zone (or malformed packets causing bad versioning).
- Character History is now only saved on requirement, reduced DB load.
- Avoidance of reuse for Query class as it can cause crashes
- Fixed a potential issue with AoM/DoF inventory, in which it would continually build up the array instead of re-using the first slot, eventually causing the client to crash
2023-12-10 08:20:29 -05:00
Devn00b
b75bf5ecc1 Update Login EXE. 2023-12-05 12:21:53 -08:00
Devn00b
22599e4a2e Update World EXE. 2023-12-05 12:17:05 -08:00
Emagi
480c61f7e5 Avoid reuse of Query constructor for runquery or else it will crash 2023-11-26 21:09:06 -05:00
Emagi
8af42886a0 inherit orig cast time 2023-11-25 20:05:57 -05:00
Emagi
8484c78ca2 Remove unnecessary if statements, address spell cast time stacking, some misc pieces missed from last patch like attack state of npcs 2023-11-25 10:34:02 -05:00
devn00b
d8c6d8e6c9 Fix for the last fix, that wasnt a fix (Setting char data_struct_char = true) 2023-11-24 11:01:54 -08:00
devn00b
53520b70d5 Fix for compile error on newer linux installs 2023-11-24 10:46:00 -08:00
Emagi
d32141898e - ZoneServer::GetClientBySpawn removed, no longer using the MutexMap to track the client, use the Player class instead.
- Addressed a crash cancelling a player trade
- Addressed a crash with spawn change packets overflowing during Pack()
2023-11-19 09:25:25 -05:00
Emagi
f6354ca3ef checking tier is redundant and won't help here, will break things more 2023-11-18 07:29:25 -05:00
Emagi
e83b8ea13d Fix #550 - recast timers are accurate with UI and data, linked timers no longer indirectly impact recast time incorrectly, we do not call self spell on linked timer 2023-11-18 07:21:42 -05:00
Emagi
d123ce8904 Hot fix to address spell resisting and can no longer recast 2023-11-17 15:26:56 -05:00
Emagi
2dc28cb438 restore setting the cast speed 2023-11-12 13:39:36 -05:00
Emagi
3944d57579 - Fix #496 ITEM_STAT_ABILITYCASTINGSPEED (664) and ITEM_STAT_SPELLREUSESPEED (665) now supported
- Fix #109 Soulrend does not knock down target (finish spell cast, ZoneServer::SendCastSpellPacket spell_visual is disabled) when no damage applied
* alter table character_spell_effects add column has_damaged tinyint(3) unsigned not null default 0 after resisted;

- Fix #536, SpellDamage now can drain power.  Also Fixed AoM and DoF client WS_HearSiphonSpellDamage
- SpellDamage LUA Function now returns a boolean whether damage is dealt (or spell resisted) -- (true is damage/false is no damage or resisted).  See Spells/Fighter/Crusader/Shadowknight/Soulrend.lua for a sample.
- DamageSpawn LUA Function now returns a boolean whether damage is dealt, updated to allow take_power argument DamageSpawn(Attacker, Victim, victim, type, dmg_type, low_dmg, high_dmg, spell_name, crit_mod, is_tick, no_calcs, ignore_attacker, take_power)
- new LUA Functions (both can be used in and outside of a LUA Spell):
        * SpellDamageExt(Target, type, min_damage, max_damage, crit_mod, no_calcs, override_packet_type, take_power, class_id_reqs...) -- extends support for take_power field (SpellDamage function does not have this and would break other potential spells)
        * SendHearCast(Spawn, spell_visual_id, cast_time, Caster, Target) -- lets the Spawn see a spell visual on Target.  If Caster is not defined, we use Spawn, same goes for Target.
- Fixed WS_HearHeal struct for DoF client (displays critically heal vs heal) and proper spell name.  DoF does not support absorb or other types.
- Support for translation of spell_visual (spells table) aka spellcast.dat from assets vpl.

CREATE TABLE `spell_visuals` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(128) DEFAULT NULL,
  `alternate_spell_visual` varchar(128) DEFAULT NOT NULL '',
  `spell_visual_id` int(10) unsigned NOT NULL DEFAULT 0,
  `min_version_range` int(10) unsigned NOT NULL DEFAULT 0,
  `max_version_range` int(10) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
** MAKE SURE TO GET spell_visuals sql included with update inserted!

- Fixed right-click inventory examine (again?) - tested and it is working for main invetory, bags and items in bags!
- DoF bags support up to 36 slots now instead of the restricted 20 for "classic" client
- DoF and classic equipment restricts to 22 slots instead of trying to send client 25 slots (the additional do not exist)
- Fix crash on signs due to lack of nullptr check on entity_command
- SetInfoStructString / GetInfoStructString now supports combat_action_state -- can be used without overriding action_state outside of combat.
2023-11-12 13:19:59 -05:00
Devn00b
20795c5a6b SQL for sign marking implemention 2023-11-07 14:56:49 -08:00
Devn00b
1ea4536d05 First revision for marking signs. Issue #403. TODO: Refresh after marking, and timed remarking. 2023-11-07 14:47:20 -08:00
Emagi
7324c9a462 - Fix #544 - login server now correctly loads skin color for appearance data in character select, matches in-game color.
- AoM and DoF now properly sync their appearance properties (hair, face, chest, legs).  This is limited to classic (non-SOGA).  SOGA will be reviewed in Issue #443
- Fixed inventory being unable to move items around after moving a equipped item to inventory
- DoF: Ranged weapons now properly display in examine, this means they also work in quest accept display windows(Hawk Hunt quest).
- Fixed merchants freezing up on DoF client.  DoF and earlier disabled the merchant flag in serialization of items (different structures that were not updated for DoF).
- Disabled item types in DoF (not supported): 'Thrown','House Container','Adornment','Profile','Pattern Set','Item Set','Book','Decoration','Dungeon Maker','Marketplace','Reward Crate2','Infuser1','Infuser2','Experience Vial','Overseer'
- Fixed DoF client crash with merchants (eg. Scion of Khaalista in NorthFreeport).
- DoF bauble items set to generic item packet until structure is properly identified.
2023-10-22 22:01:17 -04:00
Emagi
14a74a1f45 - Fix #542 - DoF will now properly roll/pitch spawns/objects as expected
- Fix #538 - Item quest offer color and part of quest color mapping corrected
- Fix #519 - DoF broker now supports multiple pages, properly displays item name in the field area expected.
- Fix #518 - DoF client mender / repair fixed.
- Negated Control Effect 32 from DoF client, was causing low gravity when safe fall was on a spell.
- Fixed some LUA Functions handling of dead pointers and cleanup of the LUA stack.
- Fixed SpiritShard.lua to convert the timestamp to numerical from string
- Fixed a memory leak on PacketStruct handling of WS_Resurrected
- Fixed being dead allowing you to move around/jump on DoF client
- Fixed DoF control flags when revived/resurrecting to allow movement again
- Fixed reviving not setting HP and leaving player as a corpse (in any client)
- Fixed LUA Function SetSpellData, it was resetting the stack before we pulled the variable so we got no variable data
- DoF client restricted to 20 slots for backpacks (by client limitation, enforced server side to avoid bugs)
- DoF bagged inventory now behaves correctly (bags were only showing items up to the 11th slot on login, DoF supports up to slot 20)
- Fixed mender having NO_RENT flag checked incorrectly not allowing individual repair of items (was checking flags vs flags2)
2023-10-10 22:56:27 -04:00
Emagi
0536363511 remove spells copy 2023-10-10 22:52:38 -04:00
Devn00b
71e0c8661b Updated windows EXE 2023-10-09 08:28:40 -07:00
Devn00b
0f5ef8615b Merge branch 'master' of https://git.eq2emu.com/devn00b/EQ2EMu 2023-10-06 11:27:58 -07:00
Devn00b
f38b6fb788 Fix for issue #242. Added GetCanEvac/SetCanEvac lua function. Example code found in server/spells/scout/escape.lua 2023-10-06 11:25:59 -07:00
Emagi
ace2e20281 - Fix #537 - DoF client health, power, concentration display on items correctly, AoM and DoF client no longer have issues with hide hood/helm in options impacting self and other options
- Fix #434 - AttackAllowed now checks for attackable against NPCs.  Added more AttackAllowed checks around AE/Enemy target to avoid non-attackable npcs
- Fix #531 - DoF house support, AoM client also fixed inside house for door widget
- Fix #543 - Addressed AE/other spells including unattackable spawns
- Support for LUA Function InFront(Spawn, Target)
- Fix AE max targets exceeding cap
2023-09-30 22:02:11 -04:00
Emagi
523e98c2c5 - Fix #533 - Group support for DoF, fixed /acceptinvite and group member display
- Fix #541 - Support for world server to use non-3306 port for mysql by using port=3307 in world_db.ini
- Fix #540 - Added GetDifficulty(Spawn) command.  No longer do spawns have a "encounter_level" all translated to "difficulty"
- HateList now no longer allows negative hate from deaggro
- more protection on player_quests to avoid crash
2023-09-23 16:12:04 -04:00
Emagi
a793c71f51 Merge branch 'master' of https://git.eq2emu.com/devn00b/EQ2EMu 2023-09-11 19:17:36 -04:00
Emagi
955f90a55d - SpawnScripts/Generic/SpiritShard.lua shard expiration updated to assure the values are integer based
- Disabled ClearDataMsg going to AoM+ clients, not a valid opcode (100)
- HO Spell logs moved to debug, previously was error
- Prevent zone shutting down state from causing a crash when running spell process -> procs (we no longer run any spell processing during zone shutdown)
2023-09-11 19:17:24 -04:00
devn00b
be4cc5e576 Windows World EXE Update 2023-09-10 11:03:43 -07:00
Emagi
4d4873d674 - Fix #515 display spawn name and database id when /spawn set or /spawn remove is used successfully.
- Fix #534 when drowning death occurs, proper kill message (kill blow type 10) is sent to clients for appropriate 'glug glug' message.
  * AoM client WS_HearDeath structure fixed, blow type was in wrong place
- Addressed a number of memory leaks in handling of packet structures through configReader.getStruct and LoadPacketData
- Addressed buffer overflow of packets trying to match opcodes that do not exist (beyond bounds of the opcode list)
- Addressed issues with trying to read memory in packet data when a packet is not loaded correctly, where we should instead bypass and just delete the bogus packet (avoid crash)
- Tracking icon for DoF set to 231
2023-09-06 19:34:44 -04:00
Emagi
5cc42192a5 Fix #524 - DoF client part #3, plus crash fixes (reload spells, entering zone shutting down)
- Addressed DoF inventory causing items to be put in the wrong slot or disappearing
- Fixed instances serving a client a zone currently shutting down
- Added more enforcement of the client count for a zone so it does not prematurely shutdown when a client is entering the zone
- Addressed NPCs in DoF client "looking at" them when they should not.  "interaction_flag" in SetInfoStructUInt(Spawn, "interaction_flag", 255) will now enforce not looking at a player.
- resolved /reload spells crash
- Control Effects now work for DoF client
- /flymode now supports values 1 and 2.  1 = flymode, 2 = noclip + flymode.  DoF client flymode is not the same as AOM, it doesn't support up/down/jump
- added /gm controleffects (select entity target) will display their active control effects
- DoF client: can now right-click examine items in base inventory and inside bags of inventory
- can no longer put bags inside of other bags
- fixed the classic icons for collecting, fishing, gathering, foresting, mining, trapping, tracking put in temp icon until we determine right one.
2023-09-02 19:41:15 -04:00
Emagi
dcf5bf4bdc Fix crash when attempting to equip something with no slot assignment, incorrectly defined item in the database. Also HasQuest LuaFunction has been updated to avoid incorrectly accessing player_quests without locking 2023-08-28 08:45:36 -04:00
Emagi
0d876665aa Even more player_quests null fixes to avoid crashes 2023-08-21 19:22:27 -04:00
Emagi
0c159c153b additional housing packet fix 2023-08-21 19:18:06 -04:00
Emagi
7f809a5b79 Crash fix for housing packet and checking quest flag on dead quest, finally fixed character_history needs to escape location before going in db 2023-08-21 19:16:07 -04:00
Emagi
f720513876 DoF Recipe/Tradeskill Stage 1 of 2 for Issue #532
- /info command now has recipe_product support
- /delete_quest crash fix
- knowledge sorting for DoF client now supported (ability book cannot be resorted in DoF)
- fixed copying of Recipe::Recipe class
- OP_RequestRecipeDetailsMsg and WS_RecipeDetailList support for earlier clients (DoF and probably similar classic)
- fixed HandleExamineInfoRequest to properly map the "id" for DoF client
- Quest mutex updated for pending quests to avoid crashes
- PacketStruct::serializeCountPacket better defined for larger sizes
2023-08-16 11:38:03 -04:00
Emagi
7ac81a6b99 No damage should still add aggro 2023-07-29 15:54:33 -04:00
Emagi
e8a22654b5 Merge branch 'master' of https://git.eq2emu.com/devn00b/EQ2EMu 2023-07-29 15:52:43 -04:00
Emagi
006b6ac924 Fix encounter not adding a player if they one hit the target 2023-07-29 15:52:32 -04:00
devn00b
804c5d05f4 Update to windows EXE 2023-07-28 16:08:30 -07:00
Emagi
3fbe306f51 Try to avoid deadlock with spell targets 2023-07-28 18:26:55 -04:00
Emagi
ee4dd24510 If Player has a dead spell that cannot be loaded from DB wont crash when resorting spell book 2023-07-28 06:44:58 -04:00
Emagi
9eeeb1e012 Disable second ear slot for DoF and earlier clients 2023-07-26 19:59:09 -04:00
Emagi
54775d0327 Going to additionally avoid calling lua removespell on zone shutdown 2023-07-05 16:08:52 -04:00
Emagi
8ef5843d7a Slight mod for crash fix 2023-07-05 15:24:07 -04:00
Emagi
7f60455b51 Address delete spells of npcs causing crash on zone shutdown 2023-07-05 15:14:21 -04:00
Emagi
b60a90aa10 Merge branch 'master' of https://git.eq2emu.com/devn00b/EQ2EMu 2023-07-05 07:39:57 -04:00