Commit Graph
100 Commits
Author SHA1 Message Date
luis 1d444ee8f7 Housing: Deep-dive initiative improvements from sniff/IDA analysis
Sniff analysis (223 packets across 12 .pkt files):
- Confirmed SMSG_INITIATIVE_SERVICE_STATUS wire format (1 byte, 0x80)
- Activity log responses contain packed GUIDs with double contribution scores
- Player initiative info uses float scale (ProgressRequired=1000.0f)
- Task progress is neighborhood-wide aggregate (confirmed by sniff values)

IDA binary analysis findings implemented:
- Add 8 new enums: NeighborhoodInitiativeUpdateStatus (Started/Milestone/
  Completed/Failed), ChestResult, TaskType (Single/RepeatableFinite/
  RepeatableInfinite), CompletionState, InitiativeFlags, MilestoneFlags,
  RewardFlags, NeighborhoodType
- Add 5 new SMSG opcodes: INITIATIVE_UPDATE_STATUS (1 byte status),
  INITIATIVE_POINTS_UPDATE (2 uint32: current/max), INITIATIVE_MILESTONE_UPDATE
  (3 bytes: index/reached/flags), INITIATIVE_CHEST_RESULT (1 uint32 result),
  INITIATIVE_TRACKED_UPDATED (packed GUID)
- Send InitiativeUpdateStatus on initiative start/complete/expire/milestone
- Send InitiativePointsUpdate after every task progress change
- Send InitiativeMilestoneUpdate when milestones are reached

Weighted cycle selection (IDA-verified):
- Build InitiativeCyclePriority index map during initialization
- SelectWeightedCycle() uses InitiativeCyclePriority.Weight for weighted
  random selection among candidate cycles
- CheckAndStartInitiatives() now uses weighted selection with fallback
  to equal-weight when no priority data exists

DB2 data fixes:
- Fix InitiativeReward.RewardData SQL column type from text to bigint
- Fix reward data values from empty string to 0
- Document that RewardType=0 with RewardAmount = favor points granted
  via Housing::AddFavor (HouseInitiativeFavor = AccountTransType 66)
2026-03-10 19:49:39 -03:00
luis 8b80a9f7ad Housing: Complete initiative persistence — task progress, milestones, rewards
- Add neighborhood_initiative_task_progress table persisting per-task progress
  and status (NOT_STARTED/IN_PROGRESS/COMPLETE) across server restarts
- Add neighborhood_initiative_milestones table persisting milestone reached
  state with timestamps
- Add neighborhood_initiative_reward_claims table tracking per-player reward
  claims to prevent double-claiming
- Implement PersistSingleTaskProgress, PersistMilestoneReached, PersistRewardClaim
  with corresponding CHAR_REP/INS prepared statements
- LoadFromDB now restores task progress, milestone state, and reward claims
  from DB instead of defaulting to zero/recalculating
- Implement ClaimMilestoneReward with full DB2 reward chain: walks
  InitiativeRewardXMilestone → InitiativeReward to grant currency, items,
  or favor based on RewardType
- HasUnclaimedRewards now checks per-player claim state, not just milestone reached
- HandleGetInitiativeClaimRewardRequest and HandleGetInitiativeOpenChestRequest
  now use ClaimMilestoneReward for actual reward distribution
- PersistTaskProgress stub replaced with full implementation
2026-03-10 19:43:07 -03:00
luis 5def5c28d0 Housing: Wire up initiative/endeavor system and fix interior editor unlock
- Register PlayerInitiativeComponent_C entity fragment (FragmentID 37) on player
  load so C_NeighborhoodInitiative Lua API returns initiative state
- Populate InitiativeInfo fields (duration, progress, milestone, cycle, contribution)
  and Houses set from InitiativeManager data
- Send SMSG_INITIATIVE_SERVICE_STATUS (0x80=enabled) proactively on both exterior
  and interior map entry so IsInitiativeEnabled() returns true immediately
- Set IsInitiative flag on cornerstone UI response when neighborhood has active initiative
- Add InsertSetUpdateFieldValue friend declaration to SetUpdateFieldSetter (was missing,
  preventing set-type update field insertion from compiling)
- Send SMSG_HOUSING_GET_CURRENT_HOUSE_INFO_RESPONSE in interior map so editor UI
  has proper house context
