Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions dev/GameServer.Dockerfile

This file was deleted.

3 changes: 2 additions & 1 deletion dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ This folder contain docker images for development purpose
# How to start server
1) `docker-compose up -d realm`
2) Wait 5 seconds
3) `docker-compose up -d game`
3) `docker-compose up -d cluster`
4) `docker-compose up -d world`

# How to stop server
docker-compose down
18 changes: 18 additions & 0 deletions dev/configuration.distributed.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,24 @@
"CharacterDatabase": "root;rootpass;mysql;3306;mangosVBcharacters;MySQL",
"WorldDatabase": "root;rootpass;mysql;3306;mangosVBworld;MySQL"
},
"Federation": {
"Enabled": false,
"LocalClusterId": 1,
"LocalDisplayTag": "MS",
"ListenAddress": "0.0.0.0",
"ListenPort": 50101,
"MarkerMode": "ClientPreference",
"Peers": []
},
"Supervisor": {
"Enabled": false,
"HeartbeatIntervalMs": 5000,
"StaleAfterMissed": 3,
"DeadAfterMissed": 5,
"RespawnBackoffStepMs": 2000,
"RespawnBackoffMaxMs": 60000,
"Worlds": []
},
"World": {
"ClusterConnectHost": "cluster",
"ClusterConnectPort": 50001,
Expand Down
18 changes: 18 additions & 0 deletions dev/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,24 @@
"CharacterDatabase": "root;rootpass;mysql;3306;mangosVBcharacters;MySQL",
"WorldDatabase": "root;rootpass;mysql;3306;mangosVBworld;MySQL"
},
"Federation": {
"Enabled": false,
"LocalClusterId": 1,
"LocalDisplayTag": "MS",
"ListenAddress": "0.0.0.0",
"ListenPort": 50101,
"MarkerMode": "ClientPreference",
"Peers": []
},
"Supervisor": {
"Enabled": false,
"HeartbeatIntervalMs": 5000,
"StaleAfterMissed": 3,
"DeadAfterMissed": 5,
"RespawnBackoffStepMs": 2000,
"RespawnBackoffMaxMs": 60000,
"Worlds": []
},
"World": {
"ClusterConnectHost": "127.0.0.1",
"ClusterConnectPort": 50001,
Expand Down
24 changes: 2 additions & 22 deletions dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,7 @@ services:
networks:
- mangosSharp

# Monolithic mode (cluster + world in one process)
game:
image: mangos/gameserver
container_name: gameserver
depends_on:
- mysql
ports:
- 8085:8085
build:
context: ..
dockerfile: ./dev/GameServer.Dockerfile
networks:
- mangosSharp
profiles:
- monolithic

# Distributed mode: cluster accepts game clients, routes to world servers
# Cluster gateway: accepts game clients, routes packets to world servers
cluster:
image: mangos/worldcluster
container_name: worldcluster
Expand All @@ -42,10 +26,8 @@ services:
dockerfile: ./dev/WorldCluster.Dockerfile
networks:
- mangosSharp
profiles:
- distributed

# Distributed mode: world server connects to cluster via IPC
# World server: connects to cluster via IPC, runs game logic
world:
image: mangos/worldserver
container_name: worldserver
Expand All @@ -57,8 +39,6 @@ services:
dockerfile: ./dev/WorldServer.Dockerfile
networks:
- mangosSharp
profiles:
- distributed

mysql:
image: mysql:8.0
Expand Down
57 changes: 57 additions & 0 deletions sql/Updates/Accounts/Rel21_02_002.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
--
-- Federation support: peer-cluster admin endpoints + per-realm display
-- markers + per-account opt-in for showing those markers.
--
-- Applied as part of the world-cluster proxy refactor (PR #4).
-- Idempotent: safe to re-run after a partial apply.
--

-- Realmlist: cluster identity, federation listener address, and the short
-- tag that's prepended/appended to player names when chat or roster info
-- is replicated cross-realm.
ALTER TABLE `realmlist`
ADD COLUMN IF NOT EXISTS `clusterId` INT UNSIGNED NOT NULL DEFAULT 0
COMMENT 'Federation cluster id; 0 disables federation for this realm',
ADD COLUMN IF NOT EXISTS `clusterAdminEndpoint` VARCHAR(128) NOT NULL DEFAULT ''
COMMENT 'host:port of cluster federation listener; empty disables peer admin/chat',
ADD COLUMN IF NOT EXISTS `displayTag` VARCHAR(8) NOT NULL DEFAULT ''
COMMENT 'Short marker shown for cross-realm chat and player frames',
ADD COLUMN IF NOT EXISTS `markerPosition` ENUM('prefix','suffix','none') NOT NULL DEFAULT 'prefix'
COMMENT 'Where to attach displayTag when rendering foreign-realm names';

-- Per-account toggle. When a player flips this off they stop seeing the
-- [tag] markers on cross-realm chat and player frames. Whispers always
-- carry the marker regardless so reply targeting still works.
ALTER TABLE `account`
ADD COLUMN IF NOT EXISTS `federation_show_markers` TINYINT(1) NOT NULL DEFAULT 1
COMMENT 'Show [tag] on cross-realm players/chat for this account';

-- Cluster-local mirror of federated groups. The leader's cluster owns
-- the authoritative copy; peers replicate enough to draw the party UI.
CREATE TABLE IF NOT EXISTS `federation_group` (
`groupId` BIGINT UNSIGNED NOT NULL,
`leaderRealmId` INT UNSIGNED NOT NULL,
`leaderGuid` BIGINT UNSIGNED NOT NULL,
`groupType` TINYINT UNSIGNED NOT NULL COMMENT '0=party, 1=raid',
`shardKey` BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Reserved for Phase B co-location',
`createdAt` DATETIME NOT NULL,
`updatedAt` DATETIME NOT NULL,
PRIMARY KEY (`groupId`, `leaderRealmId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `federation_group_member` (
`groupId` BIGINT UNSIGNED NOT NULL,
`leaderRealmId` INT UNSIGNED NOT NULL,
`memberRealmId` INT UNSIGNED NOT NULL,
`memberGuid` BIGINT UNSIGNED NOT NULL,
`memberName` VARCHAR(12) NOT NULL,
`role` TINYINT UNSIGNED NOT NULL DEFAULT 0
COMMENT 'Bitfield: 1=leader, 2=assist, 4=mainTank, 8=mainAssist',
PRIMARY KEY (`groupId`, `leaderRealmId`, `memberRealmId`, `memberGuid`),
KEY `idx_member` (`memberRealmId`, `memberGuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Bump db_version so DbVersionChecker accepts the new schema.
INSERT INTO `db_version`(`version`,`structure`,`content`,`description`,`comment`)
VALUES (21,2,2,'Federation_columns','PR #4 world-cluster proxy: peer admin endpoints + cross-realm markers')
ON DUPLICATE KEY UPDATE `description`=VALUES(`description`), `comment`=VALUES(`comment`);
43 changes: 0 additions & 43 deletions src/server/GameServer/GameModule.cs

This file was deleted.

25 changes: 0 additions & 25 deletions src/server/GameServer/GameServer.csproj

This file was deleted.

36 changes: 0 additions & 36 deletions src/server/GameServer/Handlers/CMSG_PING_Handler.cs

This file was deleted.

Binary file removed src/server/GameServer/MangosCS.ico
Binary file not shown.
Loading