Commit Graph
100 Commits
Author SHA1 Message Date
luis 829178d3d0 db errors fix 2026-02-21 07:53:10 -03:00
luis 963a93fc28 battle_pet_ability_state 2026-02-21 06:38:44 -03:00
luis 1274a9f826 fix db2 names 2026-02-21 06:38:09 -03:00
luis 41af334e44 debug log 2026-02-21 06:15:37 -03:00
luis d4d00d560c Implement db2 and fix load 2026-02-21 05:47:48 -03:00
luis 9ccc36cc11 more debug logs 2026-02-21 05:18:50 -03:00
luis e921b68c85 move logs to debug sniff cause large db error 2026-02-21 05:12:32 -03:00
luis 98769d604b debug logs clean console 2026-02-21 05:04:13 -03:00
luis 69899d3ca7 db errors fix and move log to debug 2026-02-21 04:58:46 -03:00
luis e353d3078b all bot worldserver info move to debug 2026-02-21 04:37:13 -03:00
luis 94bcbb07d9 missing data 2026-02-21 04:25:25 -03:00
luis 9d8fc5e7b9 new garr tables 2026-02-21 04:23:13 -03:00
luis c706ac1789 Debug logs 2026-02-21 03:55:25 -03:00
luis a744423187 db errors fix 2026-02-21 03:26:40 -03:00
luis b015f345a5 more debug logs and fix table 2026-02-21 03:22:23 -03:00
luis f4b949345d debug log 2026-02-21 02:39:37 -03:00
luis 3901c0fe91 Garrison: Implement full mission lifecycle, follower management, and 33 handler stubs
Wire all 33 garrison CMSG opcodes and ~70 SMSG opcodes. Add complete mission
data model with DB persistence, start/complete/reward lifecycle, success chance
calculation, and follower XP progression. Implement follower operations including
assign/remove from buildings, rename, favorite, inactive, heal, and recruit stubs.
Add talent and building utility handler stubs that return appropriate error codes.
2026-02-21 02:05:28 -03:00
luis 95013cf470 move bot logs to debug part 1 and add db for garr missions 2026-02-21 01:50:51 -03:00
luis 811a491be1 Move log to debug so we not get spam 2026-02-21 00:32:26 -03:00
luis a5d186798e db alliance housing map correct fix 2026-02-21 00:07:08 -03:00
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
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
luis 204748c946 ++ 2026-02-20 08:17:32 -03:00
luis 92f0c7b66e typo fix 2026-02-20 08:15:32 -03:00
luis 73b50b3188 +++ 2026-02-19 22:04:33 -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
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
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
luis be4b5a3025 update 2026-02-19 20:35:21 -03:00
luis 806cc6193c ++ 2026-02-19 20:23:21 -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
luis f720d40f9b Housing: Fix empty NeighborhoodGUID for non-house-owning residents 2026-02-17 04:29:33 -03:00
luis 714ff6c110 Housing: Implement 8 improvements from retail packet sniff analysis
Wire format fixes:
- Split HouseStatusResponse.Status (uint32) into HouseStatus/PlotIndex/StatusFlags sub-fields
- Rename ResidentEntry.PlotIndex to StatusFlags (carries flag data, not plot index)
- Rename NeighborhoodPlayerEnterPlot.PlayerGuid to PlotAreaTriggerGuid (sends AT GUID)

Data structure optimization:
- Convert Neighborhood._plots from vector to fixed array<55> for O(1) plot access
- Add PlotInfo.IsOccupied() sentinel check, GetOccupiedPlotCount() helper
- Update all 8 callers across handlers, managers, and Player mirror data sync

Roster enhancement:
- Add HouseGuid as first field in roster member wire format (before PlayerGuid)
- Populate from plot data in both handler and Player roster builders

AreaTrigger integration:
- Add AreaTrigger::CreateStaticAreaTrigger() factory for non-caster ATs
- Add AreaTrigger::InitHousingPlotData() for HousingPlotAreaTriggerData fragment
- Spawn plot AreaTriggers (entry 37358) at HousePosition in HousingMap::LoadGridObjects
- Add SQL for areatrigger_create_properties (sphere, 40yd radius)

Plot aura system:
- Add at_housing_plot AreaTriggerAI script for plot enter/exit detection
- Apply own-plot aura (1266699) or visiting-plot aura (1239847) on AT enter
- Send SMSG_NEIGHBORHOOD_PLAYER_ENTER/LEAVE_PLOT packets