- Add SendPostTutorialAuras to HouseInteriorMap to unlock all editor modes (expert,
  cleanup, layout, customize) — auras are lost on map transfer and must be re-sent
2026-03-10 13:36:47 -03:00
luis 1e768c19b2 Housing: Fix tutorial mode blocking editor features via account CVar injection
The client's housing editor UI checks FrameTutorialAccount flags stored in the
closedInfoFramesAccountWide CVar bitfield (GLOBAL_CONFIG_CACHE account data),
which is completely separate from the 256-bit server tutorial flags sent via
SMSG_TUTORIAL_FLAGS. Without bit 38 (HousingModesUnlocked) set in this CVar,
expert/cleanup/layout/customize modes remain locked.

Fix: inject closedInfoFramesAccountWide (all bits set) and housingTutorialsEnabled=0
into the GLOBAL_CONFIG_CACHE account data during player login and house purchase.
The code handles both fresh and existing account data, replacing or appending CVars
as needed. Account data timestamps are bumped so the client re-requests the config.

Added TODO markers for adapting this when the housing tutorial questline is
implemented (quest-driven FrameTutorialAccount bit progression).
2026-03-10 13:32:34 -03:00
luis 19c91b9f3c Housing: Read decor budget values from HouseLevelRewardInfo DB2
Budget values (interior/exterior decor, room, fixture) were hardcoded instead
of being read from the HouseLevelRewardInfo DB2. RewardType 38-41 maps to
ExpectedStatType housing budget enums. Wire these DB2 values into HouseLevelData
during LoadHouseLevelRewardInfoData, with hardcoded values as fallback only when
DB2 entries are missing. Log final budget values per level at startup for
verification.
2026-03-10 13:30:37 -03:00
luis 81c3566786 debug log 2026-03-10 13:28:53 -03:00
luis 110b6b5193 Housing: Fix decor learning UI update and editor mode budget display
Update Account entity FHousingStorage_C when learning decor via spell so the
client's decor list refreshes immediately without requiring a relog.

Include HousingPlayerHouseEntity in the combined UPDATE_OBJECT packets sent
when entering editor mode, requesting storage, and buying a plot. The client
needs budget max values alongside FHousingStorage_C entries to compute and
display placed/remaining decor counts.
2026-03-10 13:27:16 -03:00
luis 54f3ef3dee Housing: Fix plot ownership display and door GO position
- Fix NeighborhoodMirrorData Houses array: add entries for ALL 55 plots
  (including empty ones) so Houses[i] corresponds to DB2 PlotIndex=i.
  Previously only occupied plots were added, causing the client to map
  Houses[0] to plot 0 when it actually contained plot 7's data.
  Fixed in all 5 locations: Neighborhood.cpp, NeighborhoodHandler.cpp,
  HousingHandler.cpp (2 sites), Player.cpp.

- Fix door interaction GO position: raise Z from -0.56 to 1.5 (door frame
  level instead of stair base) and pull X back from 9.28 to 8.0 (actual
  door threshold instead of mesh origin at stair foot).
2026-03-10 08:36:51 -03:00
luis 30f4de2717 yupo 2026-03-09 22:21:23 -03:00
luis 448e2304e9 Housing: Remove dynamic platform GO spawn that rendered visibly
The platform WMO (574432) is already loaded from the static gameobject table
(sniff data). Dynamically spawning a second one at the ground-clamped Z
caused it to render visibly on the surface. The static spawn provides the
DynamicMapTree collision needed for house ground-clamping.
2026-03-09 22:19:55 -03:00
luis d1740ba213 Housing: Fix client crash from duplicate CREATE packets for entity fragments
Housing/3 and Housing/4 entities were never registered in Player::m_clientGUIDs,
causing HaveAtClient() to always return false. Every SendUpdateToPlayer() call
sent CREATE_OBJECT instead of VALUES_UPDATE, producing duplicate CREATEs that
freeze/crash the client.

Include both entities in Player::BuildCreateUpdateBlockForPlayer alongside
BNetAccount, and track their GUIDs in m_clientGUIDs so subsequent updates
correctly use VALUES_UPDATE.
2026-03-09 22:18:43 -03:00
luis 126e7ba70a Housing: Separate entity fragments, fix house Z and decor placement
Split entity fragment ownership to match retail wire format:
- BNetAccount carries only FHousingStorage_C (decor catalog)
- Housing/3 entity carries FHousingPlayerHouse_C (house data)
- Housing/4 entity carries FNeighborhoodMirrorData_C (neighborhood mirror)
- Route all callers to correct entity (Housing.cpp, Neighborhood.cpp, handlers)
- Add Housing/3 and Housing/4 to player world lifecycle

