Commit Graph
881 Commits
Author SHA1 Message Date
luis 9bbebb333b trading post 2026-03-15 19:57:25 -03:00
luis 02ac83d4af trading post 2026-03-15 19:40:29 -03:00
luis cf8d0f8b00 new housing 2026-03-15 18:16:17 -03:00
luis 2f5144077e Housing: Fix DB2 field ordering, door placement, and fixture validation
Fix ExteriorComponentHookEntry struct field order to match DB2 LoadInfo
(Position/Rotation before ID when IndexField=2), resolving garbage hook
IDs during fixture resolution.

Replace first-match door hook selection with center-front scoring
heuristic (|X|*2 + Y) to ensure the main entrance spawns at the front
of the house rather than on a side/back wall.

Add fixture validation in SelectFixtureOption: enforce component type
must match hook type, and only one door allowed per house. This prevents
placing windows at door hooks and spawning multiple entrances.

Only auto-resolve the single best door hook during SpawnExtCompTree —
other fixture types (windows, chimneys, dormers) require explicit player
selection, matching retail behavior where they unlock via progression.

Additional fixes: unique fixture GUIDs via atomic counter (subType=5),
size-aware default fixture lookup, range-based DB2 store iteration,
and starter fixture migration that preserves existing roots.
2026-03-15 17:59:32 -03:00
luis dd888b36db Housing: Add racial house styles and starter fixture persistence
Map player race to house exterior WMO style on purchase:
Night Elf → Woodland (55), Blood Elf → Engraved (56),
other Alliance → Human (9), other Horde → Orc (87).

On house creation, persist starter fixtures (Base + Roof) to
character_housing_fixtures so spawning reads from DB rather than
relying on runtime default resolution. Door auto-resolves from
the hook system via GetDefaultFixtureForType.
2026-03-15 17:54:46 -03:00
luis 06a4b3f844 Housing: Refactor fixture resolution to direct (type, wmoDataID) lookup
Replace the broken GroupXHook→Group→XGroup chain with a direct
_defaultFixtureByTypeWmo index that maps (componentType, wmoDataID)
to the default fixture component ID. This correctly resolves fixtures
for all 4 racial house styles (Human/NightElf/BloodElf/Orc).

Key changes:
- BuildExteriorComponentIndexes: filter structural roots by
  ExteriorComponentType.ParentComponentType==0 with hardcoded
  fallback for broken DB2 store iteration
- New GetDefaultFixtureForType() replaces GetComponentAtHook()
- SpawnExtCompTree uses type+WMO lookup for hook children
- Door GO spawning fully data-driven from DB2 (entry + position
  from hook offset + ExitPoint offset)
- Root selection: rootOverrides → coreExtCompID → default → first
- Fix missing fixture overrides on late-spawn path
- Add GetRootComponentOverrides() for player-selected root variants
2026-03-15 17:52:14 -03:00
luis 29d7e7689b typo 2026-03-15 17:27:47 -03:00
luis d08f65b834 world quest changes 2026-03-15 17:26:25 -03:00
StorM aa9f12cb17 fix quest zone_tirisfal_glades.cpp 2026-03-15 20:05:34 +01:00
StorM 9f518f651d duplicity QuestPackets.h 2026-03-15 19:29:35 +01:00
luis c9d5652b32 typo 2026-03-15 15:01:33 -03:00
luis 570f4935c9 missing packet 2026-03-15 14:59:41 -03:00
luis 3c84a9793c typo 2026-03-15 14:52:29 -03:00
StorM 64c9714626 Core: Updated allowed build to 12.0.1.66384 2026-03-15 18:34:58 +01:00
StorM f2265ff263 Fix error zone_tirisfal_glades.cpp
fix mess in .cpp
2026-03-15 16:27:25 +01:00
StorM 093770576d Fix compilation HousingPackets.h 2026-03-15 15:59:53 +01:00
luis 6ceb6bae47 new spells 2026-03-15 11:02:20 -03:00
luis b9275f314b new undead zone scripts 2026-03-15 10:52:47 -03:00
luis c67de7f095 world quest part 1 2026-03-14 13:10:10 -03:00
luis 787e355835 need check on ida 2026-03-14 09:19:51 -03:00
luis b8dd010248 fix crash 2026-03-14 09:10:37 -03:00
luis 1826c9d792 typo 2026-03-14 08:44:25 -03:00
luis bb22e56f7c core improvements 2026-03-14 08:36:09 -03:00
luis 788094aebc Housing: Fix exterior component tree spawning with data-driven multi-root architecture
- Fix DB2 store iteration bug: ExteriorComponentHook entries with
  ParentIndexField were only partially accessible via range-based
  iteration (1808 of 23881 entries). Use LookupEntry() over
  GetNumRows() to reach all entries, fixing hook resolution
  (compByHook was 0, now resolves all 1461 GroupXHook mappings).

