Commit Graph
100 Commits
Author SHA1 Message Date
luis 68488b66bd change name 2026-04-05 18:24:51 -03:00
luis 3661f50c63 Update playerhousing we need remove namespace
{
    _Create(guid);
    inline void BuildEntityFragments(ByteBuffer& data, std::span<WowCS::EntityFragment const> fragments)
    {
        data.append(fragments.data(), fragments.size());
        data << uint8(WowCS::EntityFragment::End);
    }
}
from housingroomentity and fix later
2026-04-05 18:22:52 -03:00
luis 911789e474 new bot system 2026-04-05 13:17:39 -03:00
luis 61d3ac87cf westfall 2026-04-05 13:01:05 -03:00
luis 57d30f056a dup 2026-04-05 12:33:00 -03:00
luis eac888e8a5 missing traesh scriptloader 2026-04-05 12:29:56 -03:00
luis 5cc9d5e43c Fix 2026-04-05 12:25:27 -03:00
luis ed3527c099 dup 2026-04-05 12:08:30 -03:00
luis b3d1706253 revert all 2026-04-03 21:19:09 -03:00
luis 2275b2d882 try fix crash 2026-04-03 15:01:23 -03:00
luis 3fda963241 typo 2026-04-03 14:53:20 -03:00
luis 0d4d559df6 try fix crash 2026-04-03 14:35:10 -03:00
luis 267a3e3c83 revert commit to check crash 2026-04-03 14:16:09 -03:00
luis 97ad4444c4 Revert "Housing: Add HousingRoomEntity for layout editor, fix interior decor placement"
This reverts commit 45937e7ecd.

# Conflicts:
#	src/server/game/Entities/Housing/HousingRoomEntity.cpp
#	src/server/game/Housing/HouseInteriorMap.cpp
2026-04-03 13:55:16 -03:00
luis f834177a27 comment until agatho fix it 2026-04-03 13:49:46 -03:00
luis eeac07916e init rework 2026-04-03 13:33:24 -03:00
luis e7eda68cb5 fix build 2026-04-03 12:52:54 -03:00
luis c0cf0847f3 typo 2026-04-03 12:41:45 -03:00
luis 45937e7ecd Housing: Add HousingRoomEntity for layout editor, fix interior decor placement
- Create HousingRoomEntity (objectType=18, Housing/2 GUID, fragments [21,31,220])
  for each room in SpawnRoomMeshObjects with MeshObjects array and door data
- Send room entities in deferred callback UPDATE_OBJECT (not initial batch —
  type-18 entities in initial UPDATE_OBJECT crash without full housing context)
- Fix room GUID format: arg2=roomEntryId matching retail (sniff-verified)
- Load rooms BEFORE decor in Housing::LoadFromDB so decor RoomGuid matches
- Auto-assign RoomGuid for interior decor placement when client sends empty
- Add HousingRoomEntity::AddDoor using MutableFieldReferenceWithChangesMask
- Fix SQL hotfix idempotency for trait_tree columns

Implement SPELL_AURA_MOD_SPELL_CURRENCY_REAGENTS_COUNT_PCT
2026-04-03 12:25:55 -03:00
luis 330f6e7603 fix freeze 2026-04-03 11:24:17 -03:00
luis e09f677ba0 init work on dragonriding update 2026-04-03 11:20:03 -03:00
luis 37c2bd1e14 ++ 2026-04-02 21:20:58 -03:00
luis 6fe779653e stormwind and westfall quests 2026-04-02 21:15:53 -03:00
luis 46119ca344 fix crash 2026-04-02 20:54:26 -03:00
luis dca94e188e try fix mem leak 2026-04-02 18:52:33 -03:00
luis 0ea70dfd04 fix mem leak 2026-04-02 17:32:28 -03:00
luis 11f61d1b71 fix pet quests 2026-04-02 16:11:01 -03:00
luis 6f692fe708 Fix missing credit 2026-04-02 15:59:28 -03:00
luis 7c129b5ff6 Fixed pve battlepet 2026-04-02 13:27:53 -03:00
luis 0ca9b21f3c lua fixes 2026-04-02 12:01:16 -03:00
luis 8943d3ae93 Core/Spells: Suppress a few float/double/int conversion warnings in Player::GetSpellModValues 2026-04-02 11:40:55 -03:00
luis baa8a5d992 Only blacklist NPC when 0 quests accepted — allow revisit for multi-quest NPCs 2026-04-02 11:19:40 -03:00
luis 612fd1fc4f core warning fix 2026-04-01 18:12:28 -03:00
luis a7ed1f23b1 move logs to debug 2026-04-01 05:18:53 -03:00
luis 7ca05b3162 Allow repeatable quests once — skip only if already rewarded 2026-04-01 05:17:58 -03:00
luis c8c16e7942 Skip repeatable quests in bot quest acceptance to prevent infinite loops 2026-04-01 05:14:36 -03:00
luis 337a90cc8a Fix quest search looping 10k+ times — add 10s cooldown and always blacklist NPC 2026-04-01 05:13:31 -03:00
luis 953a25817d ++ 2026-04-01 04:57:59 -03:00
luis 56a2bc7bcf delves 2026-04-01 04:23:54 -03:00
luis 7ad5c0f974 rework delve 2026-04-01 04:13:12 -03:00
luis 47858a8f24 fix crash 2026-04-01 02:14:57 -03:00
luis de2070d7d6 Core/WorldStates: Fixed thread unsafe access to realm wide world states 2026-04-01 01:27:59 -03:00
luis 9a5c1349a8 Fix bot crash full 2026-04-01 00:43:11 -03:00
luis 467108c9e9 full fix bot crashes 2026-03-31 21:41:02 -03:00
luis f362ce3842 wrong location 2026-03-31 20:39:51 -03:00
luis 9214c26cb7 Add ThreadSafePathfinder for worker thread navmesh queries
TrinityCore's PathGenerator uses a shared dtNavMeshQuery which is NOT
thread-safe — calling it from bot worker threads causes ACCESS_VIOLATION
crashes in dtNavMeshQuery::getPathToNode.

