Commit Graph
669 Commits
Author SHA1 Message Date
luis e8b9e085ee Fix plots 2026-02-21 00:00:19 -03:00
luis fcc32587fa Pet Battles: Fix all packet wire formats to match WoW 12.0 sniff
Analyzed a 12.0.1.66017 packet sniff using WowPacketParser and compared
every pet battle packet structure against our implementation. Fixed all
discrepancies to match Blizzard's actual wire format:

- SMSG_PET_BATTLE_FINALIZE_LOCATION: Replace single Position with full
  PetBattleLocation struct (LocationResult, BattleOrigin, BattleFacing,
  PlayerPositions[2])
- SMSG_PET_BATTLE_FINAL_ROUND: Completely restructured - no longer
  contains round data. Now contains Abandoned/PvpBattle flags, Winners,
  NpcCreatureIDs, and per-pet final results (PetBattleFinalPet)
- PetBattleEffectInfo: Add SourceAuraInstanceID (u16), TurnInstanceID
  (u16), fix CasterPBOID to uint8, reorder fields to match wire format
- PetBattleEffectTargetInfo: Type is now 3 bits (not uint8), variable-
  length params based on type (0-7 target types with 0-4 int32s each)
- PetBattleCooldownInfo: Add AbilityIndex and Pboid fields to match
  PetBattleAbilityInfo format (same wire structure from 6.2.4+)
- Round packets (FirstRound, RoundResult, ReplacementsMade): All three
  now share identical wire format via WriteRoundResult. Cooldowns moved
  from per-player to round-level flat array. Added PetXDied (3-bit
  count + PBOID entries)
- SMSG_PET_BATTLE_REPLACEMENTS_MADE: Now includes Effects (was missing)
- CMSG_PET_BATTLE_INPUT: MoveType changed from uint8 to int32, Round
  from uint8 to int32, added DebugFlags (int32) and BattleInterrupted
  (uint8) fields. Verified against raw hex: 19 bytes total
- CMSG_PET_BATTLE_REQUEST_WILD/PVP: Replace MovementInfo with proper
  PetBattleLocation struct matching WPP V6 parser
- SMSG_PET_BATTLE_PVP_CHALLENGE: Uses PetBattleLocation struct
2026-02-20 23:29:05 -03:00
luis bbbf99346b sync names 2026-02-20 23:02:30 -03:00
luis 4b4279a724 db blizzlike fixes 2026-02-20 23:00:08 -03:00
luis 269706edd1 build 66044 2026-02-20 22:33:32 -03:00
Shauren a13be38357 Core/Graveyards: Fixed subzone graveyard selection
Signed-off-by: luis <[email protected]>
2026-02-20 22:33:20 -03:00
luis 95a4535861 Missing 2026-02-20 22:24:57 -03:00
luis ae019241ae bpet and housing merge 2026-02-20 22:04:42 -03:00
luis 578cc76cc8 Housing: Add immediate DB persistence for PlaceDecor and RemoveDecor
PlaceDecor and RemoveDecor previously only modified in-memory state,
relying on SaveToDB at logout for persistence. A server crash would
lose all placed/removed decor changes since last save.

Add crash-safe immediate persistence:
- PlaceDecor: INSERT decor row + UPDATE catalog count on placement
- RemoveDecor: DELETE decor row + UPDATE catalog count on removal
- New prepared statements: CHAR_UPD_CHARACTER_HOUSING_CATALOG_COUNT,
  CHAR_DEL_CHARACTER_HOUSING_DECOR_SINGLE
2026-02-20 21:57:10 -03:00
luis 6742e1d1c9 Housing: Add house GO spawning, position persistence, decor GO spawning, and budget fix
Spawn the physical house structure GameObject when a player buys a plot,
using the DB2 PlotGameObjectID at the plot's HousePosition. Persist
player-chosen house positions to the database so they survive relogs.
Fix the SetHousePosition handler to actually store and apply the position
instead of being a no-op.

Spawn placed decor items as visible GameObjects with the FHousingDecor_C
entity fragment (InitHousingDecorData), following the cornerstone pattern.
Hook decor GO spawn/move/despawn into the Place/Move/Remove handlers so
furniture appears and updates in real time.

Fix outdoor decor budget enforcement: decor with roomGuid=0 now routes
to the exterior budget instead of always counting as interior.

Fix edit mode response wire format to match Fixture/Room pattern
(uint32 Result + Bit Active).

Set default _houseType to 32 (sniff-verified) instead of 0.
2026-02-20 21:55:29 -03:00
luis 478efe6b8e Housing: Fix edit mode wire format, GUID mismatches, and MapID update
Fix SMSG_HOUSING_DECOR_SET_EDIT_MODE_RESPONSE wire format - the uint8
between DecorCount and DecorGuids is a HousingResult status code (0=SUCCESS,
1=ACTION_LOCKED_BY_COMBAT), not an Active boolean. Writing 1 caused the
client to show "You can't do that while in combat" even when not in combat.

