Commit Graph
3372 Commits
Author SHA1 Message Date
luis 9d5922fb44 ++ 2026-04-11 16:56:36 -03:00
luis aa07e25e7d still crash 2026-04-11 15:09:34 -03:00
luis 8ae2db9b45 +++ 2026-04-11 14:10:29 -03:00
luis e874aaefbe ++ 2026-04-11 12:39:21 -03:00
luis 5e2c5a929c update still crash 2026-04-11 12:30:26 -03:00
luis e8c22f25e7 housing 2026-04-10 19:43:41 -03:00
Céfiro_Caecias 40d5599459 DB/World: Pathid Part 2 2026-04-10 19:09:07 -03:00
Céfiro_Caecias 20895df576 DB/World: Pathid Part 1 2026-04-10 19:08:24 -03:00
luis 2cb3cd297a disable housing opcodes 2026-04-10 13:36:29 -03:00
luis 02099869af remove more housing 2026-04-10 13:29:46 -03:00
Céfiro_Caecias 74f6219fb6 Update 2026_04_10_00_world.sql 2026-04-10 09:00:29 -03:00
luis b5b8f8ce4e Darnell 2026-04-10 08:41:01 -03:00
luis 776d9b64f6 FIX BUILD 2026-04-10 08:39:54 -03:00
luis 4cefdb9548 5 errors left 2026-04-10 08:29:28 -03:00
luis ab0601b9fc comment mesh object 2026-04-10 08:25:27 -03:00
luis e3ca033ce7 ++ 2026-04-10 08:24:00 -03:00
luis d12c865fc1 build fix part 1 2026-04-10 08:06:17 -03:00
luis 41a96222e6 remove complete 2026-04-10 08:03:08 -03:00
luis 50d420f6d4 remove bad changes 2026-04-09 21:35:11 -03:00
luis b1ad20e74a sure here crash 2026-04-09 21:34:28 -03:00
luis 91645e61f1 disable entire housing but we still have crash i need help guys 2026-04-09 21:31:44 -03:00
luis b1e47f3b41 pull request approved 2026-04-09 21:31:44 -03:00
Traesh 8aca4a618e Merge branch 'main' of https://github.com/Thordekk/WowCommunityProject 2026-04-10 00:19:32 +02:00
luis 0e07d0eaa1 Housing: Fix floor material + stairwell doorway + decor accessors
1. Floor material: APPLY_COMPONENT_MATERIALS now directly updates the
   specific component MeshObject's textureID instead of going through
   room-level WallpaperId (which was overwritten/reset on each change).

2. Stairwell doorway: Reverted HasStairs check — stairwell rooms connect
   horizontally through walls like any room. The doorway should open.

3. Added GetRoomComponentOptionID/GetHouseThemeID accessors to MeshObject
   for per-component texture updates without room-level state.
2026-04-09 08:01:51 -03:00
luis a1350b340a Housing: Fix stairwell placement — same floor, adjacent position
Stairwell rooms are tall rooms (geobox Z=-1 to 14) placed ADJACENT to
the source room on the SAME floor, not above it. They extend vertically
through the ceiling. Only rooms connected at the stairwell's ceiling
door should go to floor+1. Was incorrectly using FloorIndex+1.
2026-04-09 07:59:17 -03:00
luis 7357fb7fca Housing: Fix decor not selectable after relog — remove double CREATE send
Interior decor was sent TWICE at login: once by the map visibility system
(AddToMap → UpdateObjectVisibilityOnCreate) and again by the deferred
callback (manual BuildCreateUpdateBlockForPlayer). The double CREATE
corrupted the client's entity state, making decor unselectable.

Session-placed decor only got one CREATE (via AddToMap) and worked fine.

Fix: removed the manual decor CREATE from the deferred callback. The
visibility system already handles decor delivery to the player.
2026-04-09 07:57:47 -03:00
luis 14ddebca90 Housing: Fix wall material changing floor + stairwell wall destruction
1. APPLY_COMPONENT_MATERIALS handler now passes componentIDs filter to
   UpdateRoomComponentVisuals (was updating ALL components including floor).

2. Stairwell room placement no longer destroys the source room's wall
   (stairwells are vertical connections, not horizontal doorways).
2026-04-09 07:56:42 -03:00
luis 477a2e0704 Housing: Fix interior decor not selectable — auto-assign empty RoomGuid
Decor placed before the room entity system had empty RoomGuid in DB.
Without a valid AttachParentGUID (Housing/2 room entity), the client
can't select the decor for moving/removing. Now auto-assigns decor with
empty RoomGuid to the first non-base room. Also uses FloorIndex for
room Z position in decor world coordinate calculation.
2026-04-09 07:55:32 -03:00
luis 1b6013497c Housing: Fix floor customization — treat TextureID 0xFFFFFFFF as default
The CMSG sends TextureID=4294967295 (0xFFFFFFFF) to mean "reset to
default". This was stored as WallpaperId and on respawn overrode the
texture lookup (WallpaperId != 0 → use -1 as texture). The client
showed an empty Floor Material dropdown because RoomComponentTextureID=-1.