ThreadSafePathfinder creates per-thread dtNavMeshQuery instances using
thread_local storage. Each thread gets its own query with independent
node pool and open list, sharing the read-only dtNavMesh. This is safe
because dtNavMesh is read-only after tile loading.

API: ThreadSafePathfinder::IsReachable(mapId, start, dest)
- Returns true if navmesh path exists from start to dest
- Creates query on first use per thread per map
- 64-poly path check (enough for reachability, not full pathfinding)

Re-enabled navmesh reachability check in SearchForQuestGivers using
the thread-safe pathfinder instead of PathGenerator.
2026-03-31 20:37:25 -03:00
luis e52591b5be fix 2026-03-31 20:15:59 -03:00
luis 091327bf00 Fix ACCESS_VIOLATION crash in PathGenerator from worker thread 2026-03-31 20:02:04 -03:00
luis 8d78c637fd Convert combat managers to use spatial grid for health reads 2026-03-31 19:46:13 -03:00
luis 741e3b5215 full update opcodes 2026-03-31 17:51:03 -03:00
luis 598b054bed more opcodes 2026-03-31 17:39:03 -03:00
luis dcd9f13034 missing opcodes implementation 2026-03-31 17:31:19 -03:00
luis f43549b385 CMSG_CLEAR_NEW_APPEARANCE 2026-03-31 17:13:20 -03:00
luis aefc60cbbe CMSG_BATTLEMASTER_JOIN_SKIRMISH 2026-03-31 17:08:41 -03:00
luis 1d72fd7232 real fix for unlcok races 2026-03-31 16:54:45 -03:00
luis c700e34a16 fix 2026-03-31 16:45:24 -03:00
luis d26340a39e brawl initial work 2026-03-31 16:42:46 -03:00
luis 8ab1495fc0 enable Wargame and clubs 2026-03-31 16:30:12 -03:00
luis 55e0e0e28d Full club finder 2026-03-31 15:59:08 -03:00
luis 8d5b8d3801 club finder part 1 2026-03-31 15:48:11 -03:00
luis 50326e21ac remove custom 2026-03-31 15:24:56 -03:00
luis 3280daf7e8 fixed ui 2026-03-31 15:21:21 -03:00
luis 603379b61e missing script 2026-03-31 15:06:50 -03:00
luis e138d624ad Fix build 2026-03-31 15:03:36 -03:00
luis 823204831b typo 2026-03-31 14:47:57 -03:00
luis fe70f1adf7 typo 2026-03-31 14:41:10 -03:00
luis 35b9c5a43f missing 2026-03-31 14:25:07 -03:00
luis 767df89695 update opcodes 2026-03-31 14:23:36 -03:00
luis 567847babf char perks 2026-03-31 14:17:41 -03:00
luis c2893e850c fix load 2026-03-31 14:00:39 -03:00
luis d146361a13 new perks more work 2026-03-31 13:59:36 -03:00
luis 5752bec436 rework 2026-03-31 13:54:43 -03:00
luis 0576a685d5 ++ 2026-03-31 13:51:50 -03:00
luis 61f9dee3bf second part 2026-03-31 13:50:12 -03:00
luis e4570bcedc init perk program full part 1 2026-03-31 13:46:54 -03:00
luis 633cb02880 fix allied races unlock as default 2026-03-31 12:38:31 -03:00
luis 1abf91fe16 Convert strategy code to use spatial grid snapshot for bot state
Audit found 200+ direct bot stat reads on worker threads across
strategy files. Converted the highest-impact patterns:

