Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: livestream (cast) system #2653

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8e3f892
feat: cast system
dudantas May 25, 2024
369e5ee
Merge branch 'main' into dudantas/feat-casting-system
dudantas Sep 11, 2024
2fffe08
fix: client owner
dudantas Sep 11, 2024
06583e1
fix: some cast bugs
dudantas Sep 11, 2024
75ab537
fix: review from jhogberg, implement async viewers calls
github-actions[bot] Sep 11, 2024
e8f5e4d
enhance: add OTSYS_STEADY_TIME function
dudantas Sep 11, 2024
7ee34b7
fix: message record
github-actions[bot] Sep 11, 2024
9d44a92
fix: save cast live record
dudantas Sep 11, 2024
d53f166
fix: revert
dudantas Sep 12, 2024
1c0d572
fix: cast logout and others
dudantas Sep 12, 2024
997e45f
fix: rename from "CastViewer" to "Livestream"
dudantas Sep 12, 2024
2124c6c
fix: send store empty
dudantas Sep 12, 2024
99b3c37
fix: remove update resource balances to cast viewer
dudantas Sep 12, 2024
b359bf5
Merge branch 'main' into dudantas/feat-casting-system
dudantas Sep 12, 2024
5bb3b40
fix: eventcallback name
dudantas Sep 12, 2024
ae07440
fix: multiplier to 1.0 and experience gain fix
dudantas Sep 12, 2024
6b358d1
fix: luaConfigManagerGetFloat correct pushnumber
dudantas Sep 12, 2024
1b908e6
Code format - (Clang-format)
github-actions[bot] Sep 12, 2024
2237f32
fix: warning for eventcallback return
dudantas Sep 12, 2024
59998e8
Code format - (Clang-format)
github-actions[bot] Sep 12, 2024
969fcf3
Merge branch 'main' into dudantas/feat-casting-system
dudantas Sep 13, 2024
19286fc
fix: viewer id uses per-stream sequence number
dudantas Sep 13, 2024
d4559d0
fix: change from GenericParallel to Serial
dudantas Sep 13, 2024
d4763e2
revert: remove wrong documentation
dudantas Sep 13, 2024
ed4aea8
fix: restricts the viewer try to move
dudantas Sep 13, 2024
def8b3a
Merge branch 'main' into dudantas/feat-casting-system
dudantas Sep 20, 2024
8a14c03
feat: move folders, change from "cast" to "livestream" and features.h…
dudantas Sep 20, 2024
51c64a6
fix: qodana reviews
dudantas Sep 21, 2024
353ffe3
fix: qodana reviews
dudantas Sep 23, 2024
688067f
fix: qodana
dudantas Sep 24, 2024
dcde824
fix: experience gain with stream on
dudantas Sep 24, 2024
a1a2bd1
fix: player vip check owner
dudantas Sep 24, 2024
aa949c8
Merge branch 'main' into dudantas/feat-casting-system
phacUFPE Sep 24, 2024
08987c8
fix: add missing files to vcxproj visual studio
phacUFPE Sep 24, 2024
d454c68
fix: indentation
dudantas Sep 24, 2024
0dccc94
Merge branch 'main' into dudantas/feat-casting-system
dudantas Sep 24, 2024
85655a8
fix: livestream caster can talk to channel and show level
dudantas Sep 24, 2024
4053a79
fix: viewer send message only in livestream channel
dudantas Sep 24, 2024
90ef11c
Merge branch 'main' into dudantas/feat-casting-system
dudantas Oct 3, 2024
13d7a47
Merge branch 'main' into dudantas/feat-casting-system
dudantas Oct 9, 2024
c55498c
fix: compilation
dudantas Oct 9, 2024
8d5afaf
fix: some sonar checks
dudantas Oct 10, 2024
361e877
fix: sonar checks
dudantas Oct 10, 2024
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
10 changes: 10 additions & 0 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,16 @@ combatChainSkillFormulaAxe = 0.9
combatChainSkillFormulaClub = 0.7
combatChainSkillFormulaSword = 1.1

-- Livestream system
-- NOTE: set experience to 1.0 to deactivate the bonus, example of use: 1.15 (15% of bonus)
-- NOTE: disable this system in the file "features.hpp" setting directive 'FEATURE_LIVESTREAM' to 0
-- NOTE: set "livestreamMaximumViewers" to 0 for enable system only to premium accounts
livestreamExperienceMultiplier = 1.15
livestreamMaximumViewersPerIP = 2
livestreamMaximumViewers = 10
livestreamPremiumMaximumViewers = 20
livestreamCasterMinLevel = 200

-- Global server Save
-- NOTE: globalServerSaveNotifyDuration in minutes
globalServerSaveNotifyMessage = true
Expand Down
12 changes: 11 additions & 1 deletion data-otservbr-global/migrations/46.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
function onUpdateDatabase()
return false -- true = There are others migrations file | false = this is the last migration file
logger.info("Updating database to version 47 (cast system)")
db.query([[
CREATE TABLE IF NOT EXISTS `active_livestream_casters` (
`caster_id` INT NOT NULL AUTO_INCREMENT,
`livestream_viewers` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0',
`livestream_status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`caster_id`)
);
]])

return true
end
3 changes: 3 additions & 0 deletions data-otservbr-global/migrations/47.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function onUpdateDatabase()
return false -- true = There are others migrations file | false = this is the last migration file
end
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ monster.loot = {}

monster.attacks = {
{ name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 },
{ name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, lenght = 7, spread = 0, minDamage = -1200, maxDamage = -1800, effect = CONST_ME_MORTAREA, target = false }, -- -_death_beam(1200-1800)
{ name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, length = 7, spread = 0, minDamage = -1200, maxDamage = -1800, effect = CONST_ME_MORTAREA, target = false }, -- -_death_beam(1200-1800)
}

monster.defenses = {
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/monster/reptiles/young_goanna.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ monster.attacks = {
{ name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, condition = { type = CONDITION_POISON, totalDamage = 200, interval = 4000 } },
{ name = "combat", interval = 2500, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -490, range = 3, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_HITBYPOISON, target = true },
{ name = "combat", interval = 3000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 1, effect = CONST_ME_GROUNDSHAKER, target = false },
{ name = "combat", interval = 3500, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -490, lenght = 8, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false },
{ name = "combat", interval = 3500, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -490, length = 8, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false },
}

monster.defenses = {
Expand Down
Loading
Loading