Fix: treat WallpaperId=0xFFFFFFFF as 0 (no override) in both storage
and the spawn/update texture lookups. Also cleaned up -1 values in DB.

Note: RoomComponentOptionTexture DB2 table is empty in retail — Blizzard
hasn't populated it. Textures work via RoomComponentTexture (19 entries)
which the client reads directly by component type and theme.
2026-04-09 07:54:14 -03:00
luis de2256abcc typo 2026-04-08 21:11:52 -03:00
luis 9b41344828 typo 2026-04-08 20:09:01 -03:00
luis f200691b19 fix crash 2026-04-08 20:03:33 -03:00
luis 8e587eb900 fix sql 2026-04-08 19:47:18 -03:00
luis f5f53d6f13 typo 2026-04-08 19:40:56 -03:00
luis 167383c871 Housing: Fix stairwell Z offset + dye only affects specified components
1. Stairwell Z: Used room's own Height (14.0 for stairwells) instead of
   standard floor height (7.0). Stairwells spawned at Z=14.1 instead of
   7.1. Now uses fixed FLOOR_HEIGHT=7.0 for consistent floor spacing.

2. Dye wall/floor crossover: UpdateRoomComponentVisuals applied the theme
   to ALL components. Now filters by the CMSG's RoomComponentIDs — only
   the specified components are updated. Also uses the CMSG's theme ID
   directly instead of room.ThemeId (which is room-level, not per-component).
2026-04-08 19:37:22 -03:00
luis 3253902483 Housing: Implement multi-floor interior system for staircases
Rooms now have FloorIndex (0=ground, 1+=upper floors) persisted to DB.
Room Z position is calculated from FloorIndex * RoomWmoData.Height
(typically 7 yards per floor). Stairwell rooms (HasStairs flag) are
placed on FloorIndex+1 of the source room.

Changes:
- Room struct: added FloorIndex field
- DB: added floorIndex column to character_housing_rooms
- SpawnRoomMeshObjects: Z = originZ + FloorIndex * ceilingHeight
- HousingRoomEntity: FloorIndex set from room data (was hardcoded 0)
- HandleHousingRoomAdd: stairwell rooms go to FloorIndex+1
- SELECT/INSERT/UPDATE queries updated for floorIndex column
- Client door filtering uses FloorIndex to show/hide stair connections:
  Floor 0: hides downward stairs, Floor >=100: hides upward stairs
2026-04-08 19:33:57 -03:00
luis 86fa8081cd Housing: Fix interior dye + door teleport + decor selection prep
1. Dye: Sub-themes (e.g., 20=Folk Light) had no DB2 option entries.
   Added GetBaseThemeID() to convert sub-theme→base theme for lookup.
   Entity field gets the selected sub-theme, not the base.

2. Door GO teleport: Used cached _sourcePlotIndex=0. Now reads player's
   housing data directly (GetPlotIndex, GetNeighborhoodGuid) to find
   the correct exterior plot position.

3. Decor selection: Interior decor attaches to HousingRoomEntity (Housing
   GUID) instead of a MeshObject. Selection may require further work.
2026-04-08 19:28:39 -03:00
luis 415402966a Housing: Remove aggressive room migration that overwrites user placements
LoadFromDB migration replaced any non-Room-1 visual room with Room 1,
destroying user-placed rooms (Stairwell, Hallway, etc.) and resetting
gridX/gridY to 0 — causing rooms to overlap. Users can place ANY room
type as their visual room. Migration now only adds a default Room 1 if
the house has NO non-base rooms at all (empty house).
2026-04-08 14:37:02 -03:00
luis 5064bb65b8 Housing: Fix server crash — SetOwnerGUID aborts when owner already set by SummonGameObject 2026-04-08 13:27:02 -03:00
luis 9f7e181af9 Housing: Fix decor placement — send PLACE_RESPONSE before MeshObject CREATE
The client's placement state machine needs SMSG_HOUSING_DECOR_PLACE_RESPONSE
to finalize the current placement before receiving the UPDATE_OBJECT with the
new MeshObject. Wrong order (CREATE before RESPONSE) corrupted the state on
repeated placements, causing the preview to snap to camera ("flies to camera").