- Spawn all root components per HouseExteriorWmoDataID: houses
  consist of multiple independent roots (Base type=9, Roof type=10)
  sharing the same WMO data ID. Each root spawns independently at
  house position with its own hook children (doors on base,
  chimney/windows on roof). Filter by Size to avoid spawning
  small/medium/large variants simultaneously.

- Build parent-child index from ExteriorComponent.ParentComponentID
  for component variants that reference a parent component.

- Add _rootCompsByWmoDataId index for fast lookup of all root
  components belonging to a house exterior.

- Fix MeshObject fixture data to pass fixtureGuid and
  parentFixtureGuid for proper client-side attachment hierarchy.

- Fix BNetAccount dirty state in fixture edit mode by clearing
  update mask after PopulateCatalogStorageEntries.
2026-03-14 07:45:27 -03:00
luis e9876286b9 initial trading post it have mem leak and dragonriding base 2026-03-14 07:08:14 -03:00
luis 19177a9f6a fix build 2026-03-13 22:16:05 -03:00
luis ae2e9ffda5 same 2026-03-13 21:55:19 -03:00
luis 469318460f Reduce memory 2026-03-13 21:53:10 -03:00
luis f6b9191c9f fix build 2026-03-13 21:49:44 -03:00
luis 62918918a9 remove 2026-03-13 21:34:41 -03:00
luis c47ddd83bf Housing: Audit DB2 field names against WoWDBDefs, wire CriteriaTree-based initiative task matching
Comprehensive audit of all neighborhood and housing DB2 tables against
WoWDBDefs canonical field definitions. Renames all misnamed fields across
DB2Structure.h, DB2LoadInfo.h, and internal cache structs in HousingMgr.h.

Key field corrections across 12 DB2 tables:
- NeighborhoodMap: Radius→EntryRotation, PlotCount→UiTextureKitID, FactionRestriction→Flags
- NeighborhoodNameGen: Suffix→Middle, FullName→Suffix
- HouseTheme: IconFileDataID→Flags, CategoryID→ParentThemeID
- HouseDecorMaterial: 5 fields renamed (WMOMaterialReference, MaterialTextureIndex, etc.)
- HouseLevelRewardInfo: HouseLevelID→HouseLevelDataID, RewardType→Field_4, RewardValue→IconFileDataID
- InitiativeCycle: Duration→HouseXPCap
- InitiativeMilestone: 4 fields renamed (MilestoneOrderIndex, RequiredContributionAmount, etc.)
- InitiativeReward: 7 fields renamed (Money, DecorID, DecorQuantity, Favor, RewardQuestID, etc.)
- InitiativeTask: 6 fields renamed (CriteriaTreeID, QuestID, ProgressContributionAmount, etc.)
- DecorCategory/DecorSubcategory/DecorDyeSlot: display fields renamed

Logic bugs revealed and fixed by the audit:
- Budget wiring removed (DB2 has no budget type/value; budgets come from hardcoded table)
- Initiative task type filtering removed (CriteriaTreeID is a FK, not a type enum)
- Initiative target counts fixed (was using QuestID as threshold, now ProgressContributionAmount)
- Initiative duration sourced from NeighborhoodInitiative.Duration, not InitiativeCycle.HouseXPCap
- Initiative rewards rewritten to use correct DB2 fields (Money, DecorID, Favor, etc.)
- Plot count derived from actual plot data instead of misnamed UiTextureKitID field
- NeighborhoodMgr faction checks updated to use Flags with confirmed bitmask values

