Skip to content

Commit

Permalink
Merge pull request #148 from Artem89233/patch-1
Browse files Browse the repository at this point in the history
Seems ok!
  • Loading branch information
iamdroppy authored Mar 16, 2024
2 parents 5e404e7 + 93e7b84 commit 72ee554
Show file tree
Hide file tree
Showing 984 changed files with 44,571 additions and 48,157 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build

on:
# Triggers the workflow on push or pull request events but only for the selected branches
push:
branches: [ test-stable, community ]
pull_request:
branches: [ test-stable, community ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow_failures }}
name: ${{ matrix.name }} / ${{ matrix.config }}
strategy:
matrix:
config: [Debug, Release]
include:
# for the matrix leg matching the os and version
- os: ubuntu-22.04
name: Ubuntu 22.04 (.Net 7.0)
toolchain: dotnet-sdk-7.0
allow_failures: true

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Install dependencies (apt)
if: runner.os == 'Linux'
run: |
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update && sudo apt-get install -y ${{ matrix.toolchain }}
- name: Build (dotnet)
run: |
dotnet restore src/Blizzless-D3.sln
dotnet msbuild src/Blizzless-D3.sln /t:Build /p:Configuration=${{ matrix.config }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ bld/

# Visual Studio 2015/2017 cache/options directory
.vs/

# Rider cache
.idea/

# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

Expand Down
38 changes: 27 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ DiIiS is a fully-functional open-source local server for [Diablo III: Reaper of
## Restrictions

- Donate Store implementation is removed.
- NAT support is hidden, but possible ;)

# Installation

Expand All @@ -38,16 +37,37 @@ Each version of the client includes changes to structures, opcodes and attribute
The currently supported version of the client: **2.7.4.84161**

## Server Deploying

### Prepare Database
#### Manual
1. Install [PostgreSQL 9.5.25](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads).
2. Create databases in PostgreSQL: `diiis` and `worlds`.
3. Change you account and password in `database.Account.config` and `database.Worlds.conifg`.
4. Restore `worlds.backup` to `worlds` database.
5. Compile by [VS 2019/2022](https://visualstudio.microsoft.com/).
6. [Skip this stage for local game] Copy the [config.ini](configs/config.ini) file to the server folder (It overwrites the default settings):

#### Or using docker
1. [Install docker](https://docs.docker.com/get-docker/)
2. Run `docker-compose up` inside [db](db) folder.

### Compile and run
1. Install [.NET 7 SDK and runtime](https://dotnet.microsoft.com/en-us/download/dotnet/7.0) (just runtime, not asp.net or desktop)
2. Go to the repo directory and compile the project using this command:
```shell
dotnet publish ./src/DiIiS-NA/Blizzless.csproj --configuration Release --output ./publish
```
3. [Skip this stage for local game] Copy the [config.ini](configs/config.ini) file to the publish folder (It overwrites the default settings):
- Update the parameter entries with your IP record on the network: `BindIP` and `PublicIP`.
7. Launch wait until server start, it creates a hierarchy.
8. Create user account(s) using console: `!account add Login Password Tag`
4. Go to the publish folder, launch Blizzless executable, wait until server start - it creates a hierarchy.
5. Create user account(s) using console: `!account add Login Password Tag`

#### Example:

> !account add username@ YourPassword YourBattleTag

Creates an account with Login `username@`, password `YourPassword` and BattleTag `YourBattleTag`

> !account add username@ YourPassword YourBattleTag owner

Creates an account with Login `username@`, password `YourPassword` and BattleTag `YourBattleTag` with rank `owner`

### Example:

Expand All @@ -71,7 +91,7 @@ Do this for each client connecting to the server.

**Method #1 - Hosts**

Add redirects to the `hosts` file (`%WinDir%\System32\drivers\etc\hosts`):
Add redirects to the `hosts` file (Windows - `%WinDir%\System32\drivers\etc\hosts`, Linux - `/etc/hosts`):
`127.0.0.1 us.actual.battle.net`
`127.0.0.1 eu.actual.battle.net`

Expand All @@ -95,10 +115,6 @@ Do this for each client connecting to the server.

7. You're in the game world!
## Using Docker

Run `docker-compose up` inside [db](db) folder and continue from the 5th step in section [server](#server-deploying).

# Server Configuration
## Global configuration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,19 @@
//Blizzless Project 2022
using DiIiS_NA.Core.Logging;
//Blizzless Project 2022
using DiIiS_NA.Core.Logging;
using DiIiS_NA.GameServer.GSSystem.ActorSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations.Hirelings;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.GameSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.PlayerSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem;
//Blizzless Project 2022
using System.Linq;
//Blizzless Project 2022
using System;
//Blizzless Project 2022
using System.Collections.Generic;
//Blizzless Project 2022
using DiIiS_NA.LoginServer.AccountsSystem;
//Blizzless Project 2022
using DiIiS_NA.GameServer.GSSystem.QuestSystem.QuestEvents;
//Blizzless Project 2022
using DiIiS_NA.GameServer.Core.Types.Math;
//Blizzless Project 2022
using DiIiS_NA.Core.Helpers.Math;
//Blizzless Project 2022
using DiIiS_NA.GameServer.Core.Types.TagMap;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Animation;
//Blizzless Project 2022
using System.Threading.Tasks;
//Blizzless Project 2022
using DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Base;
using DiIiS_NA.D3_GameServer.Core.Types.SNO;

Expand Down Expand Up @@ -65,7 +48,7 @@ public override void Execute(MapSystem.World world)

StartConversation(world, 17923);

SkeletonKing_Bridge.PlayAnimation(5, SkeletonKing_Bridge.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening], 1f);
SkeletonKing_Bridge.PlayAnimation(5, (AnimationSno)SkeletonKing_Bridge.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening], 1f);

world.BroadcastIfRevealed(plr => new SetIdleAnimationMessage
{
Expand All @@ -89,7 +72,7 @@ public override void Execute(MapSystem.World world)
var spawner = world.GetActorBySNO(ActorSno._trdun_rescuecainskelspawner);
while (spawner != null)
{
var monster = FastRandom.Instance.Next(10) % 2 == 0 ? ActorSno._skeletonking_shield_skeleton : ActorSno._skeletonking_skeleton;
var monster = ActorSno._skeletonking_shield_skeleton;
world.SpawnMonster(monster, spawner.Position);
spawner.Destroy();
spawner = world.GetActorBySNO(ActorSno._trdun_rescuecainskelspawner);
Expand Down
97 changes: 86 additions & 11 deletions configs/config.ini
Original file line number Diff line number Diff line change
@@ -1,39 +1,114 @@
;
; # This is a template configuration file which can be modified as desired.
;
; # Community branch (recommended): https://github.com/blizzless/blizzless-diiis/tree/community
; # test-stable branch: https://github.com/blizzless/blizzless-diiis/
; # Master branch: https://github.com/blizzless/blizzless-diiis/tree/master
;

; Settings for Bnet
[Battle-Server]
Enabled = true
BindIP = 127.0.0.1
WebPort = 9800
Port = 1119
BindIPv6 = ::1
MOTD = Welcome to Diablo 3!
MotdEnabled = true
Motd = Welcome to Blizzless D3!

[IWServer]
IWServer = false
; ------------------------
; [IWServer]
; IWServer = false

; Settings for REST
; ------------------------
; REST services for login (and others)
[REST]
IP = 127.0.0.1
Public = true
PublicIP = 127.0.0.1
PORT = 80

; Settings for game
; ------------------------
; Game server options and game-mods.
;
[Game-Server]
Enabled = true
CoreActive = true
BindIP = 127.0.0.1
WebPort = 9100
Port = 2001
WebPort = 9001
Port = 1345
BindIPv6 = ::1
DRLGemu = true
;Modding of game

; Modding of game (please check https://github.com/blizzless/blizzless-diiis/blob/community/docs/game-world-settings.md)
;

; rates
RateExp = 1
RateMoney = 1
RateDrop = 1
RateChangeDrop = 1
RateMonsterHP = 1
RateMonsterDMG = 1
; items
ChanceHighQualityUnidentified = 30
ChanceNormalUnidentified = 5
; bosses
BossHealthMultiplier = 6
BossDamageMultiplier = 3
; nephalem
NephalemRiftProgressMultiplier = 1
; health
HealthPotionRestorePercentage = 60
HealthPotionCooldown = 30
ResurrectionCharges = 3
; waypoints
UnlockAllWaypoints = false
; player attribute modifier
StrengthMultiplier = 1
StrengthParagonMultiplier = 1
DexterityMultiplier = 1
DexterityParagonMultiplier = 1
IntelligenceMultiplier = 1
IntelligenceParagonMultiplier = 1
VitalityMultiplier = 1
VitalityParagonMultiplier = 1
; quests
AutoSaveQuests = false
; minimap
ForceMinimapVisibility = false

; ------------------------
; Network address translation
;
[NAT]
Enabled = False
PublicIP = 127.0.0.1
Enabled = True
; use your public IP
PublicIP = 127.0.0.1

; ------------------------
; Where the outputs should be.
; Best for visualization (default): AnsiLog (target: Ansi)
; Best for debugging: ConsoleLog (target: console)
; Best for packet analysis: PacketLog (target: file)
;
[AnsiLog]
Enabled = true
Target = Ansi
IncludeTimeStamps = true
MinimumLevel = Debug
MaximumLevel = Fatal

[ConsoleLog]
Enabled = false
Target = Console
IncludeTimeStamps = true
MinimumLevel = Debug
MaximumLevel = PacketDump

[PacketLog]
Enabled = true
Target = file
FileName = packet.log
IncludeTimeStamps = true
MinimumLevel = Debug
MaximumLevel = PacketDump
2 changes: 1 addition & 1 deletion db/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.9"
services:
postgres:
container_name: postgres_container
image: postgres:14.5
image: postgres:14
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
Expand Down
Loading

0 comments on commit 72ee554

Please sign in to comment.