Fix NeighborhoodGuid mismatch between client-supplied DB2 ID and server
canonical counter by using neighborhood->GetGuid() consistently.

Fix JamCurrentHouseInfo GUID field swap (SecondaryOwnerGuid/PlotGuid).

Add Player::UpdateHousingMapId() to update PlayerMirrorHouse.MapID when
entering housing maps, using snapshot-clear-rebuild pattern to work around
DynamicUpdateField PublicSet=false restriction.

Add GUID mismatch fallback in HousingMap::AddPlayerToMap and proactive
SMSG_NEIGHBORHOOD_PLAYER_ENTER_PLOT send.
2026-02-20 21:45:22 -03:00
luis adf79e58f2 Housing: Fix permissions, edit mode response, and persistence
- Fix permissions handler: CMSG sends HouseGuid not PlayerGuid, compare
  against housing->GetHouseGuid() to detect owner (was always returning
  visitor permissions due to GUID type mismatch)
- Fix EditMode response wire format to match sniff: HouseGuid + PlotGuid
  + uint8 Active + uint32 Status + optional OwnerGuid (was uint32 + bit)
- Immediately persist housing to DB on creation so data survives restarts
- Update PlayerHouseInfoComponentData::Houses UpdateField mid-session so
  dashboard works without relogging after purchase
2026-02-20 21:38:42 -03:00
luis 32dad27a0a Housing: Fix post-purchase dashboard with sniff-verified packet formats
Correct multiple packet format mismatches preventing the housing dashboard
from populating after buying a plot:

- Fix HouseStatusResponse wire format: 3 PackedGUIDs + uint32 (was 4 + 2 uint8s)
- Fix PlayerHousesInfoResponse to use JamCurrentHouseInfo with correct field
  mapping: OwnerGuid=HouseGUID, SecondaryOwnerGuid=PlotGUID,
  PlotGuid=NeighborhoodGUID, Flags=PlotIndex, HouseTypeId=32
- Add PlotGUID generation (HighGuid::Housing subType=2) to Housing class
- Send FirstTimeDecorAcquisition packets for starter decor items after purchase
- Send 2x UpdateHousesLevelFavor with 36-byte format after purchase
- Fix owner permissions to 0xE0 (bits 5,6,7) instead of 0xFF
- Add serverside spell 1266097 for cornerstone UILink click handling
- Fix cornerstone GO interaction to cast spell instead of direct handler call
- Add createTime tracking to Housing for optional HouseId field
- Register housing spell script and new opcode handlers
2026-02-20 21:34:48 -03:00
luis 76942f6735 Housing: Fix cornerstone UI response wire format (add missing GUID, name, flags)
The client's 12.0 deserializer for SMSG_NEIGHBORHOOD_OPEN_CORNERSTONE_UI_RESPONSE
expects: uint32 Result, PackedGUID NeighborhoodGuid, PackedGUID PlotGuid,
uint64 Cost, uint8 PlotIndex, uint32+bytes NameString, uint8 OptionalFlags.