Multi-house architecture:
- Replace single _housing with vector<unique_ptr<Housing>> _housings
- Context-aware GetHousing() resolves via current HousingMap neighborhood
- Add GetHousingForNeighborhood(), GetAllHousings(), updated CreateHousing/DeleteHousing
- Update all handlers and HousingMap for multi-house semantics
2026-02-17 04:27:49 -03:00
luis 6b5c02fd42 Typo 2026-02-17 03:12:01 -03:00
luis a7129d7157 bpet crash fix 2026-02-17 02:11:40 -03:00
luis df1e69e8ea Fix housing old db2 and implement missing opcodes thanks agatho 2026-02-16 20:34:56 -03:00
luis 4e9c29d59e Housing: Remove 3 DB2 stores dropped before 12.0 2026-02-16 20:08:21 -03:00
luis db5cac7e66 comment unused old db2 2026-02-16 12:45:40 -03:00
luis c10780fc1e Housing: Fix wire formats and budget values from captured packet data 2026-02-16 12:43:53 -03:00
luis fbd66c676e Db error fix and playerhousing creature spawn fix flags and level 2026-02-16 11:34:15 -03:00
luis 995d977506 fix response 2026-02-16 10:53:57 -03:00
luis c0d2340edb fix dbs 2026-02-16 10:46:00 -03:00
luis 0bc24db851 Housing update part 1 2026-02-16 10:38:09 -03:00
luis 67fc4afaaa improve handler 2026-02-16 10:35:09 -03:00
luis f82a13d428 Fix packets 2026-02-16 10:33:30 -03:00
luis 43fc752c93 Housing: Wire neighborhood initialization into server lifecycle
Route housing maps (2735/2736) to per-neighborhood instances instead of
falling through to shared world map path. This connects the existing
HousingMgr/NeighborhoodMgr backend to the actual map creation pipeline.

- Add MapEntry::IsNeighborhood() for MAP_HOUSE_NEIGHBORHOOD detection
- Add MapManager::CreateHousing() factory and housing branch in
  CreateMap()/FindInstanceIdForPlayer() with auto-assignment via
  FindOrCreateTutorialNeighborhood()
- Fix HousingMap GUID mismatch (HighGuid::Uniq -> HighGuid::Housing)
  so LoadNeighborhoodData() resolves the neighborhood pointer correctly
- Make housing maps persistent (m_unloadTimer=0)
- Add AddPlayerToMap/RemovePlayerFromMap overrides for resident tracking
- Implement LoadGridObjects to dynamically spawn For Sale Sign (417487)
  on empty plots and Cornerstone (457142) on owned plots
- Fix HandleNeighborhoodOpenCornerstoneUI stub with real neighborhood/
  plot data lookup by matching cornerstone GO position to plot index
- Add 50% occupation expansion: auto-create new public neighborhoods
  when all existing ones for a faction reach 28/55 plots occupied
- Replace hardcoded neighborhood names with GenerateNeighborhoodName()
- Remove static cornerstone SQL spawns (now dynamic per-neighborhood)
2026-02-16 10:25:39 -03:00
luis c57252bfe5 Quest: Add quest session packet structures, handlers, and enable feature flag 2026-02-16 10:17:19 -03:00
luis c79d2d96fd Fix load of db2 2026-02-15 20:21:56 -03:00
luis 82b4567264 new db tables 2026-02-15 19:45:27 -03:00
luis bc721e58d2 Implement Chromie Time expansion selection system 2026-02-15 18:26:06 -03:00
luis 67203c331d Rework bpet 2026-02-15 18:09:47 -03:00
luis 6486c82d8e Bpet opcodes 2026-02-15 18:02:54 -03:00
luis 1bff3b088f Add load 2026-02-15 17:57:06 -03:00
luis 5b0e859777 initial bpet system part 1 2026-02-15 17:55:28 -03:00
luis c61b8a8f2f 65893 2026-02-15 17:33:28 -03:00
luis aa117f08c3 currency flags 2026-02-15 17:05:56 -03:00
luis 843652242a Full opcodes and spawn map for housing 2026-02-15 17:00:33 -03:00
luis bd2f6535b2 Core fix initial crashes 2026-02-15 16:55:34 -03:00
luis 51b67f6ee0 Playerhousing misc 2026-02-15 16:07:09 -03:00
luis d58362f3a2 Core playerhousing Most complete need change opcode status later 2026-02-15 11:11:11 -03:00
luis d95f86d2df fix sql char table 2026-02-12 21:53:42 -03:00
luis 92feff8094 Initial playerhousing work 2026-02-12 20:28:27 -03:00
luis c9b1dc2764 Remove to add full system 2026-02-12 20:12:49 -03:00
luis bdd3e31d15 Revert "Fix bot library"
This reverts commit 59972dcbbf.
2026-02-11 21:07:50 -03:00
luis 0c8542a77d Housing initial work 2026-02-11 21:06:37 -03:00
luis 59972dcbbf Fix bot library 2026-02-11 20:42:56 -03:00
luis 6b51f93585 Fixed db errors and spell procs wrong 2026-02-11 20:31:00 -03:00
luis 5528a23dd7 Core/Items: Implement CMSG_SELL_ALL_JUNK_ITEMS handler 2026-02-11 20:10:05 -03:00
luis 190dd2a3c3 Core/Items: Implement CMSG_SET_INSERT_ITEMS_LEFT_TO_RIGHT handler 2026-02-11 20:07:06 -03:00
luis 83ee5e3af0 rework 2026-02-11 19:55:00 -03:00
luis 5a0839fe33 Quest and misc db fixes 2026-02-07 13:58:22 -03:00
luis 609119b7b9 fix(bg): Break infinite recursion in BGRoleManager role assignment loop 2026-02-06 14:06:24 -03:00
luis 51296ba483 Midnight race and expansion enable remember change on worldserver.conf expansion 11 2026-02-04 23:08:01 -03:00
luis 7c975f6d77 typo 2026-02-04 22:13:51 -03:00
luis 5309b53266 blizzlike fixes 2026-02-04 22:11:55 -03:00
luis 356c5e3ab8 65727 2026-02-04 21:30:42 -03:00
luis 8a4e3d7f96 new build 2026-02-04 21:27:54 -03:00