60 Commits

Author SHA1 Message Date
Emagi
6401247809 Chat channels (join channel, send messages) and house peering capabilities 2025-08-30 09:29:46 -04:00
Emagi
9871d5cee1 Update client.cpp 2025-08-27 22:12:50 -04:00
Emagi
00ed1f99a9 Don't allow food/drink to be consumed while dead 2025-08-27 22:04:14 -04:00
Emagi
e0356472d6 address respawning/zoning with wrong grid id 2025-08-20 11:55:15 -04:00
Emagi
d593ceafff Added playerscripts lua function on_level_up_complete called at the end of level change
returning -1 in the global.lua for on_level_up_complete will abort the zone script if necessary
2025-08-18 17:44:12 -04:00
Emagi
fae7cf7773 character properties not hard coded are now dynamically fed into the info struct string, we can now SetInfoStruct(Player, "somevar", "avalue") and it will save to the DB to persist cross zone with GetInfoStruct(Player, "somevar") 2025-08-18 13:56:53 -04:00
Emagi
4e077ed3d8 make sure the client GetCurrentZone pointer is valid for SendFriendList and SendChatRelationship 2025-08-17 10:44:51 -04:00
Emagi
fd2a9566fe Disabled/Removed DumpPacket, Logging, Type-casting cleanup 2025-08-17 08:46:05 -04:00
Emagi
277cdc24bc protection around use of GetCurrentZone in client packets 2025-08-16 08:08:55 -04:00
Emagi
807b7f254b Avoid crashing when HandleHouseEntityCommands is called with no current zone, make sure zone id and instance id are set immediately when zoning in the group member info 2025-08-16 07:43:58 -04:00
Emagi
a7260e9f72 Keep player at same Y position and grid_id (added new column to characters table) to address falling through objects after logging out
DB Update:
alter table characters add column grid_id int(10) unsigned not null default 0;
2025-08-13 09:57:27 -04:00
Emagi
2515b55e56 Disable the zone enter timer until we need it later on in the client process 2025-08-09 10:30:05 -04:00
Emagi
5d1dbf962d Zone in process for player is now delayed until player is no longer on pending spawn list, assures player_entry is called after and spells bonuses are properly assigned to the player. 2025-08-09 08:36:44 -04:00
Emagi
1c61c95f4a Fixed if we do not call obtained (potential of removing item) we skip the item_deleted task because the item could not have been deleted (and there is no lua data to validate it anyway since the runitemscript failed) 2025-08-08 19:46:36 -04:00
Emagi
6a6573e339 Addressing a number of coincidental lock conditions with removing a dead spawn (out of order), clearing hate (deadlock due to early dead spawn removal), saving a player to database (before player loaded) 2025-07-31 18:38:39 -04:00
Emagi
9e255408ce misc cleanup 2025-07-29 18:44:34 -04:00
Emagi
8838ca9b2b Don't send message to players when we can't update shop window 2025-07-27 17:39:28 -04:00
Emagi
f60d261f00 Vault, Broker support for DoF, KoS, AoM. Shop support for DoF, KoS.
Broker/Vault (Fix #10):
- Traditional broker integrated (/frombroker), GM itemsearch is still available via /itemsearch.  AoM client cannot sell/use shop, can only buy from broker.
- DoF and KoS client now support House Shop (sell inventory, vault to broker).
- House containers now function like actual containers and can be stored in the vault which will allow placement in the home (to serve as a merchant).
- Sales crate merchant windows in player houses implemented for broker.
- Peering URI's added for broker/shop support: /addseller, /removeseller, /additemsale, /removeitemsale
- House vault and vault slots implemented for DoF, KoS and AoM clients.

Stability and Functionality:
- World Database now has seq_character_items (Sequence) to sync self and peers instantiating new unique IDs for character items.  This is to avoid conflict/overriding another unique id.
- spawn and spawn_houses tables have a lua_script that can now be defined outside the existing spawn_scripts table for a singular spawn.
- Fixed a watchdog/hangup when clearing hate lists inside a spawn list lock.
- Item unique id is being transitioned to int64 (although older clients still only support int32, clients later on are int64).
- Fixed so that spells that have no duration will no longer be added to maintained effects.
- Fixed spell cleanup, maintained effect does not remain on the Player causing a crash.
- Fixed spell conflicts to that check all targets are applicable for the spell.
- Fixed issues with maintained effects or spell effects stacking repeatedly.
- Fixed assigning items to non inventory slots when 'adding' an item to the Player.
- Fixed locking orders between maintained effects and spell effects to avoid deadlocks.
- Fixed entering house and visiting houses, targetting of the house door is now enforced server side.
- Item locking is now enforced by the type of locking (eg. house placement, crafting, shop list for sale).  Locks no longer override/interfere with each other.
- Additional logging around spell casting and targets.
- Spawns/Objects/Widgets so on related to houses now have their own sub tables _houses, eg. spawn_houses, spawn_npc_houses, spawn_object_houses, so on to avoid conflicting with existing tables non-house.

- new LUA Functions:
	ShowShopWindow(Player, FromSpawn) - opens shop window for player (if in their house) for listing, pricing items, retrieving sales log and coin, etc.
	SetSpawnHouseScript(Target, LuaScript) - Utilized in the item script 'placed' function to set the spawned house item's lua script.
	SendBook(Target, ItemID) - Sends the book to the target player based on the item id.
	GetPickupItemID(Spawn) - Gets the item id that the house spawn would represent
	SetHouseCharacterID(Spawn, CharID) - Sets the house spawn character id (should be used on Spawn).  Set CharID to 0 to set to the current houses character id.

- Updated LUA Functions:
	StartHeroicOpportunity(Caster, ClassID, OverrideTarget)  - OverrideTarget now available to change the heroic opportunity target
	HasItem(Player, ItemID, IncludeBank) - No parameter change, include bank, which serves as 'all' should now work correctly (previously did not check bank/other negative slots),  default is false.

- Slash Commands Added:
	/sle - Fix #41, Set Location Entry (DB command for setting spawn location entry values such as offsets and overrides)
	/store_list_item - used to list an item for broker shop
	/store_set_price - used for setting items price for shop
	/store_set_price_local - used for inventory items price for shop
	/store_start_selling - Begin selling from inventory for shop
	/store_stop_selling - Stop selling from inventory
	/store_unlist_item - used to unlist an item from broker shop
	/close_store_keep_selling - Closes store shop window, but keep selling from inventory while in house
	/cancel_store - cancel selling from inventory
2025-07-26 07:10:07 -04:00
Emagi
1ba65aba78 DB async query synching to peers, code/logging cleanup 2025-06-29 14:03:23 -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
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
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
ac15c6b9f7 Fix items after "obtained" because RemoveItem can be called making the Item Ptr dead. 2025-06-15 19:14:44 -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
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
Emagi
97d1393627 Fix #19 Position updates ignored when dead, new rule MiniDing, fix
Fix #19 - ignore position updates when dead
New rule R_Player MiniDingPercentage
Fixed ordering of locks in RemoveSpawn
ResetSpawnPackets function created to test resetting the spawn packet to a spawn (testing purposes only not live code)
2025-05-30 21:47:57 -04:00
Emagi
ec2c99d175 Fix equip/unequip with calculations causing a potential watchdog 2025-05-28 14:33:34 -04:00
Emagi
4f04033e97 Fixed calculating bonuses for items when equipping and unequipping 2025-05-25 14:02:46 -04:00
Emagi
13e10b315d KoS and earllier client fixes + server exploit fix
- Can now use equipped charms (previously did not work had to use from inventory)
- Fixed charges not decrement when equipped for all clients (they had unlimited charges!!)
- Fixed click / interacting with ground spawns, doors, so on.  Some objects may need a default setting since the older clients don't send the entity command where new clients do.  Made a fallback structure WS_EntityVerbsVerbBackup for when that happens.
2025-05-06 18:38:43 -04:00
Emagi
0aa8da426b Visual effect for level 50 is 323 2025-04-30 12:49:53 -04:00
Emagi
ce6ad0e2a3 Fix #2 - Spell tier data not sent correctly to client
- KoS and earlier clients now show appropriate tier data after logging in
- AoM additionally shows tier data correctly, after skill info request for spells we send the spell data back so the client does not later ask for the spell data also.
2025-04-12 10:26:02 -04:00
Emagi
1268ecbc94 Fix Issue #3 - Class Updates, Name Updates to LS
Support added for class updates to LoginServer when adventure class is updated (such as commoner to sub class, so on).

Name change for GM command /name support added for LS update.  This is a use at your own risk command and you will have to /camp to fully reflect your name update.
2025-04-11 09:49:18 -04:00
Emagi
61aec683b5 revert SendShowBook to fix /spawn details and other use of the book pages 2025-03-21 11:21:31 -04:00
Emagi
fd147a0fd0 LUA Function Added HasPendingQuest(Spawn: Player, Int32: QuestID) 2025-03-21 08:48:50 -04:00
Emagi
71217ce0ec Provided a update to quests to have a persisted status
alter table character_quests add column status_to_earn int(10) unsigned not null default 0;
alter table quests add column status_to_earn_min int(10) not null default 0;
alter table quests add column status_to_earn_max int(10) not null default 0;
2025-03-15 15:31:02 -04:00
Emagi
e0943377df spawn details fixed after cygwin change 2025-03-10 14:40:46 -04:00
Emagi
54a215d1ba code warning fixes 2025-03-05 08:37:52 -05:00
Emagi
1c35309538 fix behavior on zoning for clients to not impact other players 2025-02-09 19:06:49 -05:00
Emagi
79a010e055 disable bank / shared bank in trade and also sellitem 2025-01-26 15:16:27 -05:00
Emagi
3e447db611 fix some bad multipliers for the current xp of the level 2025-01-13 09:21:37 -05:00
Emagi
82a1885887 Added classic spell level support (aka mini ding spells) like warrior getting knee break at lvl 19.6 2025-01-13 09:06:11 -05:00
Emagi
9b60035656 LUA function Resurrect updated with 8th and 9th argument for revive_sickness_spell_id and revive_sickness_spell_tier respectively. Fixed avoiding crash with bad spawn ptr if resurrect caster left zone. 2025-01-11 09:22:25 -05:00
Emagi
e3e0e8b8fe fix and restrict selling to city merchants, must be in a guild to get status and in the level range, selling will get no status 2025-01-10 20:02:22 -05:00
Emagi
1cc7d22a44 support flight paths in KoS and earlier clients, also start of showing loot to other group/raid members 2025-01-04 15:24:02 -05:00
Emagi
2afc0b8e92 Allow players to re-enter the original duplicate zone with the transporter selection dialog 2024-12-27 09:04:18 -05:00
Emagi
314fc8396c Added tracking of zone duplicate id (when its a public zone) to the characters table. We will now properly persist to the respective zone when a public zone becomes instanced. 2024-12-23 17:43:58 -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