308 Commits

Author SHA1 Message Date
Emagi
9f129586fb make sure to memset if the house item info isn't set properly in the database 2025-07-08 13:41:49 -04:00
Emagi
878c422c0f Support house containers being placed inside house. Need to have an appearance set with equip_type as model type/id 2025-07-08 10:32:56 -04:00
Emagi
b0f24aea5d small comments + gnu cleanup 2025-07-04 07:48:40 -04:00
Emagi
cb5371793e reduce MSpawnList writelock from outside the for loop 2025-07-02 14:50:01 -04:00
Emagi
9e1f77e28e HTTP Persistence for world client/server peering 2025-07-01 20:24:15 -04:00
Emagi
93b7620364 Need to also track the not deleted to re-add after attempting a DeleteSpawns loop, need to also release the read lock if we continue 2025-07-01 07:54:58 -04:00
Emagi
40e83f5e2d Redesign of ZoneServer::DeleteSpawns to avoid deadlocks 2025-07-01 07:39:51 -04:00
Emagi
398a4ef1f4 Fixed target type 9 (AE other groups) like Shout getting implied or proper targets
- (Enemy) Players targetting NPCs and their spawn groups
- (Friendly) NPCs targetting NPCs and their own spawn groups
2025-07-01 07:39:16 -04:00
Emagi
bc925887ad Fixed missing return for /activequery 2025-06-30 11:16:01 -04:00
Emagi
1ba65aba78 DB async query synching to peers, code/logging cleanup 2025-06-29 14:03:23 -04:00
Emagi
2a133292b0 Deadlock fix for adding pending spawns, zoneserver.cpp cleanup 2025-06-29 06:48:30 -04:00
Emagi
260a48be1e Fix #38 address issues with food/drink cross zone
Custom spells now survive cross zone with their modified spell stats saved to the database for reloading later.  The design is such that a spell can be custom defined for its spell stats, but a character/player cannot have more than one of that spell (eg. food can share a spell id since only one food can be applied to you, but you can't have many spells apply using the same custom spell id).

CREATE TABLE character_custom_spell_dataindex (
    charid INT UNSIGNED NOT NULL,
    spell_id INT UNSIGNED NOT NULL,
    idx INT UNSIGNED NOT NULL,
    type ENUM('int', 'float', 'bool', 'string') NOT NULL,
    value1 TEXT,
    value2 TEXT,
    PRIMARY KEY (charid, spell_id, idx)
);

CREATE TABLE character_custom_spell_display (
    charid INT UNSIGNED NOT NULL,
    spell_id INT UNSIGNED NOT NULL,
    idx INT UNSIGNED NOT NULL,
    field VARCHAR(64) NOT NULL,
    value TEXT,
    PRIMARY KEY (charid, spell_id, idx, field)
);

CREATE TABLE character_custom_spell_data (
    charid INT UNSIGNED NOT NULL,
    spell_id INT UNSIGNED NOT NULL,
    field VARCHAR(64) NOT NULL,
    type ENUM('int', 'float', 'bool', 'string') NOT NULL,
    value TEXT NOT NULL,
    PRIMARY KEY (charid, spell_id, field)
);
2025-06-26 18:27:35 -04:00
Emagi
11a6a80647 Fixed CheckRemoveTargetFromSpell we should handle RemoveSpawnFromSpell outside MRemoveTargetList lock 2025-06-23 13:19:12 -04:00
Emagi
e54ed5e730 make sure spell data exists for the spell to check detrimental 2025-06-22 13:41:18 -04:00
Emagi
a8eb9c9ebc Extensive changes to remove SpellTargets write and read mutex locks to avoi ddeadlocks 2025-06-22 13:20:07 -04:00
Emagi
6b0f551552 fix mishandling of the ProcessSpell return, we need to return false if we fail to call the lua function correctly 2025-06-22 08:55:11 -04:00
Emagi
c25ac12cd6 Make sure all spell references are removed when a spell is removed from an entity 2025-06-21 21:13:45 -04:00
Emagi
31e8f782ce MoveInZone was causing inconsistencies since client was desyncing, we will do a full zone, fixed CheckTransporters to not send you to safe location 2025-06-21 21:13:14 -04:00
Emagi
6f3dc5119a Avoid transporters triggering repeatedly after a destination is selected 2025-06-20 09:49:44 -04:00
Emagi
6b22386ef6 #37 Fix north qeynos temple of life, ForceZone transport_type added to transporters table see comment for table updates.
ALTER TABLE transporters
MODIFY COLUMN transport_type ENUM('Zone', 'Location', 'Generic Transport', 'Flight', 'ForceZone')
NOT NULL DEFAULT 'Zone';

This provides the north qeynos teleporters for Temple of Life to work as zone points (with code update):

update transporters set transport_type='ForceZone' where id=43;
update transporters set transport_type='ForceZone' where id=44;
2025-06-20 09:17:25 -04:00
Emagi
08204186c8 Stop spells being put on hotbar that are not supposed to be visible like archetypes 2025-06-20 07:45:22 -04:00
Emagi
2b36a05a1c Reduce log spam in the world server 2025-06-20 07:36:48 -04:00
Emagi
42f776168f Additional check for players to avoid adding spell effects to db that are HO with no icon/duration 2025-06-20 07:36:27 -04:00
Emagi
108af53730 avoid adding heroic op spell effects (usually have no icon set) with no duration to the spell effects (ends up adding them to the db unnecessarily) 2025-06-19 18:53:48 -04:00
Emagi
41a8f5ca31 #34 address hail facing direction, we were changing the heading before setting the runback info 2025-06-19 08:03:01 -04:00
Emagi
9fbae149d8 DoF and KoS clients support quantity in the quest offer/accept windows, AoM does not show quantity so it has to be sent differently (earlier clients were not considered as it is not really vital) 2025-06-18 20:14:16 -04:00
Emagi
8be57ce9eb #35 world peering limit client to one character active, only recover linkdead 2025-06-18 18:28:39 -04:00
Emagi
712b5ebf3f Fix flight paths for KoS, DoF clients. Working around by sending the single flight path due to indexing issues with the client. 2025-06-18 17:04:13 -04:00
Emagi
0f5cfddf89 fix compile bug 2025-06-18 16:49:04 -04:00
Emagi
f03069a475 Update SpellProcess.cpp 2025-06-17 08:42:31 -04:00
Emagi
f71807da37 Update ConsoleCommands.cpp 2025-06-17 08:20:06 -04:00
Emagi
a6a0ca85ef Crash fix on spell deletion, remove from pending spells if we already plan to delete 2025-06-17 08:14:10 -04:00
Emagi
aa70c950b8 Don't allow an account to have multiple characters logged in at the same time unless admin status > 100 2025-06-17 08:13:16 -04:00
Emagi
ac15c6b9f7 Fix items after "obtained" because RemoveItem can be called making the Item Ptr dead. 2025-06-15 19:14:44 -04:00
Emagi
f4eb56e978 Clean up of RangeAttack a bit more 2025-06-15 19:13:29 -04:00
Emagi
8aae88ca4f Fix #32 do not reference ammo pointer after deleting item 2025-06-14 08:02:49 -04:00
Emagi
920ea11961 misc code cleanup 2025-06-14 08:01:58 -04:00
Emagi
d5e19e145c dead client ptr protection 2025-06-13 19:53:32 -04:00
Emagi
4c60615c39 Lua Functions DeleteQuest, DeleteAllQuests added (Fix #29). Ward crash issues (Fix #30). Item Scripts now auto bug report to bugs table (Fix #31).
Fix #29 - DeleteQuest(Player, QuestID, ForceDelete) and DeleteAllQuests(Player, ForceDelete) added.
Fix #30 - Ward crash protection
Fix #31 - track item scripts missing on food/drink auto bug report
2025-06-13 19:52:37 -04:00
Emagi
1176a16d43 Revert "Going to still check wards if the caster is not who we are currently checking wards on (eg. not self)"
This reverts commit 2677fc5fac7d53ec9a4505a1c5f58ef4cc79dac4.
2025-06-12 15:17:12 -04:00
Emagi
2677fc5fac Going to still check wards if the caster is not who we are currently checking wards on (eg. not self) 2025-06-12 15:15:25 -04:00
Emagi
9038e3a2ff Fixed a deadlock if a spell ward had redirect damage for self, it kept looping into CheckWards on the victim 2025-06-12 14:46:42 -04:00
Emagi
25f71b36be Fix lack of mutex locking when serializing the player profile 2025-06-12 13:59:44 -04:00
Emagi
a73c6386eb Fix locking of equipment so that we don't add changed spawns causing a hangup 2025-06-12 13:59:21 -04:00
Emagi
1dbfa3cc7b check that the spell id is set and isn't 0xffffffff 2025-06-12 13:59:02 -04:00
Emagi
8b48f9f902 Fix persist through death for things like food/drink spell effects 2025-06-12 09:49:04 -04:00
Emagi
e79cffd658 Address sending bogus spell effect icon data to the client in the Spawn Info packet. 2025-06-09 14:05:08 -04:00
Emagi
77971f36a2 removing since logging isn't available in this class at the moment 2025-06-08 15:19:11 -04:00
Emagi
fc9d92e98e Update WorldWeb.cpp 2025-06-08 14:56:56 -04:00
Emagi
82a5e96000 Work in progress for 0.9.9 so far (making its own branch for now)
- Fixed a repeated rubberband like behavior that Spawn's would run forward toward their target in combat or on their return run to their starting point.
- WS_HearCastSpell for 546-561 version has an extra byte at the end of the packet we were missing (might be in later clients too have to confirm)
- PlayerScripts support added, new function calls, AddTimer support for Players.
- Static Zones / Special Zones will now silently check to startup zones without reporting the log message, log message only on startup or taking on peer leadership.
- Broadcast and Global Announcement are now supported through peering.
- Fix #22 identified a number of loose spawn pointers and changed to int32 spawn id reference.
- Fix #1 support for all known chat codes for various channels, spell casting and damage.
- In conjunction with Fix #1 spell combat messages are fixed, no longer 'YOU cast' when another spawn casts, added last_tell_name to track the chat code %RT server side.
- size_mod added to InfoStruct Float, supports shrinking and growing Non Player's. InfoStruct also has a UINT ignore_size_mod_calc set to 0 by default, when 1 it will let you set the size_mod and items/spells will not override it from stat calculation.
- XP Table is now static (global) in the Player class so we do not constantly call the database each time the player needs to know a level's XP requirement.
- Removal of duplicate spell cast success and effect messages.
- Fix #21 blue xp bar for KoS and DoF displays properly now.
- GetExpRequiredByLevel(level) added to return the EXP required for to reach the level.
- Fix #25 teleporters cleaned up during /reload spawns to avoid crash
- Fix #16 /reload items supported in peering mode.
2025-06-08 14:53:52 -04:00