Fix house spawning below ground level after DB2 position switch:
- Re-enable ground-clamping via GetHeight which includes GetGameObjectFloor
- Static platform WMO spawns (GO 574432) provide DynamicMapTree collision
- Falls back to DB2 Z when no valid ground height available

Fix decor jumping to wrong position after placement:
- World-to-local conversion now applies inverse rotation of room facing
- Previously only subtracted translation, ignoring room orientation
- Broken by atan2-based facing computation that introduced non-zero angles
2026-03-09 22:17:37 -03:00
luis 80775e7eaf shadowlands merge 2026-03-07 07:22:07 -03:00
luis 3c1f36cef8 fix sl scripts 2026-03-07 07:00:50 -03:00
luis 99fe32248e implement proper stand up 2026-03-07 06:27:23 -03:00
luis 268bc6847d crash fix 2026-03-07 06:05:27 -03:00
luis af5f496d97 fix spell crash 2026-03-07 05:51:28 -03:00
luis 30be246924 fix bot movements 2026-03-07 05:40:28 -03:00
luis 3b56c7e28f db sniff data 2026-03-07 05:20:58 -03:00
luis 026e35057a typo 2026-03-07 05:12:05 -03:00
luis b6c6cc0ebe full fix bot join group 2026-03-07 05:00:19 -03:00
luis 4180e3fc92 fix areatrigger teleport 2026-03-07 02:32:01 -03:00
luis 1eb38bd912 fix tutorial dup 2026-03-07 01:14:11 -03:00
luis 15ddc18b0e db fix 2026-03-07 00:16:17 -03:00
luis a7f2871f3a fix 2026-03-06 23:54:40 -03:00
luis 3b7b810b4a build fix 2026-03-06 23:33:38 -03:00
luis eb37399cd8 typo fix 2026-03-06 23:24:31 -03:00
luis 57c2104e01 Core/Movement: Remove Force field from inertia packets per 12.0.1 sniff
Raw .pkt binary analysis confirms SMSG_MOVE_APPLY_INERTIA in 12.0.1 is
20 bytes: PackedGUID + SequenceIndex + InertiaID + LifetimeMs with no
Force vector. The client derives force direction from the AreaTrigger
DB2 entry referenced by InertiaID.

Removes the incorrect Force field from MoveApplyInertia (SMSG),
MoveApplyInertiaAck (CMSG), and MoveUpdateApplyInertia (broadcast).
Updates Unit::SendApplyInertia() signature accordingly.
2026-03-06 23:13:00 -03:00
luis 6cc068140e Scripts/Spells: Convert dragonriding spells to periodic aura handlers
Whirling Surge (361584) and Launch Boost (392752) are periodic auras
per Wowhead spell data, not single-shot effects:

- Whirling Surge: Apply Aura: Dummy, 3s duration. Converted from
  single-shot SpellScript to SpellScript+AuraScript pair. The periodic
  handler sends facing+pitch oriented impulses at magnitude 5.0 per
  tick (sniff-verified: 5-6 ticks per activation).

- Launch Boost: Periodic Dummy, period 100ms, duration 2s. Split into
  SpellScript (sends initial Z=45 upward impulse on hit) + AuraScript
  (sends periodic forward impulse at magnitude 5.0 per tick).

Both use RegisterSpellAndAuraScriptPair for combined validation and
periodic handling. Extracted SendFacingImpulse helper to reduce
duplication.
2026-03-06 23:10:30 -03:00
luis 12fd9e6237 db fixes 2026-03-06 23:08:53 -03:00
luis a1ce92c570 Core/Movement: Implement server-side skyriding (dragonriding) system
Add full server-side support for the client's skyriding movement system:

- DB2 infrastructure: DriveCapability (17 fields) and DriveCapabilityTier (5 fields)
  stores with hotfix DB integration and SQL table definitions
- Drive activation: SetDriveCapabilityID() on mount/dismount integrated into
  HandleAuraMounted, with blizzlike packet behavior (SET_CAN_DRIVE only via
  CompoundState at login, UNSET_CAN_DRIVE on dismount)