CriteriaTree-based initiative task matching:
- Replace 4 ad-hoc OnPlayerAction() calls that used non-existent TaskType enum (1-4)
- Add single hook in CriteriaHandler::UpdateCriteria after validation passes
- BuildCriteriaIndex() walks each task's CriteriaTree to find leaf Criteria entries,
  builds reverse index CriteriaID → (neighborhood, initiative, task) for O(1) lookup
- OnCriteriaProgress() matches criteria fires against active initiative tasks,
  covering all 250+ criteria types (kills, crafting, gathering, quests, etc.) automatically
- Index rebuilt on initiative start/complete to stay current
2026-03-13 21:24:12 -03:00
Shauren 7274ff07fb Core/Misc: Reduce memory usage when data query cache is disabled in config
Signed-off-by: luis <[email protected]>
2026-03-13 19:34:15 -03:00
Shauren 291526eebb Core/Misc: Add missing includes and remove unneccessary Bag::GetDebugInfo override
Signed-off-by: luis <[email protected]>
2026-03-13 19:33:06 -03:00
luis 1473595f13 log 2026-03-13 19:30:20 -03:00
luis d9c86296b1 typo 2026-03-13 02:58:36 -03:00
luis 59d8341d7f garrison_commandscript 2026-03-13 02:57:07 -03:00
luis c5eb1cc2ad Fix mem leak and fix garr buildings ui 2026-03-13 02:06:04 -03:00
luis af95f1df16 try fix garr ui 2026-03-13 01:49:28 -03:00
luis f2de90e74c CRITICAL FIX: Correct destination Z to ground level to prevent flying or underground movement 2026-03-12 21:35:53 -03:00
luis c85fdc5e58 fix bg bot part 1 2026-03-12 21:27:11 -03:00
luis 48630fdc38 typo 2026-03-12 20:43:49 -03:00
luis 5d670be3c8 try fix bg playerbots 2026-03-12 20:12:13 -03:00
Shauren 5badcaaf3c Core/Spells: Fixed spell visual selection
Signed-off-by: luis <[email protected]>
2026-03-12 19:49:00 -03:00
Shauren 9e0d2040f2 Core/Misc: Remove outdated TODO comment
Signed-off-by: luis <[email protected]>
2026-03-12 19:44:25 -03:00
Shauren 786dee89e2 Scripts/Spells: Handle haranir Shadowy Apparitions spell visual
Signed-off-by: luis <[email protected]>
2026-03-12 19:43:26 -03:00
Céfiro_Caecias b6293c49ad DB/World: DBErrors Fixes 2026-03-12 12:24:17 -03:00
luis 4c1530fb2e missing sql 2026-03-12 08:46:19 -03:00
luis 1029149df0 Pet Battles: Teleport player behind pet at battle start
PlayerPositions in SMSG_PET_BATTLE_FINALIZE_LOCATION does not move the
player character. Use NearTeleportTo to explicitly position the player
5 units behind the midpoint along the facing axis.
2026-03-12 08:38:20 -03:00
luis 05828b9eac Pet Battles: Fix weather env slot, generic detection, multi-hit overkill
- Weather now targets environment slot 2 (PBOID 8 / PetbattleEnviros::Weather)
  instead of slot 0 (Pad0), matching client expectations
- Replace hardcoded weather ability name list with generic DB2-driven detection:
  PropsID chain walk + reverse AuraBattlePetAbilityID walk + BattlePetAbilityState
  diagnostic logging to discover remaining weather abilities
- Multi-hit abilities now stop when the target dies (prevents overkill)
- Battle positioning: offset player 5 units behind pet along facing axis
2026-03-12 08:37:35 -03:00
luis cf2fcb272a Pet Battles: Implement weather system and battle positioning 2026-03-12 08:35:37 -03:00