Commit Graph
816 Commits
Author SHA1 Message Date
Céfiro_Caecias 0904a357a8 DB/World: TC Tables Calibrations 2026-03-11 17:01:04 -03:00
Céfiro_Caecias 9711520b0e Update README.md 2026-03-11 16:16:34 -03:00
luis 728fb96387 +++ 2026-03-11 14:20:53 -03:00
luis 6e05686bfe typo 2026-03-11 14:17:28 -03:00
luis 8a7bf4fe76 duplicate 2026-03-11 14:03:15 -03:00
Shauren 154d79123c Core/AuctionHouse: Replace IteratorPair with std::span
Signed-off-by: luis <[email protected]>
2026-03-11 14:01:19 -03:00
luis 7bb714e7dc Missing tables 2026-03-11 13:57:54 -03:00
luis 2a3d992f66 missing changes 2026-03-11 13:53:41 -03:00
luis b9425b5542 rework 2026-03-11 13:45:47 -03:00
luis 4066c83108 Core/Conditions: Allow CONDITION_NONE to be used without a script if NegativeCondition is 1 2026-03-11 08:50:23 -03:00
Shauren cb995fb8e9 Core/Conditions: Replace Condition::ToString with fmt::formatter
Signed-off-by: luis <[email protected]>
2026-03-11 08:46:54 -03:00
luis 456d69d25a Core/Quests Implement quest campaigns 2026-03-11 08:46:19 -03:00
luis 8fdb729d0b Core/Quests: Move questline handling to new QuestMgr namespace and implement SPELL_EFFECT_SKIP_QUESTLINE 2026-03-10 22:04:58 -03:00
luis 418ebd03cf fix crash 2026-03-10 20:45:23 -03:00
MoltenCrystal 3679885aed Scripts/Spells: Update Consecration areatrigger script (#31715)
Signed-off-by: luis <[email protected]>
2026-03-10 20:42:19 -03:00
luis 9837379646 improved race haranir 2026-03-10 20:42:01 -03:00
MoltenCrystal 988fc809b5 Scripts/Spells: Update Judgment (#31714)
Signed-off-by: luis <[email protected]>
2026-03-10 20:42:01 -03:00
Céfiro_Caecias d4d93577cc DB/World: DBErrors Fixes 2026-03-10 20:33:52 -03:00
luis 9b5cf857c8 new race 2026-03-10 20:13:25 -03:00
luis 42ef944517 Housing: Fix 0/0 decor budget display by sending CREATE for missing entities
Account and HousingPlayerHouseEntity get destroyed on the client during
map transfers to the housing map. The edit mode handler always sent
VALUES_UPDATE, which the client "rescued" (ignored) because the entities
no longer existed in its object cache.

Now check HaveAtClient() first — if the client doesn't have the entity,
send a full CREATE_OBJECT and re-register the GUID in m_clientGUIDs.
This ensures the client receives InteriorDecorPlacementBudget, storage
entries, and DecorMaxOwnedCount needed for the decor count display.
2026-03-10 19:55:50 -03:00
luis b299277770 Housing: Fix initiative packet parsing, opcode collisions, and tutorial CVar timing
- Fix CMSG_INITIATIVE_REPORT_PROGRESS ByteBufferException: packet only
  contains a packed NeighborhoodGuid (sniff-verified 7 bytes), not three
  extra uint32 fields. Handler now just sends initiative info back.

- Fix 4 SMSG initiative opcode collisions (0x420369-0x42036C) with
  existing opcodes (CATALOG_SHOP_OBTAIN_LICENSE, MIRROR_VARS,
  SET_INSTANCE_LEAVER, UNSET_INSTANCE_LEAVER). Reassigned to
  0x420380-0x420383.

- Fix tutorial mode still blocking editor: CVar injection in
  Player::LoadFromDB happened after the client already fetched account
  data during auth. Added SendAccountDataTimes() after SetAccountData()
  to force the client to re-fetch the updated GLOBAL_CONFIG_CACHE with
  housingTutorialsEnabled=0 and closedInfoFramesAccountWide bits.

- Reset FHousingStorage_C populated flag on every edit mode entry so
  the Account VALUES_UPDATE always carries the full storage map.

- Remove FHousingDecorActor_C fragment from decor MeshObjects (sniff
  analysis confirmed fragment 28 is not present on any retail entity).

- Use DROP+CREATE instead of CREATE IF NOT EXISTS in initiative SQL
  to prevent stale schema from persisting silently.
2026-03-10 19:54:41 -03:00
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
Céfiro_Caecias 1f7df8c94c DB/World: DBErrors Fixes 2026-03-10 10:14:38 -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
Céfiro_Caecias 30b2499af7 Add files via upload 2026-03-09 21:59:45 -03:00
Céfiro_Caecias 6d0d626901 DB/World: DBErrors Fixes 2026-03-09 20:05:55 -03:00
Céfiro_Caecias 344b48471f DB/Hotfixes: DBErrors item_sparse 2026-03-09 20:05:21 -03:00
Céfiro_Caecias 860ae25682 Update 2026_03_09_00_delete_customs.sql 2026-03-09 14:30:11 -03:00
Céfiro_Caecias c6c3aeda40 DB/World: Delete Customs 2026-03-09 08:41:50 -03:00
Céfiro_Caecias 24d762aa1c DB/World: DBErrors Fixes 2026-03-08 13:25:35 -03:00
Céfiro_Caecias dc846c3c73 DB/World: DBErrors Fixes 2026-03-07 21:47:17 -03:00
Céfiro_Caecias d248e840fc DB/Hotfixes: DBErrors item_sparse 2026-03-07 21:46:40 -03:00
Céfiro_Caecias 2382b7dba5 DB/World: DBErrors Fixes 2026-03-07 15:46:31 -03:00
Sefrenia 119a054085 Limpieza Febrero 2026 2026-03-07 09:00:51 -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