- Vigor system: POWER_ALTERNATE_MOUNT (25) with velocity-based regen modifier
  using FlightCapability::VigorRegenMaxVelCoefficient
- Impulse delivery: SendApplyInertia(), SendRemoveInertia(), SendAddImpulse()
  helpers sending movement packets to mover only (no broadcast, per sniff)
- Dragonriding spell scripts: Surge Forward (372608), Skyward Ascent (372610),
  Whirling Surge (361584), Launch Boost (392752) with sniff-verified impulse
  values and SPELL_CUSTOM_ERROR_REQUIRES_SKYRIDING validation

Impulse magnitudes verified against raw SMSG_MOVE_ADD_IMPULSE packet data:
  Launch Boost: (0, 0, 45.0), Whirling Surge: 5.0/tick x6,
  Skyward Ascent: horiz 12.25 + Z 49.0
2026-03-06 23:06:25 -03:00
luis 22ff93e245 Add dragonriding inertia, impulse, and drive packet structures 2026-03-06 22:49:43 -03:00
luis b903ba7668 Chromie Time: add CONDITION_CHROMIE_TIME and terrain swap conditions 2026-03-06 22:30:43 -03:00
luis 714df36182 Chromie Time: content tuning redirect, creature scaling, quest XP, and GM command 2026-03-06 22:27:41 -03:00
luis 2800ba06c4 Implement Chromie Time persistence, NPC UI, scaling flags, and level gating
Add complete blizzlike Chromie Time flow: NPC gossip opens expansion picker,
handler sets ConditionalFlags/FactionGroup for content tuning redirection,
selection persists via new characters.chromieTimeExpansionId column, state
restores on login, and auto-clears at max level. Implement SMSG_SET_CTR_OPTIONS
server packet for mid-session state pushes.
2026-03-06 22:16:39 -03:00
luis 44f26b335c Housing: Fix teleport plot resolution, packet wire format, and neighborhood responses
Fix teleport-to-plot using server-side plot resolution instead of trusting
client's PlotIndex (which is a roster index, not the DB2 PlotIndex). Resolve
correct plot via player's Housing object for self-teleport, or OwnerGuid
matching for visiting others.

Additional changes accumulated in this batch:
- Implement housing packet handlers for Phase 5-7-9 opcodes
- Fix neighborhood response wire format to match retail sniffs
- Add housing source tracking and platform cleanup SQL migrations
- Fix AreaTrigger/GameObject/MeshObject housing integration points
- Extend UpdateFields for housing-specific object data
- Add Neighborhood plot management and house finder support
- Fix door script and steward NPC interactions
- Add catalog persistence prepared statement
- Fix HouseInteriorMap Euler-to-quaternion conversion for room components
2026-03-06 22:05:59 -03:00
luis 1dc28b5959 typo 2026-03-06 20:53:10 -03:00
luis 6ac87fa874 missing sql 2026-03-06 20:43:31 -03:00
luis 6915ca5b9d Garrison: Fix 3 sniff-verified issues from 12.0.1.66220 trading post sniff
1. CanStartMission: always send true (sniff shows all 1s regardless of
   mission state, our code incorrectly sent MissionState == 0)

2. NumMissionsStartedToday: track daily mission start count with
   day-boundary reset. Persisted to character_garrison table. This
   controls follower abilities like "Increase success chance of the
   first mission of the day."

3. ArchivedMissions: track completed mission RecIDs per garrison type.
   Persisted to new character_garrison_archived_missions table. Sniff
   shows 12 archived WoD missions and 9 archived Class Hall missions
   for a played character.
2026-03-06 20:42:43 -03:00
luis db39fc04c4 SMSG_DISPLAY_PROMOTION 2026-03-05 21:10:57 -03:00
luis 5bd44a49d2 fix sql 2026-03-05 20:03:03 -03:00
luis e753d7429d Dup 2026-03-05 19:49:54 -03:00
luis aa9430254b Core: Updated allowed build to 12.0.1.66263 2026-03-05 19:47:17 -03:00
luis 732f728f8f Housing: Implement initiative handlers, settings persistence, and Phase 5-7-9 polish
- Implement 8 new initiative CMSG handlers (AcceptMilestone, ReportProgress,
  ClaimReward, Leaderboard, OpenChest, TaskAccept, TaskAbandon, TaskProgress)
  with full InitiativeManager integration for neighborhood initiatives