Packet order now: 1) PLACE_RESPONSE, 2) MeshObject CREATE, 3) Account update.
2026-04-08 13:25:48 -03:00
luis 770c8a2ead Housing: Fix interior door GO — use correct entry 575017 + displayId 113554
The interior exit door used entry 586576 (exterior door, displayId=116973)
which is invisible inside the interior. Retail uses entry 575017 with
displayId=113554 (standalone interior door model). Created GO template
with correct display, flags=0x40000, owner=HouseGUID.
2026-04-08 13:24:29 -03:00
luis a1297ae809 Housing: Fix interior door GO + room rotation in-place update
1. Interior door GO: The go_housing_door script only handled exterior
   (HousingMap) clicks. When clicked from interior (HouseInteriorMap),
   dynamic_cast failed → door did nothing. Now detects interior map and
   teleports player back to the neighborhood at the plot position.

2. Room rotation: Updates HousingRoomEntity orientation in-place via
   SetMirroredPosition() UPDATE_OBJECT instead of RefreshInteriorRoomVisuals.
2026-04-08 13:22:49 -03:00
luis 43c601c8ae Housing: Fix room rotation — in-place HousingRoomEntity orientation update
Room rotation now updates the HousingRoomEntity's FMirroredPositionData_C
orientation via SetMirroredPosition() instead of RefreshInteriorRoomVisuals
(which crashes). The client receives an UPDATE_OBJECT with the new rotation
quaternion and applies it visually without destroy+create.

Also added GetOriginX/Y/Z accessors to HouseInteriorMap.
2026-04-08 13:21:47 -03:00
luis 79b474834d Housing: Guard AddToWorld/RemoveFromWorld for housing session entities
HousingPlayerHouseEntity and HousingNeighborhoodMirrorEntity are
unique_ptr on WorldSession. Dereferencing them without null checks
crashes on fresh characters or edge cases where the session constructor
failed to initialize them. Added HasHousing*Entity() checks before
AddToWorld/RemoveFromWorld in Player::AddToWorld/RemoveFromWorld.
2026-04-08 13:18:33 -03:00
Céfiro_Caecias f398b21ad9 Update 2026_04_08_00_characters.sql.sql 2026-04-08 10:40:25 -03:00
luis d568a790be Housing: Fix decor placement crash — attach to Room entity not MeshObject
Interior decor used the first MeshObject GUID from _roomMeshObjects as
AttachParentGUID. After removing the root room MeshObject, this pointed
to a component MeshObject which the client couldn't resolve as a valid
parent (NULL+0x08). Sniff-verified: retail decor attaches to the
HousingRoomEntity (Housing/2 GUID), not a MeshObject.
2026-04-08 08:49:02 -03:00
luis 452f9fc846 Housing: Replace source wall with doorway when adding a room
When a room is added at a door pin, the source room's wall at that
connection was still showing as a solid Cosmetic wall (spawned before
the connection existed). Now ReplaceWallWithDoorway() destroys the
Cosmetic MeshObject and spawns DoorwayWall+Doorway MeshObjects in its
place, creating a visible passage between the rooms immediately.
2026-04-08 08:47:45 -03:00
luis d3887167b7 Housing: Fix room overlap — find wall offset without ConnectionType filter
Stairwell walls have ConnectionType=0, so the door offset lookup found no
opposite wall and defaulted to 0 → room placed at door position instead of
at the correct distance. Now searches for ANY wall in the opposite direction
(the furthest boundary) regardless of ConnectionType.

Also removed RefreshInteriorRoomVisuals from Rotate/Move/DoorType/CeilingType
handlers to prevent same-GUID DESTROY+CREATE crash.
2026-04-08 08:45:58 -03:00
luis 9ba677b2e0 Housing: Remove RefreshInteriorRoomVisuals from all handlers
RefreshInteriorRoomVisuals (destroy+create ALL rooms) crashes the client
with same-GUID DESTROY+CREATE in one packet. Removed from Rotate, Move,
SetDoorType, SetCeilingType handlers. These operations change metadata
only — the client handles visual updates from the response packet.

TODO: implement proper in-place UPDATE_OBJECT for room entity changes
(rotation, door type, ceiling type) instead of full visual refresh.
2026-04-08 08:44:21 -03:00
luis 6a2dd80d1e Housing: Fix door connections for yard-based room positions
Door adjacency checks used gridKey(GridX+1) which was correct for grid
indices but wrong for yard offsets. Entry at GridX=0 and Room1 at
GridX=15 are 15 yards apart, not 1 grid cell. Now uses findNeighborAtDoor
which searches all rooms in the door's facing direction instead of
looking for exact +1/-1 grid neighbors.
2026-04-08 08:42:22 -03:00