Add the battle pass (port of AVA2 ENABLE_BATTLE_PASS)
Monthly seasons from share/locale/<locale>/port_battlepass.tsv, up to ten missions (kills, boss, stone, play time, fishing, refine, level, NPC spend, NPC sell) with per-mission and final rewards. Progress is counted in memory and flushed additively on save; claims are idempotent via INSERT IGNORE. Client protocol: /mt_bp 1 info|claim N|close -> MTBP1 lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1bdaae8807
commit
7f4e8b3f76
@@ -0,0 +1,50 @@
|
||||
# PORT battle pass seasons (docs/FEATURE-BATTLEPASS.md). Installed as share/locale/newcibn/port_battlepass.tsv;
|
||||
# every core rereads it within 5 s of an atomic replace. Any error disables the battle pass (see syserr PORT_BP).
|
||||
#
|
||||
# season ID START END unix seconds, START inclusive, END exclusive; seasons must not overlap
|
||||
# mission SLOT TYPE SUB TARGET [VNUM COUNT]x0..3
|
||||
# SLOT 1..10. Progress and claims are stored per season and slot: do not reuse a slot for another mission
|
||||
# within a running season.
|
||||
# TYPE 1 kill monster (SUB mob vnum or 0 = any normal monster) 2 kill boss (SUB vnum or 0)
|
||||
# 3 kill metin stone (SUB vnum or 0) 4 seconds online 5 catch fish (SUB item vnum or 0)
|
||||
# 6 successful refine (SUB result vnum or 0) 7 levels gained 8 gold paid to NPC shops
|
||||
# 9 items sold to NPC shops (SUB item vnum, required)
|
||||
# Kills count for the player the quest kill goes to, within 20 levels of the monster.
|
||||
# final VNUM COUNT x1..6 once every mission of the season is done
|
||||
MTBATTLEPASS 1
|
||||
|
||||
# 2026-10 (Europe/Berlin)
|
||||
season 202610 1790805600 1793487600
|
||||
mission 1 1 0 20000 70043 1 71153 5
|
||||
mission 2 2 0 30 25041 2 71032 1
|
||||
mission 3 3 0 300 50513 3
|
||||
mission 4 4 0 172800 71094 2
|
||||
mission 5 5 0 100 27987 5
|
||||
mission 6 6 0 50 25040 2
|
||||
mission 7 7 0 5 71153 5
|
||||
mission 8 8 0 50000000 71084 20
|
||||
final 27992 2 27993 1 27994 1 70024 1
|
||||
|
||||
# 2026-11 (Europe/Berlin)
|
||||
season 202611 1793487600 1796079600
|
||||
mission 1 1 0 20000 70043 1 71153 5
|
||||
mission 2 2 0 30 25041 2 71032 1
|
||||
mission 3 3 0 300 50513 3
|
||||
mission 4 4 0 172800 71094 2
|
||||
mission 5 5 0 100 27987 5
|
||||
mission 6 6 0 50 25040 2
|
||||
mission 7 7 0 5 71153 5
|
||||
mission 8 8 0 50000000 71084 20
|
||||
final 27992 2 27993 1 27994 1 70024 1
|
||||
|
||||
# 2026-12 (Europe/Berlin)
|
||||
season 202612 1796079600 1798758000
|
||||
mission 1 1 0 20000 70043 1 71153 5
|
||||
mission 2 2 0 30 25041 2 71032 1
|
||||
mission 3 3 0 300 50513 3
|
||||
mission 4 4 0 172800 71094 2
|
||||
mission 5 5 0 100 27987 5
|
||||
mission 6 6 0 50 25040 2
|
||||
mission 7 7 0 5 71153 5
|
||||
mission 8 8 0 50000000 71084 20
|
||||
final 27992 2 27993 1 27994 1 70024 1
|
||||
|
@@ -0,0 +1,20 @@
|
||||
-- PORT: battle pass tables (docs/FEATURE-BATTLEPASS.md). Idempotent; run once on the player database.
|
||||
-- Progress: one row per player, season and mission slot; the game adds deltas and MySQL caps them at target.
|
||||
CREATE TABLE IF NOT EXISTS player.mt_battlepass_progress (
|
||||
pid INT UNSIGNED NOT NULL,
|
||||
season INT UNSIGNED NOT NULL,
|
||||
slot TINYINT UNSIGNED NOT NULL,
|
||||
value BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
target BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (pid, season, slot)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
-- Claims: the primary key is the idempotency guard; only the request whose INSERT IGNORE adds the row pays out.
|
||||
-- slot 0 is the final reward.
|
||||
CREATE TABLE IF NOT EXISTS player.mt_battlepass_claim (
|
||||
pid INT UNSIGNED NOT NULL,
|
||||
season INT UNSIGNED NOT NULL,
|
||||
slot TINYINT UNSIGNED NOT NULL,
|
||||
claimed_at INT UNSIGNED NOT NULL,
|
||||
PRIMARY KEY (pid, season, slot)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
Reference in New Issue
Block a user