- Upgrade 6 unknown initiative opcodes (0x38000B-0x380010) to STATUS_LOGGEDIN
- Register 5 unnamed housing opcodes (ConfirmPreviewPlacement, CompleteTutorialStep,
  QueryPendingInvites, SetTutorialState, SkipTutorial) as logged stubs
- Add photo sharing authorization state tracking (per-session volatile)
- Add HousingWarningFlag enum with expansion/level eligibility checks
- Wire warning gates into StartTutorial and ReservePlot handlers
- Fix TaggedPosition<XYZ> accessor calls (.Pos.GetPositionX() pattern)
- Fix HOUSING_RESULT_NOT_HOME_OWNER → HOUSING_RESULT_PERMISSION_DENIED
- All 17 initiative opcodes now STATUS_LOGGEDIN (zero UNHANDLED remaining)
- Add house name/description DB persistence (SQL schema + prepared statements)
- Add blizzlike implementation plan documentation
2026-03-05 19:45:56 -03:00
luis 3800bbf482 warnings 2026-03-04 20:39:41 -03:00
luis ff93708eff 66220 2026-03-04 20:26:16 -03:00
luis 8410236ac6 et Battles: Fix effect routing, multi-turn locks, emote, quest display
Fix the effect dispatch key: use BattlePetEffectPropertiesID (the
actual effect action type) instead of ParamTypeEnum[0] (parameter data
type). This single change fixes healing dealing damage, auras not
applying, state changes, stuns, weather, and multi-turn markers all
routing to the damage case.

Also lock swaps during multi-turn abilities, clear multi-turn state on
pet death, face the player toward the opponent on battle start, restore
NPC trainer movement after battle with a cry emote on loss, and show
quest menu alongside the battle gossip option.
2026-03-04 20:09:17 -03:00
luis 27a6fdbe29 Revert "Pet Battles: Wire up BattlePetNPCTeamMember.db2 hotfix and seed NPC trainer teams"
This reverts commit 90b92371a1.
2026-03-04 20:02:29 -03:00
luis 90b92371a1 Pet Battles: Wire up BattlePetNPCTeamMember.db2 hotfix and seed NPC trainer teams
Register BattlePetNPCTeamMember.db2 in the hotfix pipeline so the
server can populate it at runtime. The client ships this DB2 empty
(0 records) — names resolve via CreatureID in packets instead, but
the infrastructure is now in place for future name overrides.

Add initial seed data for 19 NPC pet battle trainers (57 pets) from
Eastern Kingdoms through Pandaria Grand Masters. All creature IDs
verified against TDB creature_template with exact name matches.
2026-03-04 20:01:03 -03:00
luis 0a0a9d4408 Pet Battles: Fix multi-turn ability visibility and NPC team naming
Multi-turn abilities (Dig, Burrow, etc.) were invisible to the client:
- Handle effectCategory 17/18 (MULTI_TURN_BEGIN/END) in ProcessEffect
  that were falling through to default handler producing no effects
- Fix off-by-one: multi-turn state now clears on last turn instead of
  one round late (>= TotalTurns-1 instead of >= TotalTurns)
- Emit fallback STATUS_CHANGE for empty multi-turn turns so the client
  still shows the ability animation

NPC trainer pet naming and model support:
- Add npcTeamMemberID column to battle_pet_npc_team (maps to
  BattlePetNPCTeamMember.db2 for pet name display on client)
- Add creatureId column for optional model override (0=species default)
- Send NpcTeamMemberID in packet for all teams, not just wild
2026-03-04 19:43:07 -03:00
luis 79859eef90 todo add # Playerbot Movement and Humanization Improvements 2026-03-04 01:13:23 -03:00
luis c9c19ac368 merge shadowlands part 1 2026-03-04 00:57:43 -03:00
luis 12ba82cee4 SPELL_EFFECT_CONVERT_ITEMS_TO_CURRENCY 2026-03-03 23:17:27 -03:00
luis 66c48685fa scenario_the_throughway 2026-03-03 23:13:24 -03:00
luis 39a6e8e626 SPELL_EFFECT_REMOVE_PHASE 2026-03-03 22:58:09 -03:00
luis 477c7a16b4 SPELL_EFFECT_TELEPORT_TO_LFG_DUNGEON 2026-03-03 22:51:05 -03:00
luis e00fd4b3cc core implement SPELL_EFFECT_PUSH_ABILITY_TO_ACTION_BAR 2026-03-03 21:45:47 -03:00
luis 118b12113c Pet Battles: Fix aura visibility, capture timing, and add NPC battle support
Fix aura round data being lost before packet serialization by storing
RoundsRemaining/CurrentRound in PetBattleRoundEffect at creation time
instead of looking up live aura state after TickAuras() has already
decremented or removed them.

