How xreveres/herozserver works
HeroZServer is a private PHP game server for HeroZ, backed by MariaDB. A client request enters the server dispatcher, which initializes runtime services, resolves the player session, invokes an action handler, and persists changed records. Handlers support character progression, quests and battles, inventory and rewards, guild activities, messaging, and leaderboards; the README also documents resource storage and daily-login bonuses. The graph uses sampled dispatcher and handler code plus SOURCE INDEX references; several feature implementations are represented at their existing request-directory path because they were not sampled.
Main entry points: Core.php Request dispatcher · Player.php Player state · Record.php Record persistence · Fight.php Fight logic
Components 23
Request runtime
- Request entry
server/request.php - Request dispatcher
server/src/Core.php - Configuration
server/src/Config.php - Response handling
server/src/Req.php - Cache
server/src/Cache.php - Action handlers
server/request
Player progression
- Player state
server/class/Player.php - Energy and training storage
server/request/useEnergyStorage.req.php - Inventory and bank
server/dbschema/BankInventory.php - Item catalog
server/class/Utils/ItemsList.php - Item utilities
server/class/Utils/Item.php
Battles and rewards
- Quest catalog
server/class/Utils/QuestList.php - NPC catalog
server/class/Utils/NPCList.php - Fight logic
server/class/Fight.php - Reward logic
server/class/Reward.php - Slot machine
server/class/Bonus/SlotMachine.php
Guilds and messaging
- Guild activities
server/class/GuildsBattle.php - Guild leaderboard
server/request/retrieveGuildLeaderboard.req.php
Persistence
- Character record
server/dbschema/Character.php - Message records
server/dbschema/Messages.php - Record persistence
server/src/Record.php - MariaDB
Other components
- Game client
Connections 30
- Game client → Request entry: sends request
- Request entry → Request dispatcher: starts runtime
server/request.php - Request dispatcher → Configuration: initializes
server/src/Core.php - Request dispatcher → Cache: initializes
server/src/Core.php - Request dispatcher → MariaDB: initializes
server/src/Core.php - Request dispatcher → Player state: loads session
server/src/Core.php - Request dispatcher → Action handlers: dispatches action
server/src/Core.php - Request dispatcher → Response handling: sets errors
server/src/Core.php - Request dispatcher → Player state: ends request
server/src/Core.php - Request dispatcher → Record persistence: saves records
server/src/Core.php - Energy and training storage → Player state: updates resources
server/request/useEnergyStorage.req.php - Energy and training storage → Configuration: reads costs
server/request/useEnergyStorage.req.php - Energy and training storage → Response handling: sets response data
server/request/useEnergyStorage.req.php - Player state → Character record: uses character
server/class/Player.php - Player state → Item utilities: uses item utilities
server/class/Player.php - Item utilities → Item catalog: uses item list
server/class/Utils/Item.php - Player state → Fight logic: provides combatant
server/class/Fight.php - Fight logic → Player state: uses player state
server/class/Fight.php - Slot machine → Reward logic: creates reward
server/class/Bonus/SlotMachine.php - Slot machine → Configuration: reads reward settings
server/class/Bonus/SlotMachine.php - Guild activities → Fight logic: uses battle logic
server/class/GuildsBattle.php - Guild activities → Player state: uses player logic
server/class/GuildsBattle.php - Guild leaderboard → Configuration: reads settings
server/request/retrieveGuildLeaderboard.req.php - Guild leaderboard → Response handling: sets response data
server/request/retrieveGuildLeaderboard.req.php - Character record → Record persistence: extends record
server/dbschema/Character.php - Inventory and bank → Record persistence: extends record
server/dbschema/BankInventory.php - Message records → Record persistence: extends record
server/dbschema/Messages.php - Record persistence → MariaDB: reads and writes
server/src/Record.php - Quest catalog → Player state: catalog association
- NPC catalog → Fight logic: combat association