- RestStrategy: NeedsFood/NeedsDrink/IsActive/UpdateBehavior now use
  ai->GetCachedHealthPct() and ai->GetCachedManaPct() from snapshot
- GrindStrategy: Health/mana recovery check uses snapshot
- SoloStrategy: Rest trigger, recovery check, mana check use snapshot
- Strategy.cpp: ShouldFlee health check uses snapshot
- BotAI.h: Added DistanceTo/Distance2dTo helpers using snapshot position

All reads go through BotAI accessors which read from the PlayerSnapshot
populated every 100ms from the spatial grid's main thread update.
2026-03-31 11:54:54 -03:00
luis ce32828b0b Refactor bot state to use spatial grid as single source of truth
Replace the broken cache system (SnapshotBotState ran before
Player::Update so values were always stale) with the spatial grid's
PlayerSnapshot which is populated on the main thread every 100ms
with current data via the DoubleBufferedSpatialGrid.

BotAI now stores a PlayerSnapshot and refreshes it at the start of
each UpdateAI via RefreshFromSpatialGrid(). All accessors
(GetCurrentPosition, GetCachedHealthPct, GetCachedManaPct, etc.)
read from this snapshot. Worker threads get accurate, lock-free data.

Changes:
- BotAI: Replace 5 individual cache fields with single PlayerSnapshot
- BotAI: Add RefreshFromSpatialGrid() querying spatial grid by bot GUID
- BotAI: Add GetSnapshot(), GetCachedIsAlive(), GetCachedLevel() etc.
- RestStrategy: NeedsFood/NeedsDrink/IsActive use snapshot via ai->
- Remove BotSession::SnapshotBotState() entirely
- Remove SnapshotBotState call from BotWorldSessionMgr
- Remove MoveSpline.h dependency from BotAI and BotSession
2026-03-31 11:50:38 -03:00
luis 30ce95c8df Fix build: revert deferred movement, use direct MovePoint 2026-03-31 11:44:58 -03:00
luis 63c0420f71 Fix rest strategy using stale cached health — read bot stats directly
The main thread SnapshotBotState runs in OnWorldUpdate BEFORE
Map::Update/Player::Update, so it captures pre-regen health values.
The cache showed 49.4% while actual health was 100%.

Worker thread reads of bot->GetHealthPct() return correct values
because Player::Update has already run by the time the worker executes.
Reverted to direct reads which are proven correct by the
RestStrategy::UpdateBehavior logs showing health=100%.
2026-03-31 11:34:42 -03:00
luis 71279e581a fix log 2026-03-30 19:20:24 -03:00
luis 9bdecbd8f1 gnomeregan 2026-03-30 19:19:22 -03:00
luis f4cb6ed15b core crash fix 2026-03-30 16:19:38 -03:00
luis b81c494693 ++ 2026-03-30 16:15:38 -03:00
luis 83de9fcfe0 typo 2026-03-30 15:41:16 -03:00
luis 70e2cd591e misc 2026-03-30 15:33:38 -03:00
luis d5c2e13de0 delves entrance 2026-03-30 12:31:08 -03:00
luis f865c6e8d4 typo 2026-03-30 10:46:37 -03:00
luis 25b815387a todo later 2026-03-30 10:43:20 -03:00
luis 8cf6c956f5 Housing: Fix interior editor activation — Status=0 enables editor mode 2026-03-30 10:39:48 -03:00
luis 84d71f17d0 crafting 2026-03-30 10:34:07 -03:00
luis c1d982cbec crafting 2026-03-29 20:54:03 -03:00
luis 86d21e9cfe crafting init 2026-03-29 01:54:54 -03:00
luis 101245f85e ++ 2026-03-29 01:16:08 -03:00
luis 7e1bd9bc5b +++ 2026-03-29 01:03:48 -03:00
luis b9da586319 dragonriding 2026-03-29 00:12:11 -03:00
luis 533d1a96fa fix 2026-03-28 23:23:38 -03:00
luis c861df9970 missing opcode 2026-03-28 23:17:40 -03:00
luis 3cd78179c6 build fix 2026-03-28 22:10:11 -03:00
luis 1444e833ef +++ 2026-03-28 15:59:00 -03:00