Defer captured pet journal addition from round resolution to
CompleteBattle() so the "Pet collected" message appears after the
client plays the crate animation, not before. Also add missing
PlayerObtainPetThroughBattle criteria call.

Add NPC pet battle support via StartNPCPetBattle() on WorldSession and
npc_pet_battle_trainer gossip CreatureScript. Trainers with a team in
battle_pet_npc_team and ScriptName='npc_pet_battle_trainer' will offer
a gossip battle option.
2026-03-03 20:48:34 -03:00
luis 7e3029b54b Garrison: Fix 4 additional sniff-verified discrepancies
Continued analysis of WoD garrison sniff hex data revealed:

Shipment packets:
- CharacterShipment struct missing 2 fields: UnkInt32 (int32) and
  GarrTypeID (uint8) per entry — 5 extra bytes confirmed by raw hex
  decode of GET_SHIPMENT_INFO_RESPONSE and LANDING_PAGE_SHIPMENTS
- CreateShipmentResponse ShipmentRecID always 0 (sniff-confirmed)

Login/zone-in workflow:
- Send troop quality refresh (FOLLOWER_CHANGED_QUALITY) before main
  GET_GARRISON_INFO_RESULT at login (sniff-confirmed ordering)
- Send GARRISON_UPDATE_GARRISON_MONUMENT_SELECTIONS on zone-in after
  map data response (sniff-confirmed zone-in sequence)
2026-03-03 20:41:08 -03:00
luis a6a0402a86 Garrison: Fix 9 packet discrepancies from WoD sniff + IDA verification 2026-03-03 20:36:24 -03:00
luis 9c11df2fd1 Fix worldserver crash 2026-03-03 20:20:30 -03:00
luis ec6cf8a385 warning fixes 2026-03-03 20:05:41 -03:00
luis 600e055255 Housing: Fix decor click selection, owner display, and BLZ_ALLOC crash
- Set EditorMode UpdateField via SetHousingEditorModeUpdateField() when
  entering/exiting edit mode. The client reads this from
  PlayerHouseInfoComponentData to enable ClickTarget (flag 16) for decor
  selection. Without it, the housing editor stays in mode 0 and all click
  flags are disabled.

- Set UNIT_FLAG_PACIFIED, UNIT_FLAG2_NO_ACTIONS and SilencedSchoolMask=127
  during edit mode (sniff-verified retail behavior). Clear on exit.

- Revert ignoreNestedChangesMask from true to false in
  HousingStorageData::WriteUpdate. The true flag forced full-map Create
  format inside VALUES_UPDATE which crashes the client (BLZ_ALLOC 41GB)
  on subsequent Decor map updates after placing decor. The original
  partial-serialization issue was actually caused by ContentsChangedMask=0
  which is already fixed by the Account::SendUpdateToPlayer override.

- Fix SMSG_HOUSING_UPDATE_HOUSE_INFO to send actual BnetAccountGuid
  instead of ObjectGuid::Empty so house owner displays correctly in the
  settings/permissions UI.

- Make character_housing position columns SQL update idempotent to avoid
  duplicate column errors when schema already includes posX/posY/posZ.
2026-03-03 19:52:07 -03:00
luis c77a3eec28 missing 2026-03-03 19:49:04 -03:00
luis 188b2d88af Housing: Fix empty VALUES_UPDATE by building ContentsChangedMask before send
BaseEntity::SendUpdateToPlayer() is const and never calls
BuildUpdateChangesMask(), leaving ContentsChangedMask at 0. This means
BuildValuesUpdateBlockForPlayer() skips all fragment data — the
VALUES_UPDATE packet is sent empty with no FHousingStorage_C content.

The map's periodic update cycle (Account::BuildUpdate) does call
BuildUpdateChangesMask() and sends data correctly, but our explicit
handler calls to SendUpdateToPlayer were producing empty packets.

