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
This commit is contained in:
@@ -0,0 +1 @@
|
||||
ALTER TABLE `character_housing_rooms` ADD COLUMN IF NOT EXISTS `floorIndex` INT NOT NULL DEFAULT 0 AFTER `gridY`;
|
||||
Reference in New Issue
Block a user