The previous implementation was missing the second PackedGUID (PlotGuid),
the length-prefixed neighborhood name string, and the optional flags byte.
Without the second GUID, the client read uint64(Cost) as a PackedGUID mask
byte, corrupting the entire packet parse and causing the JAM deserializer
to silently fail. The OPEN_PLOT_CORNERSTONE Lua event never fired, so the
purchase UI never appeared.
2026-02-20 16:01:45 -03:00
luis 6babcc6f4b Housing: Populate neighborhood GUID and name in roster response 2026-02-20 15:57:40 -03:00
luis a025e8ba54 spell proc 2026-02-20 08:19:24 -03:00
Shauren 265b3dbeaf Core/Scripts: Expose Spell::GetUnitTargetIndexForEffect in scripts
Signed-off-by: luis <[email protected]>
2026-02-20 08:19:16 -03:00
luis 204748c946 ++ 2026-02-20 08:17:32 -03:00
Jeremy 973fc27bcd DB/Spells: Added proc data for Ragedrinker (Fury Warrior Talent) (#31667)
Signed-off-by: luis <[email protected]>
2026-02-20 08:17:03 -03:00
Jeremy 9b975e5d78 Scripts/Spells: Added crit multiplier for Deft Experience (Fury Warrior Talent) (#31666)
Signed-off-by: luis <[email protected]>
2026-02-20 08:16:31 -03:00
luis 92f0c7b66e typo fix 2026-02-20 08:15:32 -03:00
Jeremy c0c3c93e24 Scripts/Spells: Update warrior talent Frenzy (#31665)
Signed-off-by: luis <[email protected]>
2026-02-20 08:15:21 -03:00
Jeremy e53e5c778b DB/Spells: Add proc data for Bloodborne (Fury Warrior Talent) (#31664)
Signed-off-by: luis <[email protected]>
2026-02-19 22:08:33 -03:00
Aqua Deus 52b5f8575f Scripts/Spells: Implement dk talent Blood Bond talent (#31652)
Signed-off-by: luis <[email protected]>
2026-02-19 22:06:51 -03:00
luis 73b50b3188 +++ 2026-02-19 22:04:33 -03:00
Shauren 678a0af72d Core/Transports: Fixed transport path length calculation for transports that teleport on the same map or havev Delay on their first waypoint
Signed-off-by: luis <[email protected]>
2026-02-19 22:04:25 -03:00
luis 80b48ed376 ++++ 2026-02-19 22:02:39 -03:00
luis 3c0eba1d77 CMSG_SPAWN_TRACKING_UPDATE 2026-02-19 21:58:17 -03:00
luis a52fee1531 65940 2026-02-19 21:57:04 -03:00
luis fb2af6d9ef +++ 2026-02-19 21:55:56 -03:00
luis 6b1be45948 typo 2026-02-19 21:52:46 -03:00
luis 549d636f96 Pet Battles: Fix all client enum mismatches to match WoW 12.0 2026-02-19 21:19:23 -03:00
luis 8b0c12f566 Pet Battles: Full 12.0 audit, fix type matrix, add NPC battles, complete PvP flow
- Fix type effectiveness matrix (9/10 rows had wrong strong/weak, 0.67->0.66)
- Fix state machine enum to match client (add CREATED_FAILED, FINAL_ROUND)
- Add PetBattleEffectFlags (miss/crit/heal/immune/strong/weak) and populate them
- Add post-battle health sync back to journal with 50% auto-heal
- Add missing effect types (REPLACE_PET, OVERRIDE_ABILITY, WORLD_STATE_UPDATE)
- Implement GetTrapStatus() with full validation (species, health, journal)
- Add PetBattlePetStatusFlags and compute from pet state
- Add PetBattleInputFlags (ability/swap locked, waiting for pet)
- Add ability lockdown tracking alongside cooldowns
- Add critical hit system (5% base, 1.5x multiplier) via DamageResult struct
- Expand PetBattleRequestFailReason to 24 values matching client
- Add max game length warning (5 min before timeout)
- Implement NPC trainer battles (LoadNPCTeams from world DB, CreateNPCBattle,
  InitNPCBattle, GenerateNPCTeamInput with enhanced AI)
- Add battle_pet_npc_team SQL schema
- Complete PvP flow: full validation, accept/decline, proper queue status codes
- Add PvP forfeit penalty (Pet Battle Deserter debuff)
- Add SMSG_BATTLE_PETS_HEALED and SMSG_BATTLE_PET_TRAP_LEVEL packets
- Register CMSG_BATTLE_PET_UPDATE_DISPLAY_NOTIFY handler
- Add boss pet handling (damage cap at 35% max HP, not capturable)
- Add aura state flags (JUST_APPLIED on creation, INFINITE for permanent)
- Add achievement criteria (WinPetBattle, LosePetBattle, capture)
2026-02-19 21:16:30 -03:00
agathoandClaude Opus 4.6 ef377b2246 Housing: Fix tutorial sending HouseStatus=1 without a house
The StartTutorial handler was sending HouseStatus=1 (active house)
with populated owner GUIDs but no HouseGuid and PlotIndex=0xFF.
The client interprets HouseStatus=1 as "player owns a house," which
prevents the Cornerstone "For Sale" purchase UI from displaying —
the client thinks the player is already a homeowner.

During the tutorial the player has no house yet, so send the default
empty response (HouseStatus=0, all GUIDs empty). The neighborhood
context is already provided by SMSG_HOUSING_GET_CURRENT_HOUSE_INFO_RESPONSE
when the player enters the HousingMap.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-19 21:06:52 -03:00
agathoandClaude Opus 4.6 210ca3bf70 Housing: Don't populate owner GUIDs in HouseStatus when player has no house
The no-house path was setting OwnerBNetGuid and OwnerPlayerGuid in
SMSG_HOUSING_HOUSE_STATUS_RESPONSE even though HouseGuid was empty
and HouseStatus was 0. This is inconsistent — a response with no
house should have all-empty GUIDs and PlotIndex=0xFF (the default).

Neighborhood context is already provided separately via
SMSG_HOUSING_GET_CURRENT_HOUSE_INFO_RESPONSE sent in
HousingMap::AddPlayerToMap().

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-19 21:05:50 -03:00
agathoandClaude Opus 4.6 612c75a683 Housing: Send neighborhood context on map entry and import AT 37358
Two fixes to enable Cornerstone click interaction:

1. Send SMSG_HOUSING_GET_CURRENT_HOUSE_INFO_RESPONSE proactively in
   HousingMap::AddPlayerToMap() so the client can call
   SetViewingNeighborhood() and populate its global housing context.
   Without this, GetCornerstoneNeighborhoodInfo() returns empty data
   and the Cornerstone purchase UI cannot display.

2. Add SQL migration for AreaTrigger entry 37358 (housing plot AT)
   with ScriptName='at_housing_plot', Shape=Sphere, radius=40 yards.
   Without this in the database, CreateStaticAreaTrigger() silently
   fails and SMSG_NEIGHBORHOOD_PLAYER_ENTER_PLOT never fires.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-19 21:05:05 -03:00
luis da25c82c31 typo 2026-02-19 21:04:29 -03:00
luis ba19a0315f Housing: Populate FJamHousingCornerstone entity fragment on plot GOs 2026-02-19 21:03:08 -03:00
agathoandClaude Opus 4.6 1d4aca4fd2 Housing: Fix plot rendering - use Cornerstone GO with GOState toggle
Retail packet sniff analysis proves that ALL housing plots use a single
Cornerstone GameObject (entry 457142, DisplayID 110660, Type 48/UILink)
with GOState toggling to communicate ownership:
  - GOState 0 (ACTIVE) = For Sale / unoccupied
  - GOState 1 (READY) = Owned / occupied
  - All Cornerstones have Flags=32 (GO_FLAG_NODESPAWN)

The previous implementation spawned a fabricated "For Sale" sign
(entry 417487, DisplayID 8206) for unoccupied plots. DisplayID 8206 is
a vanilla-era model that renders as a flat brown rectangle.

Changes:
- SpawnPlotGameObjects: Always use CornerstoneGameObjectID, set GOState
  based on ownership, apply GO_FLAG_NODESPAWN
- Replace SwapPlotGameObject (destroy/recreate) with SetPlotOwnershipState
  (GOState toggle on existing Cornerstone)
- Simplify all 3 callers (ReservePlot, BuyHouse, EvictPlot) to pass
  bool ownership instead of GO entry IDs
- Remove fabricated entry 417487 from world SQL

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-19 21:00:32 -03:00
agathoandClaude Opus 4.6 98795165b0 Housing: Add ALTER TABLE migration for 3 new character_housing columns
Adds exteriorLocked, houseSize, and houseType columns to existing
character_housing tables via ALTER TABLE (the schema file was updated
in the prior commit but existing databases need this migration).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-19 20:59:33 -03:00
luis 2771afc709 Housing: Fix enums, spell effects, and handler logic from client binary audit 2026-02-19 20:58:55 -03:00
luis e16cb3c33d Housing: Eagerly spawn all plot GOs at map creation 2026-02-19 20:38:15 -03:00
agathoandClaude Opus 4.6 34afbe0564 Housing: Route debug logging to 'housing' channel
The 'maps' logger is at WARNING level by default, suppressing
all DEBUG messages. Route HousingMap and MapManager neighborhood
logging to the 'housing' channel which is at TRACE level and
writes to Housing.log.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-19 20:36:09 -03:00
luis be4b5a3025 update 2026-02-19 20:35:21 -03:00
luis 806cc6193c ++ 2026-02-19 20:23:21 -03:00
agathoandClaude Opus 4.6 70823e16fd Housing: Add Alliance neighborhood world data for Map 2735
Creature templates, spawns, models, gameobject templates, spawns,
gossip menus, vendor inventories, quest data, and trainer spells
for the Alliance housing neighborhood (The Aerie).

Column names adapted to current TrinityCore creature_template schema
(type/family/Classification, 64-bit npcflag).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-19 20:22:26 -03:00
agathoandClaude Opus 4.6 682cf56f05 Housing: Add GO swap on plot purchase/eviction and fix HouseFinder
Track plot GameObjects in HousingMap so for-sale-signs can be swapped
to cornerstones on purchase and reverted on eviction. Previously the
visual GO never changed after PurchasePlot(), leaving stale for-sale
signs on owned plots.

Fix HouseFinder neighborhood detail to show all 55 DB2 plots with
availability and cost instead of only listing occupied plots, so the
client can render the full plot grid.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-19 20:13:03 -03:00
luis 9bd5bcebb7 build fix 2026-02-17 05:18:33 -03:00
luis 9c228aba41 to do later 2026-02-17 05:14:54 -03:00
luis 9cb8d14edf bpet try fix crash on battle 2026-02-17 04:33:45 -03:00