Override SendUpdateToPlayer on Account to call BuildUpdateChangesMask()
before serializing and ClearUpdateMask() after. This ensures
FHousingStorage_C Decor map data populated by
PopulateCatalogStorageEntries() is actually included in the packet.
2026-03-03 19:48:46 -03:00
luis 7e28074385 Housing: Fix decor selection by serializing full Decor map in VALUES_UPDATE
The client correlates FHousingStorage_C Decor entries with MeshObject
FHousingDecor_C.DecorGUID for targeting/selection. VALUES_UPDATE packets
with partial change masks (ignoreNestedChangesMask=false) only sent
individual field bits, missing the complete Decor map structure the
client needs. Fix by forcing ignoreNestedChangesMask=true in
HousingStorageData::WriteUpdate so the Decor map is always serialized
in full-create format (WriteMapFieldCreate) inside VALUES_UPDATE.

Also fix SetHousingDecorStorageEntry to set SourceValue (empty string)
so all 3 fields have their change bits set for per-entry serialization.
2026-03-03 19:47:24 -03:00
luis 8f72fc820f Housing: Fix BLZ_ALLOC crash by tracking Account entity in m_clientGUIDs
The Account entity's GUID was never added to m_clientGUIDs after its
initial CREATE (embedded in the player's own create block). This caused
SendUpdateToPlayer() to always send a duplicate full CREATE instead of
a VALUES_UPDATE. When the Decor map was populated during edit mode, the
duplicate CREATE crashed the client with a 41GB BLZ_ALLOC allocation.
2026-03-03 19:43:56 -03:00
luis e615ac2f9e Core/Misc: Update CURRENT_EXPANSION to Midnight 2026-03-03 19:41:05 -03:00
luis af61bad399 DB/Spells: Fix Executioner's Precision procs 2026-03-03 19:38:57 -03:00
luis e47bcc48d6 +++ 2026-03-02 21:15:50 -03:00
luis 354fb4b154 66198 2026-03-02 20:42:53 -03:00
luis fa21740681 merge latest 2026-03-02 20:42:11 -03:00
luis 45430324fb merge housing 2026-03-02 20:34:40 -03:00
luis 140c043c8c Housing: Add tutorial flags, entry hall room, MeshObject EntryID and misc fixes 2026-03-02 20:31:24 -03:00
luis 771e03fa9c Housing: Implement Phase 7 opcode handlers for 27 CMSG opcodes 2026-03-02 20:23:34 -03:00
luis d564b75509 Housing: Fix neighborhood faction display and plot purchase issues 2026-03-02 20:00:36 -03:00
luis 117fdb7490 AreaTrigger: Fix null template crash in HandleUnitEnter/Exit 2026-03-02 19:56:23 -03:00
luis 2d28465873 Housing: Fix DB2 struct field ordering for ExteriorComponent entries 2026-03-02 19:54:12 -03:00
luis 9ba9dfd718 Housing: Fix null string crash in diagnostic dump functions
DumpExteriorComponentDiagnostics and DumpRoomComponentTextureDiagnostics
passed Name[locale] directly to fmt without SafeStr() guard, causing
ACCESS_VIOLATION when LocalizedString data is null.
2026-03-02 19:49:44 -03:00
luis 884d9b585a fix crash and db2 load 2026-03-01 08:45:42 -03:00
luis 60fe9f18aa typo 2026-02-28 19:32:41 -03:00
luis 4323d61765 Housing: Visual respawning, room updates, collection notifications, and decor refunds
Add instant visual feedback for fixture/room changes, populate licensed
decor quantities from catalog, and implement the decor refund window.

- Fixture handlers (SetCore, Create, Delete) now despawn+respawn house
  MeshObjects so changes are visible without relog
- All 8 room handlers refresh interior MeshObjects after success via
  shared RefreshInteriorRoomVisuals helper
- Send SMSG_ACCOUNT_*_COLLECTION_UPDATE for room add, theme set, and
  material apply operations
- HandleGetAllLicensedDecorQuantities returns catalog + starter decor
- HandleGetDecorRefundList returns recently placed decor within 2-hour
  refund window using new PlacementTime field persisted to DB
2026-02-28 19:30:49 -03:00
luis 8813046b06 new tables 2026-02-28 19:10:33 -03:00
luis 2724d62d91 Housing: Data-driven DB2 exterior houses, room textures, and indexed lookups
Replace hardcoded values across the housing system with DB2-driven data:

Phase 1 - Quick wins:
- Interior map origin from NeighborhoodMap DB2 instead of hardcoded (-1000,-1000,0.1)
- O(1) RoomComponentOption lookup via composite-key index (was O(n) per call)
- Dynamic plot count in house finder from DB2 PlotCount
- Warnings when RoomWmoData geobox falls back to defaults
- Base room entry from DB2 IsBaseRoom flag instead of hardcoded 18

Phase 2 - Data-driven exterior houses:
- ExteriorComponent diagnostic dump at startup (stores, hooks, exit points)
- 5 ExteriorComponent indexes for hook/group/exit point lookups
- Recursive SpawnExtCompTree() walks DB2 component-hook-child tree
- SpawnFullHouseMeshObjects tries data-driven first, falls back to hardcoded
- Door offset from ExteriorComponentExitPoint DB2 instead of hardcoded 5.5f

Phase 3 - Room system improvements:
- Room grid spacing changed to sniff-verified 15yd (was 24yd)
- RoomComponentTexture + RoomComponentOptionTexture DB2 infrastructure
  (structs, load info, stores, hotfix selectors, prepared statements)
- 3-tier texture resolution: per-option DB2, per-type DB2, hardcoded fallback
- Diagnostic dumps for texture DB2 data verification
2026-02-28 19:09:02 -03:00
luis 9edbba56a3 Housing: Populate RoomComponentOption DB2 and fix interior wall models 2026-02-28 18:53:52 -03:00
luis 224b62a1f8 Housing: Data-driven interior rooms, decor persistence, and room type fix
- Rewrite SpawnRoomMeshObjects to iterate ALL components per room from DB2
  data, each getting InitHousingRoomComponentData with proper geobox
- Add faction-aware theme selection via GetFactionDefaultThemeID (Alliance=6,
  Horde=2) and FindRoomComponentOption per-component lookup
- Fix GetDefaultVisualRoomEntry to deterministically pick lowest-ID room
  (Room 1 = Square Small) instead of non-deterministic unordered_map pick
- Add runtime migration in LoadFromDB to replace wrong visual room entry
  (e.g., Octagon 9 → Square 1) on next login
- Fix interior decor not visible: PLACE/MOVE/REMOVE handlers now support
  HouseInteriorMap via SpawnSingleInteriorDecor and UpdateDecorPosition
- SpawnInteriorDecor runs on every interior entry (not gated by
  _roomsSpawned), with duplicate-spawn prevention
- Fix room GUID using subType=2 (was 0 which returned ObjectGuid::Empty)
- Fix DB2 OffsetRot degrees-to-radians conversion for component quaternions
- Teleport player to visual room center on interior entry
- Add MeshObject::InitHousingDecorData, InitHousingRoomData,
  InitHousingRoomComponentData, InitHousingFixtureData for entity fragments
- Add SpawnRoomForPlot to HousingMap for exterior room entities with geobox
- Add SQL migrations for base room and visual room auto-placement
- Enhanced diagnostic logging for exterior decor spawn success/failure
2026-02-28 18:50:58 -03:00
luis 5555066646 Zones 2026-02-27 22:46:41 -03:00
luis a0ddb2c9ae Uldaman Legacy Of Tyr 2026-02-27 22:41:56 -03:00
luis 874efbdb32 The Nokhud Offensive 2026-02-27 22:36:41 -03:00
luis 6148b6e450 Neltharus 2026-02-27 22:30:18 -03:00
luis 12f4ab96c3 Halls Of Infusion 2026-02-27 22:25:55 -03:00
luis 84e69da02c merge 2026-02-27 22:22:35 -03:00
luis 0838a21a59 Amirdrassil 2026-02-27 22:17:41 -03:00
luis 77002ca1ab brackenhide full 2026-02-27 22:14:13 -03:00
luis 97fefa3340 Vault of the Inarnates 2026-02-27 21:49:51 -03:00
luis d14efc7023 merge dungeon and fix warnings 2026-02-27 21:45:52 -03:00
luis 7b6a678e61 Ruby life pools 2026-02-27 21:40:06 -03:00
luis d4469ef442 azure vault 2026-02-27 21:31:11 -03:00
luis 6ebdb785c9 Full aberrus 2026-02-27 21:26:20 -03:00
luis 7a6ab1a3d5 66192 2026-02-27 20:54:15 -03:00