Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a1c9172beb | |||
| b408c8a95d | |||
| f88a303327 |
@@ -74,8 +74,6 @@ jobs:
|
||||
if (Test-Path tools/fractured-launcher-electron/dist/latest.yml) {
|
||||
Copy-Item tools/fractured-launcher-electron/dist/latest.yml launcher-publish/
|
||||
}
|
||||
Get-ChildItem tools/fractured-launcher-electron/dist/*.blockmap -ErrorAction SilentlyContinue |
|
||||
Copy-Item -Destination launcher-publish/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -87,6 +85,13 @@ jobs:
|
||||
if: github.repository == 'Dawnforger/Fractured'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.repository.default_branch }}
|
||||
sparse-checkout: |
|
||||
tools/fractured-launcher-electron/scripts
|
||||
sparse-checkout-cone-mode: true
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: electron-dist
|
||||
@@ -97,6 +102,7 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
. tools/fractured-launcher-electron/scripts/release-sync-filters.sh
|
||||
TAG="${{ needs.meta.outputs.tag }}"
|
||||
mkdir -p combined
|
||||
mkdir -p /tmp/from-main
|
||||
@@ -104,6 +110,11 @@ jobs:
|
||||
shopt -s nullglob
|
||||
for f in /tmp/from-main/*; do
|
||||
if [ -f "$f" ]; then
|
||||
bn=$(basename "$f")
|
||||
if should_skip_merge_from_github "$bn"; then
|
||||
echo "Skipping GitHub release asset (CI launcher or excluded): $bn"
|
||||
continue
|
||||
fi
|
||||
cp -f "$f" combined/
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -49,7 +49,6 @@ jobs:
|
||||
path: |
|
||||
tools/fractured-launcher-electron/dist/*.exe
|
||||
tools/fractured-launcher-electron/dist/latest.yml
|
||||
tools/fractured-launcher-electron/dist/*.blockmap
|
||||
|
||||
electron-launcher-linux:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -77,5 +76,5 @@ jobs:
|
||||
if-no-files-found: warn
|
||||
path: |
|
||||
tools/fractured-launcher-electron/dist/*.AppImage
|
||||
tools/fractured-launcher-electron/dist/*.yml
|
||||
tools/fractured-launcher-electron/dist/*.blockmap
|
||||
tools/fractured-launcher-electron/dist/latest.yml
|
||||
tools/fractured-launcher-electron/dist/latest-linux.yml
|
||||
|
||||
@@ -104,6 +104,7 @@ jobs:
|
||||
working-directory: tools/fractured-launcher-electron
|
||||
run: |
|
||||
npm ci
|
||||
node -p "'Launcher package.json version: ' + require('./package.json').version"
|
||||
npm run pack:win
|
||||
|
||||
- name: Stage launcher files for upload
|
||||
@@ -114,8 +115,6 @@ jobs:
|
||||
if (Test-Path tools/fractured-launcher-electron/dist/latest.yml) {
|
||||
Copy-Item tools/fractured-launcher-electron/dist/latest.yml launcher-publish/
|
||||
}
|
||||
Get-ChildItem tools/fractured-launcher-electron/dist/*.blockmap -ErrorAction SilentlyContinue |
|
||||
Copy-Item -Destination launcher-publish/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -150,6 +149,7 @@ jobs:
|
||||
working-directory: tools/fractured-launcher-electron
|
||||
run: |
|
||||
npm ci
|
||||
node -p "'Launcher package.json version: ' + require('./package.json').version"
|
||||
npm run pack:linux
|
||||
|
||||
- name: Stage Linux launcher for upload
|
||||
@@ -159,8 +159,9 @@ jobs:
|
||||
mkdir -p launcher-linux-publish
|
||||
shopt -s nullglob
|
||||
cp -f tools/fractured-launcher-electron/dist/*.AppImage launcher-linux-publish/ 2>/dev/null || true
|
||||
cp -f tools/fractured-launcher-electron/dist/*.yml launcher-linux-publish/ 2>/dev/null || true
|
||||
cp -f tools/fractured-launcher-electron/dist/*.blockmap launcher-linux-publish/ 2>/dev/null || true
|
||||
for f in tools/fractured-launcher-electron/dist/latest.yml tools/fractured-launcher-electron/dist/latest-linux.yml; do
|
||||
if [ -f "$f" ]; then cp -f "$f" launcher-linux-publish/; fi
|
||||
done
|
||||
ls -la launcher-linux-publish/
|
||||
if ! compgen -G "launcher-linux-publish/*.AppImage" > /dev/null; then
|
||||
echo "No AppImage under dist/ — electron-builder linux target failed" >&2
|
||||
@@ -206,6 +207,7 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
. tools/fractured-launcher-electron/scripts/release-sync-filters.sh
|
||||
TAG="${{ needs.meta.outputs.tag }}"
|
||||
mkdir -p combined
|
||||
mkdir -p /tmp/from-main
|
||||
@@ -213,6 +215,11 @@ jobs:
|
||||
shopt -s nullglob
|
||||
for f in /tmp/from-main/*; do
|
||||
if [ -f "$f" ]; then
|
||||
bn=$(basename "$f")
|
||||
if should_skip_merge_from_github "$bn"; then
|
||||
echo "Skipping GitHub release asset (CI launcher or excluded): $bn"
|
||||
continue
|
||||
fi
|
||||
cp -f "$f" combined/
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
-- mod-paragon: Predatory Strikes (16972 / 16974 / 16975) Cataclysm-style
|
||||
-- finisher proc for CLASS_PARAGON characters.
|
||||
--
|
||||
-- The 3.3.5 Predatory Strikes is a passive AP / ranged-attack-power talent
|
||||
-- with no proc payload. The Cataclysm redesign added "Predator's Swiftness"
|
||||
-- (69369), which makes the next Nature spell <10s base cast time instant.
|
||||
-- That buff already exists in the WotLK Spell.dbc (because Blizzard reused
|
||||
-- the spell id), but no server-side trigger ever calls CastSpell(69369) on
|
||||
-- a 3.3.5 server. We need both halves: the proc handler AND a spell_proc
|
||||
-- row so the proc evaluator actually invokes our AuraScript.
|
||||
--
|
||||
-- AuraScript binding: spell_paragon_predatory_strikes is registered in
|
||||
-- modules/mod-paragon/src/Paragon_SC.cpp. It checks
|
||||
-- (a) caster is CLASS_PARAGON,
|
||||
-- (b) source spell consumes combo points (NeedsComboPoints),
|
||||
-- (c) source spell deals damage (DmgClass MELEE/RANGED + at least one
|
||||
-- damage effect or periodic-damage aura -- filters Slice and Dice,
|
||||
-- Savage Roar, Maim, Kidney Shot, Expose Armor, Recuperate),
|
||||
-- then rolls a per-rank chance of (CP * 3 / 5 / 7)% to cast 69369 on
|
||||
-- the caster.
|
||||
--
|
||||
-- spell_proc row params:
|
||||
-- ProcFlags = 0x40000 = PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS
|
||||
-- SpellTypeMask = 0x3 (DAMAGE | HEAL bitmask in proc engine; we
|
||||
-- filter precisely in CheckProc anyway, the
|
||||
-- mask just gates "spell-type events" through)
|
||||
-- SpellPhaseMask = 0x2 = PROC_SPELL_PHASE_CAST -- fires DURING cast
|
||||
-- so player->GetComboPoints() inside HandleProc
|
||||
-- still returns the pre-_handle_finish_phase
|
||||
-- value.
|
||||
-- Chance = 100 (the per-CP chance is rolled inside the script)
|
||||
--
|
||||
-- Note: this row's SpellFamilyName / SpellFamilyMask are 0 so the proc
|
||||
-- engine's IsAffected check is a wildcard at the entry-level. The
|
||||
-- AuraScript's CheckProc owns all real filtering. Combined with Phase A
|
||||
-- (Paragon SpellFamilyName wildcard) this is harmless on stock classes
|
||||
-- because non-Paragon characters cannot learn Predatory Strikes via the
|
||||
-- Character Advancement panel.
|
||||
|
||||
DELETE FROM `spell_script_names`
|
||||
WHERE `spell_id` IN (16972, 16974, 16975)
|
||||
AND `ScriptName` = 'spell_paragon_predatory_strikes';
|
||||
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(16972, 'spell_paragon_predatory_strikes'),
|
||||
(16974, 'spell_paragon_predatory_strikes'),
|
||||
(16975, 'spell_paragon_predatory_strikes');
|
||||
|
||||
DELETE FROM `spell_proc` WHERE `SpellId` IN (16972, 16974, 16975);
|
||||
|
||||
INSERT INTO `spell_proc`
|
||||
(`SpellId`, `SchoolMask`, `SpellFamilyName`,
|
||||
`SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`,
|
||||
`ProcFlags`, `SpellTypeMask`, `SpellPhaseMask`, `HitMask`,
|
||||
`AttributesMask`, `DisableEffectsMask`, `ProcsPerMinute`,
|
||||
`Chance`, `Cooldown`, `Charges`)
|
||||
VALUES
|
||||
(16972, 0, 0, 0, 0, 0, 0x40000, 0x3, 0x2, 0, 0, 0, 0, 100.0, 0, 0),
|
||||
(16974, 0, 0, 0, 0, 0, 0x40000, 0x3, 0x2, 0, 0, 0, 0, 100.0, 0, 0),
|
||||
(16975, 0, 0, 0, 0, 0, 0x40000, 0x3, 0x2, 0, 0, 0, 0, 100.0, 0, 0);
|
||||
@@ -514,8 +514,136 @@ class spell_paragon_arcane_torrent : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// Predatory Strikes (16972 / 16974 / 16975) for Paragon: re-implements the
|
||||
// Cataclysm-era proc behavior of the talent so a Paragon's damaging
|
||||
// finishers (Eviscerate / Envenom / Ferocious Bite / Rip / Rupture) can
|
||||
// roll Predator's Swiftness (69369) -- the same buff that real druids
|
||||
// get from the Cata redesign of this talent. Combined with the
|
||||
// Spell::prepare interception in core (Spell.cpp), 69369 makes the
|
||||
// Paragon's NEXT Nature-school spell with a base cast time below 10s
|
||||
// instant cast: Chain Lightning, Lightning Bolt, Healing Touch, Wrath,
|
||||
// Nourish, etc. -- not just the Druid-family Nature subset that the
|
||||
// stock SPELLMOD_CASTING_TIME mask on 69369 covers.
|
||||
//
|
||||
// Filter logic:
|
||||
// - Source spell must consume combo points (NeedsComboPoints() — gates
|
||||
// out non-finisher combo-point builders).
|
||||
// - "Damaging finisher": SPELL_ATTR1_FINISHING_MOVE_DAMAGE (Eviscerate,
|
||||
// Envenom, Ferocious Bite, ...) OR a SPELL_ATTR1_FINISHING_MOVE_DURATION
|
||||
// finisher that applies periodic damage (Rip, Rupture). Duration
|
||||
// finishers that only heal (Recuperate) or only buff / CC / armor shred
|
||||
// (Slice and Dice, Savage Roar, Kidney Shot, Maim, Expose Armor) are
|
||||
// rejected.
|
||||
//
|
||||
// Chance per combo point matches the Cataclysm tuning that the user's
|
||||
// client tooltip text reflects: rank 1 = 3% per CP, rank 2 = 5% per CP,
|
||||
// rank 3 = 7% per CP. At 5 CP that is 15% / 25% / 35%, capped at 100%.
|
||||
//
|
||||
// Combo-point read happens during PROC_SPELL_PHASE_CAST, which fires in
|
||||
// Spell::cast → Spell::ProcReflectProcs / Unit::ProcDamageAndSpellFor
|
||||
// BEFORE Spell::_handle_finish_phase clears the player's combo points
|
||||
// (see Spell.cpp:_handle_finish_phase clearing combo points). So
|
||||
// player->GetComboPoints() inside HandleProc returns the pre-clear value.
|
||||
class spell_paragon_predatory_strikes : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_paragon_predatory_strikes);
|
||||
|
||||
static constexpr uint32 SPELL_PARAGON_PREDATORS_SWIFTNESS = 69369;
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_PARAGON_PREDATORS_SWIFTNESS });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
|
||||
if (!spellInfo || !spellInfo->NeedsComboPoints())
|
||||
return false;
|
||||
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR1_FINISHING_MOVE_DAMAGE))
|
||||
return true;
|
||||
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR1_FINISHING_MOVE_DURATION))
|
||||
{
|
||||
bool periodicHeal = false;
|
||||
bool periodicDamage = false;
|
||||
for (SpellEffectInfo const& eff : spellInfo->Effects)
|
||||
{
|
||||
if (eff.Effect != SPELL_EFFECT_APPLY_AURA && eff.Effect != SPELL_EFFECT_APPLY_AREA_AURA_PARTY
|
||||
&& eff.Effect != SPELL_EFFECT_PERSISTENT_AREA_AURA)
|
||||
continue;
|
||||
|
||||
switch (eff.ApplyAuraName)
|
||||
{
|
||||
case SPELL_AURA_PERIODIC_HEAL:
|
||||
case SPELL_AURA_PERIODIC_HEALTH_FUNNEL:
|
||||
case SPELL_AURA_OBS_MOD_HEALTH:
|
||||
periodicHeal = true;
|
||||
break;
|
||||
case SPELL_AURA_PERIODIC_DAMAGE:
|
||||
case SPELL_AURA_PERIODIC_DAMAGE_PERCENT:
|
||||
case SPELL_AURA_PERIODIC_LEECH:
|
||||
periodicDamage = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (periodicHeal)
|
||||
return false;
|
||||
|
||||
return periodicDamage;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void HandleProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
Unit* actor = eventInfo.GetActor();
|
||||
Player* player = actor ? actor->ToPlayer() : nullptr;
|
||||
if (!player || player->getClass() != CLASS_PARAGON)
|
||||
return;
|
||||
|
||||
uint8 const cp = player->GetComboPoints();
|
||||
if (cp == 0)
|
||||
return;
|
||||
|
||||
SpellInfo const* talent = GetSpellInfo();
|
||||
if (!talent)
|
||||
return;
|
||||
|
||||
uint32 pctPerCP = 0;
|
||||
switch (talent->Id)
|
||||
{
|
||||
case 16972: pctPerCP = 3; break;
|
||||
case 16974: pctPerCP = 5; break;
|
||||
case 16975: pctPerCP = 7; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 const chance = std::min<uint32>(100u, pctPerCP * uint32(cp));
|
||||
if (!roll_chance_i(int32(chance)))
|
||||
return;
|
||||
|
||||
player->CastSpell(player, SPELL_PARAGON_PREDATORS_SWIFTNESS, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_paragon_predatory_strikes::CheckProc);
|
||||
OnProc += AuraProcFn(spell_paragon_predatory_strikes::HandleProc);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_paragon()
|
||||
{
|
||||
new Paragon_PlayerScript();
|
||||
RegisterSpellScript(spell_paragon_arcane_torrent);
|
||||
RegisterSpellScript(spell_paragon_predatory_strikes);
|
||||
}
|
||||
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
# Start AzerothCore authserver + worldserver detached from the SSH session (nohup + disown).
|
||||
# Stops any already-running authserver/worldserver processes first.
|
||||
#
|
||||
# Usage:
|
||||
# sudo bash scripts/start-azeroth-servers.sh
|
||||
# AZEROTH_BIN=/path/to/azeroth-server/bin bash scripts/start-azeroth-servers.sh
|
||||
#
|
||||
# Environment:
|
||||
# AZEROTH_BIN — directory with authserver and worldserver (default: /root/azeroth-server/bin)
|
||||
# AZEROTH_LOG_DIR — log directory (default: <parent of bin>/logs)
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
BIN_DIR="${AZEROTH_BIN:-/root/azeroth-server/bin}"
|
||||
LOG_DIR="${AZEROTH_LOG_DIR:-$(cd "$(dirname "$BIN_DIR")" && pwd)/logs}"
|
||||
|
||||
AUTH_BIN="${BIN_DIR}/authserver"
|
||||
WORLD_BIN="${BIN_DIR}/worldserver"
|
||||
|
||||
if [[ ! -x "$AUTH_BIN" ]]; then
|
||||
echo "error: not found or not executable: $AUTH_BIN" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -x "$WORLD_BIN" ]]; then
|
||||
echo "error: not found or not executable: $WORLD_BIN" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pkill -x authserver 2>/dev/null || true
|
||||
pkill -x worldserver 2>/dev/null || true
|
||||
sleep 1
|
||||
|
||||
mkdir -p "$LOG_DIR"
|
||||
|
||||
cd "$BIN_DIR"
|
||||
|
||||
nohup "$AUTH_BIN" >>"$LOG_DIR/authserver.log" 2>&1 &
|
||||
disown || true
|
||||
|
||||
sleep 2
|
||||
|
||||
nohup "$WORLD_BIN" >>"$LOG_DIR/worldserver.log" 2>&1 &
|
||||
disown || true
|
||||
|
||||
echo "Started authserver and worldserver (survives SSH disconnect)."
|
||||
echo "Bin: $BIN_DIR"
|
||||
echo "Logs: $LOG_DIR/authserver.log"
|
||||
echo " $LOG_DIR/worldserver.log"
|
||||
@@ -4767,6 +4767,36 @@ Respawn.DynamicEscortNPC = 0
|
||||
|
||||
Respawn.ForceCompatibilityMode = 0
|
||||
|
||||
#
|
||||
# Paragon.WildcardFamilyMatching
|
||||
# Description: Fractured / Paragon class (CLASS_PARAGON, id 12) only.
|
||||
# When enabled, the SpellFamilyName equality check is
|
||||
# wildcarded for Paragon characters in proc evaluation
|
||||
# (SpellMgr::CanSpellTriggerProcOnEvent), talent
|
||||
# SpellMod application (Player::ApplySpellMod /
|
||||
# SpellInfo::IsAffectedBySpellMod), and the
|
||||
# ParagonFamilyMatches() helper used by ad-hoc
|
||||
# `switch (SpellFamilyName)` listener gates in
|
||||
# Unit/SpellEffects/SpellAuraEffects code.
|
||||
# This makes cross-class talent procs and modifiers
|
||||
# (e.g. Predator's Swiftness 69369 making Shaman
|
||||
# Chain Lightning instant cast off a Rogue Eviscerate
|
||||
# finisher) apply to Paragon characters even when the
|
||||
# listener was authored for one specific class family.
|
||||
# SpellFamilyFlags / class-mask flag-bit checks still
|
||||
# run, so listener gates that explicitly opt into a
|
||||
# subset of spells via flag bits are still respected.
|
||||
# Stock classes (Warrior / Paladin / etc.) are NEVER
|
||||
# wildcarded; this only affects players whose class
|
||||
# id is CLASS_PARAGON. Set to 0 to disable the
|
||||
# wildcard at runtime (no rebuild required) if a
|
||||
# regression appears.
|
||||
# Default: 1 - (Enabled, Paragon characters get cross-class procs/mods)
|
||||
# 0 - (Disabled, Paragon characters are gated by stock family equality)
|
||||
#
|
||||
|
||||
Paragon.WildcardFamilyMatching = 1
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
|
||||
@@ -9773,7 +9773,11 @@ bool Player::IsAffectedBySpellmod(SpellInfo const* spellInfo, SpellModifier* mod
|
||||
if (mod->op == SPELLMOD_DURATION && spellInfo->GetDuration() == -1)
|
||||
return false;
|
||||
|
||||
return spellInfo->IsAffectedBySpellMod(mod);
|
||||
// Fractured / Paragon: pass the player owning the modifier aura so the
|
||||
// SpellFamilyName equality check can be wildcarded for CLASS_PARAGON.
|
||||
// Stock classes hit the same code path with `this` as a non-Paragon
|
||||
// unit, which makes IsAffected behave identically to the 2-arg form.
|
||||
return spellInfo->IsAffectedBySpellMod(mod, this);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
||||
@@ -72,11 +72,25 @@
|
||||
#include "Util.h"
|
||||
#include "Vehicle.h"
|
||||
#include "World.h"
|
||||
#include "WorldConfig.h"
|
||||
#include "WorldPacket.h"
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
// Fractured / Paragon: cross-class wildcard helper used by ad-hoc
|
||||
// `switch (SpellFamilyName)` listener gates in Unit / SpellEffects /
|
||||
// SpellAuraEffects. Returns true when the listener is a CLASS_PARAGON
|
||||
// player and the wildcard config flag is enabled, otherwise falls back
|
||||
// to strict family-name equality.
|
||||
bool ParagonFamilyMatches(Unit const* listener, uint32 expectedFamily, uint32 actualFamily)
|
||||
{
|
||||
if (listener && listener->getClass() == CLASS_PARAGON
|
||||
&& sWorld->getBoolConfig(CONFIG_PARAGON_WILDCARD_FAMILY))
|
||||
return true;
|
||||
return expectedFamily == actualFamily;
|
||||
}
|
||||
|
||||
float baseMoveSpeed[MAX_MOVE_TYPE] =
|
||||
{
|
||||
2.5f, // MOVE_WALK
|
||||
@@ -9702,7 +9716,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
|
||||
|
||||
// Nourish cast - 20% bonus if target has Rejuvenation, Regrowth, Lifebloom, or Wild Growth from caster
|
||||
// Glyph of Nourish is handled by spell_dru_nourish script
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags[1] & 0x2000000 && caster)
|
||||
if (ParagonFamilyMatches(caster, SPELLFAMILY_DRUID, spellProto->SpellFamilyName) && spellProto->SpellFamilyFlags[1] & 0x2000000 && caster)
|
||||
{
|
||||
AuraEffectList const& auras = GetAuraEffectsByType(SPELL_AURA_PERIODIC_HEAL);
|
||||
for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
|
||||
@@ -10421,7 +10435,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
|
||||
uint64 mechanicMask = spellProto->GetAllEffectsMechanicMask();
|
||||
|
||||
// Shred, Maul - "Effects which increase Bleed damage also increase Shred damage"
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags[0] & 0x00008800)
|
||||
if (ParagonFamilyMatches(attacker, SPELLFAMILY_DRUID, spellProto->SpellFamilyName) && spellProto->SpellFamilyFlags[0] & 0x00008800)
|
||||
mechanicMask |= (1ULL << MECHANIC_BLEED);
|
||||
|
||||
if (mechanicMask)
|
||||
|
||||
@@ -2268,6 +2268,15 @@ private:
|
||||
ValuesUpdateCache _valuesUpdateCache;
|
||||
};
|
||||
|
||||
// Fractured / Paragon: helper for ad-hoc `switch (SpellFamilyName)` listener
|
||||
// gates scattered across Unit / SpellEffects / SpellAuraEffects. When the
|
||||
// listener (i.e. the unit holding the gating talent / aura) is a Paragon
|
||||
// AND `Paragon.WildcardFamilyMatching` is enabled, accept any source family
|
||||
// so cross-class procs / bonuses can fire. Stock classes use stock equality.
|
||||
// Defined inline here so call sites do not need an extra include for World.h
|
||||
// beyond what they already include via Unit.h's transitive headers.
|
||||
[[nodiscard]] bool ParagonFamilyMatches(Unit const* listener, uint32 expectedFamily, uint32 actualFamily);
|
||||
|
||||
namespace Acore
|
||||
{
|
||||
// Binary predicate for sorting Units based on percent value of a power
|
||||
|
||||
@@ -2175,7 +2175,9 @@ uint8 Aura::GetProcEffectMask(AuraApplication* aurApp, ProcEventInfo& eventInfo,
|
||||
return 0;
|
||||
|
||||
// do checks against db data
|
||||
if (!sSpellMgr->CanSpellTriggerProcOnEvent(*procEntry, eventInfo))
|
||||
// Fractured / Paragon: the unit that owns this aura is the listener;
|
||||
// pass it through so cross-family procs can match for Paragon players.
|
||||
if (!sSpellMgr->CanSpellTriggerProcOnEvent(*procEntry, eventInfo, aurApp->GetTarget()))
|
||||
return 0;
|
||||
|
||||
// check if spell was affected by this aura's spellmod (used by Arcane Potency and similar effects)
|
||||
|
||||
@@ -3540,6 +3540,32 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
||||
if (m_caster->ToPlayer()->GetCommandStatus(CHEAT_CASTTIME))
|
||||
m_casttime = 0;
|
||||
|
||||
// Fractured / Paragon: cross-class Predator's Swiftness (69369).
|
||||
// Stock 3.3.5 only ADD_PCT_MODIFIER's the cast time of Druid-family
|
||||
// Nature spells via class mask, so a Paragon with the buff cannot
|
||||
// instant-cast Shaman Chain Lightning / Lightning Bolt or any other
|
||||
// non-Druid Nature spell. The tooltip ("next Nature spell with a
|
||||
// base cast time below 10 sec becomes instant") expects all-Nature
|
||||
// behavior; honor that here for CLASS_PARAGON. We deliberately do
|
||||
// not touch the stock SpellMod path -- real Druids continue to hit
|
||||
// the existing class-mask code path unchanged.
|
||||
if (Player* paragonCaster = m_caster->ToPlayer())
|
||||
{
|
||||
constexpr uint32 SPELL_PARAGON_PREDATORY_SWIFTNESS = 69369;
|
||||
if (m_casttime > 0
|
||||
&& paragonCaster->getClass() == CLASS_PARAGON
|
||||
&& (m_spellInfo->SchoolMask & SPELL_SCHOOL_MASK_NATURE)
|
||||
&& m_spellInfo->CastTimeEntry
|
||||
&& !m_spellInfo->IsChanneled()
|
||||
&& !HasTriggeredCastFlag(TRIGGERED_FULL_MASK)
|
||||
&& m_spellInfo->CalcCastTime() < 10 * IN_MILLISECONDS
|
||||
&& paragonCaster->HasAura(SPELL_PARAGON_PREDATORY_SWIFTNESS))
|
||||
{
|
||||
m_casttime = 0;
|
||||
paragonCaster->RemoveAurasDueToSpell(SPELL_PARAGON_PREDATORY_SWIFTNESS);
|
||||
}
|
||||
}
|
||||
|
||||
// don't allow channeled spells / spells with cast time to be casted while moving
|
||||
// (even if they are interrupted on moving, spells with almost immediate effect get to have their effect processed before movement interrupter kicks in)
|
||||
if ((m_spellInfo->IsChanneled() || m_casttime) && m_caster->IsPlayer() && m_caster->isMoving() && m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_MOVEMENT && !IsTriggered())
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#include "SpellAuraDefines.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "World.h"
|
||||
#include "WorldConfig.h"
|
||||
|
||||
uint32 GetTargetFlagMask(SpellTargetObjectTypes objType)
|
||||
{
|
||||
@@ -1323,11 +1325,26 @@ bool SpellInfo::HasInitialAggro() const
|
||||
}
|
||||
|
||||
bool SpellInfo::IsAffected(uint32 familyName, flag96 const& familyFlags) const
|
||||
{
|
||||
return IsAffected(familyName, familyFlags, nullptr);
|
||||
}
|
||||
|
||||
bool SpellInfo::IsAffected(uint32 familyName, flag96 const& familyFlags,
|
||||
Unit const* listenerOwner) const
|
||||
{
|
||||
if (!familyName)
|
||||
return true;
|
||||
|
||||
if (familyName != SpellFamilyName)
|
||||
// Fractured / Paragon: when the unit that owns the listening proc /
|
||||
// spellmod aura is a Paragon, accept any source family. The class
|
||||
// mask flag-bit check below still runs, so listeners that explicitly
|
||||
// opt into a subset of spells via SpellFamilyFlags / class mask are
|
||||
// still respected; only the family-name equality gate is wildcarded.
|
||||
bool const wildcardFamily = listenerOwner
|
||||
&& listenerOwner->getClass() == CLASS_PARAGON
|
||||
&& sWorld->getBoolConfig(CONFIG_PARAGON_WILDCARD_FAMILY);
|
||||
|
||||
if (!wildcardFamily && familyName != SpellFamilyName)
|
||||
return false;
|
||||
|
||||
if (familyFlags && !(familyFlags & SpellFamilyFlags))
|
||||
@@ -1342,6 +1359,11 @@ bool SpellInfo::IsAffectedBySpellMods() const
|
||||
}
|
||||
|
||||
bool SpellInfo::IsAffectedBySpellMod(SpellModifier const* mod) const
|
||||
{
|
||||
return IsAffectedBySpellMod(mod, nullptr);
|
||||
}
|
||||
|
||||
bool SpellInfo::IsAffectedBySpellMod(SpellModifier const* mod, Unit const* listenerOwner) const
|
||||
{
|
||||
// xinef: dont check duration mod
|
||||
if (mod->op != SPELLMOD_DURATION)
|
||||
@@ -1356,7 +1378,7 @@ bool SpellInfo::IsAffectedBySpellMod(SpellModifier const* mod) const
|
||||
if (!sScriptMgr->OnIsAffectedBySpellModCheck(affectSpell, this, mod))
|
||||
return true;
|
||||
|
||||
return IsAffected(affectSpell->SpellFamilyName, mod->mask);
|
||||
return IsAffected(affectSpell->SpellFamilyName, mod->mask, listenerOwner);
|
||||
}
|
||||
|
||||
bool SpellInfo::CanPierceImmuneAura(SpellInfo const* auraSpellInfo) const
|
||||
|
||||
@@ -494,9 +494,21 @@ public:
|
||||
bool HasInitialAggro() const;
|
||||
|
||||
[[nodiscard]] bool IsAffected(uint32 familyName, flag96 const& familyFlags) const;
|
||||
// Fractured / Paragon overload. When `listenerOwner` is a CLASS_PARAGON
|
||||
// unit and Paragon.WildcardFamilyMatching is enabled, the
|
||||
// SpellFamilyName equality check is skipped (flag-bit check still runs)
|
||||
// so cross-class procs / spellmods can react to the spell. Passing
|
||||
// nullptr (or any non-Paragon unit) reproduces the stock 2-arg
|
||||
// behavior; the 2-arg form forwards to this overload with nullptr.
|
||||
[[nodiscard]] bool IsAffected(uint32 familyName, flag96 const& familyFlags,
|
||||
Unit const* listenerOwner) const;
|
||||
|
||||
bool IsAffectedBySpellMods() const;
|
||||
bool IsAffectedBySpellMod(SpellModifier const* mod) const;
|
||||
// Fractured / Paragon overload: pass the player who owns the modifier
|
||||
// aura so wildcard-family matching can apply when that player is a
|
||||
// Paragon. Stock callers may forward to this with nullptr.
|
||||
bool IsAffectedBySpellMod(SpellModifier const* mod, Unit const* listenerOwner) const;
|
||||
|
||||
bool CanPierceImmuneAura(SpellInfo const* auraSpellInfo) const;
|
||||
bool CanDispelAura(SpellInfo const* auraSpellInfo) const;
|
||||
|
||||
@@ -842,7 +842,8 @@ SpellProcEntry const* SpellMgr::GetSpellProcEntry(uint32 spellId) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool SpellMgr::CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcEventInfo& eventInfo) const
|
||||
bool SpellMgr::CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcEventInfo& eventInfo,
|
||||
Unit const* procOwner /*= nullptr*/) const
|
||||
{
|
||||
// proc type doesn't match
|
||||
if (!(eventInfo.GetTypeMask() & procEntry.ProcFlags))
|
||||
@@ -873,7 +874,10 @@ bool SpellMgr::CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcE
|
||||
// check spell family name/flags (if set) for spells
|
||||
if (eventInfo.GetTypeMask() & SPELL_PROC_FLAG_MASK)
|
||||
if (SpellInfo const* eventSpellInfo = eventInfo.GetSpellInfo())
|
||||
if (!eventSpellInfo->IsAffected(procEntry.SpellFamilyName, procEntry.SpellFamilyMask))
|
||||
// Fractured / Paragon: thread the proc-aura owner so a Paragon
|
||||
// listener accepts cross-family source spells. See
|
||||
// SpellInfo::IsAffected(family, flags, listenerOwner).
|
||||
if (!eventSpellInfo->IsAffected(procEntry.SpellFamilyName, procEntry.SpellFamilyMask, procOwner))
|
||||
return false;
|
||||
|
||||
// check spell type mask (if set)
|
||||
|
||||
@@ -699,7 +699,12 @@ public:
|
||||
|
||||
// Spell proc table
|
||||
[[nodiscard]] SpellProcEntry const* GetSpellProcEntry(uint32 spellId) const;
|
||||
bool CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcEventInfo& eventInfo) const;
|
||||
// Fractured / Paragon: `procOwner` is the unit that holds the listening
|
||||
// proc aura. Passing it lets SpellInfo::IsAffected wildcard the family
|
||||
// check when the listener is on a CLASS_PARAGON player. Non-Paragon
|
||||
// owners (or nullptr) reproduce stock behavior exactly.
|
||||
bool CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcEventInfo& eventInfo,
|
||||
Unit const* procOwner = nullptr) const;
|
||||
|
||||
// Spell bonus data table
|
||||
[[nodiscard]] SpellBonusEntry const* GetSpellBonusData(uint32 spellId) const;
|
||||
|
||||
@@ -684,4 +684,10 @@ void WorldConfig::BuildConfigCache()
|
||||
|
||||
// Achievement
|
||||
SetConfigValue<uint32>(CONFIG_ACHIEVEMENT_REALM_FIRST_KILL_WINDOW, "Achievement.RealmFirstKillWindow", 60);
|
||||
|
||||
// Fractured / Paragon: cross-class wildcard for SpellFamilyName gating.
|
||||
// Default ON because the Paragon class is designed around it; flip to 0
|
||||
// (no rebuild required) if a regression appears and stock family
|
||||
// gating needs to be restored without backing out the code.
|
||||
SetConfigValue<bool>(CONFIG_PARAGON_WILDCARD_FAMILY, "Paragon.WildcardFamilyMatching", true);
|
||||
}
|
||||
|
||||
@@ -495,6 +495,12 @@ enum ServerConfigs
|
||||
CONFIG_NEW_CHAR_STRING,
|
||||
CONFIG_VALIDATE_SKILL_LEARNED_BY_SPELLS,
|
||||
CONFIG_ACHIEVEMENT_REALM_FIRST_KILL_WINDOW,
|
||||
// Fractured / Paragon: when true, CLASS_PARAGON characters bypass the
|
||||
// SpellFamilyName equality check in proc / spellmod / aura listener
|
||||
// gates so cross-class talent procs and modifiers can interact with
|
||||
// spells learned from other classes (e.g. Predator's Swiftness 69369
|
||||
// making Shaman Chain Lightning instant). Stock classes are unaffected.
|
||||
CONFIG_PARAGON_WILDCARD_FAMILY,
|
||||
|
||||
MAX_NUM_SERVER_CONFIGS
|
||||
};
|
||||
|
||||
@@ -88,7 +88,7 @@ CI workflow **Sync release to Gitea** (`.github/workflows/gitea-release-sync.yml
|
||||
1. Triggers on **release published** on **`Dawnforger/Fractured`** (or **workflow_dispatch** with a tag).
|
||||
2. Builds **Windows** (NSIS + portable) and **Linux** (AppImage) in parallel, each using **`tools/fractured-launcher-electron` from the default branch** (overlaid onto the tag checkout), so older release tags never ship a launcher missing new **`lib/*.js`** files.
|
||||
3. Downloads **all assets** attached to that **GitHub** release (MPQs, patched `Wow.exe`, etc.).
|
||||
4. Merges with the built launcher artifacts and uploads everything to a **Gitea release** with the **same tag** (existing attachments on that Gitea release are replaced).
|
||||
4. Merges with the built launcher artifacts and uploads to a **Gitea release** with the **same tag** (existing attachments on that Gitea release are replaced). **Launcher installers** attached on GitHub (**`Fractured-Launcher*`**, case-insensitive) are **not** merged — the **CI build from the default branch** is the only source of launcher binaries, so an old installer on the GitHub release cannot “stick” on Gitea next to a newer build. **`*.blockmap`** and **`builder-debug.yml`** are omitted from the merge and from Gitea uploads.
|
||||
|
||||
**GitHub Actions secrets** (repository → Settings → Secrets and variables → Actions):
|
||||
|
||||
@@ -127,6 +127,9 @@ CI workflow **Sync release to Gitea** (`.github/workflows/gitea-release-sync.yml
|
||||
8. **HTTP 422 `repo is empty`** — The Gitea repo has **no commits** yet. Push any initial commit (e.g. **Add README** in the Gitea web UI, or `git push` to **`main`**). Optionally set **`GITEA_TARGET_REF`** to match your real default branch if it is not **`main`**. From this repo you can run **`scripts/bootstrap-gitea-repo.sh`** (see script header for `GITEA_*` env or pass the HTTPS/SSH clone URL as the first argument).
|
||||
9. **`sync Wow.exe: fetch failed`** — Often **HTTPS/TLS** to Gitea; use **`http://…`** in **`lib/baked-gitea-channel.js`** if you only serve plain HTTP, or fix certs / **`NODE_EXTRA_CA_CERTS`**. Ensure **`Wow-patched.exe`** exists on the release (**`release_tag`**: `latest` vs pinned). Errors include the failing URL when possible.
|
||||
10. **Wine + Windows portable** — If the folder picker returns **`/home/...`**, the launcher maps it to **`Z:\home\...`** (Wine’s Unix root). **`Wow.exe`** is matched case-insensitively for Linux-backed folders. Re-save the WoW folder after upgrading if validation still fails.
|
||||
11. **`EBUSY` / file locked on Windows** — The client (or antivirus) may keep **`.MPQ`** files open. The launcher **retries** for a short window and downloads the new file **before** replacing the old one; if sync still fails, **exit WoW** (and any tool previewing that folder) and run **Download updates** again.
|
||||
12. **`.bak-*` clutter** — When **Download updates** finishes without error, the launcher removes matching **`*.bak-YYYYMMDD-HHmmss`** files from earlier runs (same pattern it uses when replacing files). Failed syncs do not delete backups.
|
||||
13. **Gitea still shows an old launcher version** — The sync workflow overlays **`tools/fractured-launcher-electron` from the default branch**, so **`package.json`** there defines the built version. Ensure launcher changes are **merged to `main`** before publishing the GitHub release (or re-run **Actions → Sync release to Gitea** after merging). Previously, **Fractured-Launcher\*** files **attached on the GitHub release** were merged too, which could leave **two** installer versions on Gitea; those assets are now skipped in favor of CI-only builds.
|
||||
|
||||
### Private Gitea token for players
|
||||
|
||||
@@ -170,4 +173,4 @@ Schema is defined by **`default-launcher.json`** (shipped in the app; first run
|
||||
- **`github`**: used for **non-release** repo paths (`from_release`: false) and for **GitHub** **`from_release`** when **`gitea.base_url`** is empty.
|
||||
- **`patch_manifest`**: **`enabled`**, **`source`** (default `patch-manifest.json`), **`from_release`** — checksum-based skip + verify (see above).
|
||||
- **`files`**: default **`[]`**. **Download updates** resolves what to pull in order: (**1**) non-empty **`files`** if you set explicit **`source`** → **`dest`** pairs; (**2**) else each key in **`patch-manifest.json`** on the release (recommended); (**3**) else release attachments except launcher artifacts (`Fractured-Launcher*`, `*.blockmap`, `latest*.yml`, `.AppImage`, `patch-manifest.json`): **`.MPQ`** → **`Data/enUS/<name>.MPQ`** (extension forced to **`.MPQ`** caps for client compatibility), one **`.exe`** → **`launch.exe`**. Multiple `.exe` attachments require a manifest. Legacy **`Wow-patched.exe`** entries are removed when merging **`launcher.json`**.
|
||||
- **`realmlist`**, **`auth`**, **`launch`**.
|
||||
- **`realmlist`**, **`auth`**, **`launch`** (`**exe**`, **`args`**). Only **`Data/enUS/realmlist.wtf`** is written: any **`realmlist.paths`** entry that is not the enUS file is ignored (so **`enGB`** is never created). On **Linux**, **Play** never runs `Wow.exe` as a native process (that yields **EACCES**). Use **`launch.linux_wrapper`** (default **`["wine"]`**) so the launcher runs e.g. **`wine /path/Wow.exe` …`args`**, or set **`launch.linux_steam_uri`** to a Steam URI (e.g. **`steam://rungameid/…`** for a **non-Steam game** shortcut — the number is shown in Steam’s shortcut properties). Optional **`linux_steam_binary`** defaults to **`steam`**; for Flatpak Steam use **`linux_steam_spawn`**: **`["flatpak", "run", "com.valvesoftware.Steam"]`** (the URI is appended as the last argument). After a **successful** **Download updates** run, the launcher deletes prior **`*.bak-YYYYMMDD-HHmmss`** backup files it created under the WoW folder.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"realmlist": {
|
||||
"enabled": true,
|
||||
"line": "set realmlist fracturedwow.ddns.net:47497",
|
||||
"paths": ["Data/enUS/realmlist.wtf", "Data/enGB/realmlist.wtf"]
|
||||
"paths": ["Data/enUS/realmlist.wtf"]
|
||||
},
|
||||
"auth": {
|
||||
"enabled": false,
|
||||
@@ -37,6 +37,9 @@
|
||||
"launch": {
|
||||
"exe": "Wow.exe",
|
||||
"args": [],
|
||||
"linux_wrapper": ["wine"]
|
||||
"linux_wrapper": ["wine"],
|
||||
"linux_steam_uri": "",
|
||||
"linux_steam_binary": "",
|
||||
"linux_steam_spawn": []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,42 @@ function backupSuffix() {
|
||||
return `${d.getFullYear()}${pad2(d.getMonth() + 1)}${pad2(d.getDate())}-${pad2(d.getHours())}${pad2(d.getMinutes())}${pad2(d.getSeconds())}`;
|
||||
}
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise((r) => setTimeout(r, ms));
|
||||
}
|
||||
|
||||
/** Windows often returns EBUSY/EPERM when WoW or AV still has an MPQ open. */
|
||||
function isRetryableFsLockError(e) {
|
||||
const c = e && e.code;
|
||||
if (!c) return false;
|
||||
if (c === 'EBUSY' || c === 'EPERM' || c === 'EACCES') return true;
|
||||
if (process.platform === 'win32' && (c === 'UNKNOWN' || c === 'EUNKNOWN')) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
async function retryFsLock(op, opts) {
|
||||
const attempts = (opts && opts.attempts) || (process.platform === 'win32' ? 30 : 10);
|
||||
const delayMs = (opts && opts.delayMs) || 500;
|
||||
let last;
|
||||
for (let i = 0; i < attempts; i++) {
|
||||
try {
|
||||
return await op();
|
||||
} catch (e) {
|
||||
last = e;
|
||||
if (!isRetryableFsLockError(e)) throw e;
|
||||
if (i === attempts - 1) break;
|
||||
await sleep(delayMs);
|
||||
}
|
||||
}
|
||||
const hint =
|
||||
process.platform === 'win32'
|
||||
? ' Close World of Warcraft and any launcher using this folder, then try again.'
|
||||
: ' Close programs using this file, then try again.';
|
||||
const err = new Error(String((last && last.message) || last) + hint);
|
||||
err.code = last && last.code;
|
||||
throw err;
|
||||
}
|
||||
|
||||
function wowExePath(cfg) {
|
||||
const gd = normalizeWinGameDir(cfg.game_dir || '');
|
||||
const exe = (cfg.launch && cfg.launch.exe) || 'Wow.exe';
|
||||
@@ -51,34 +87,88 @@ function normalizeMpqDestinationPath(absPath) {
|
||||
return /\.mpq$/i.test(s) ? s.replace(/\.mpq$/i, '.MPQ') : s;
|
||||
}
|
||||
|
||||
/** Matches backup names from installFile: `<orig>.bak-YYYYMMDD-HHmmss`. */
|
||||
const LAUNCHER_BACKUP_BASENAME_RE = /\.bak-\d{8}-\d{6}$/;
|
||||
|
||||
async function removeLauncherBackupFiles(gameDir) {
|
||||
const root = normalizeWinGameDir(gameDir || '');
|
||||
if (!root) return;
|
||||
const stack = [root];
|
||||
while (stack.length) {
|
||||
const dir = stack.pop();
|
||||
let entries;
|
||||
try {
|
||||
entries = await fs.readdir(dir, { withFileTypes: true });
|
||||
} catch (_) {
|
||||
continue;
|
||||
}
|
||||
for (const d of entries) {
|
||||
const abs = path.join(dir, d.name);
|
||||
if (d.isDirectory()) {
|
||||
stack.push(abs);
|
||||
} else if (d.isFile() && LAUNCHER_BACKUP_BASENAME_RE.test(d.name)) {
|
||||
try {
|
||||
await fs.unlink(abs);
|
||||
} catch (e) {
|
||||
if (e.code !== 'ENOENT') {
|
||||
/* best effort: sync already succeeded */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isEnUsRealmlistPath(rel) {
|
||||
const n = String(rel || '')
|
||||
.trim()
|
||||
.replace(/\\/g, '/')
|
||||
.toLowerCase();
|
||||
return n.endsWith('/enus/realmlist.wtf') || n === 'enus/realmlist.wtf';
|
||||
}
|
||||
|
||||
async function installFile(cfg, entry) {
|
||||
const parts = String(entry.dest).replace(/\\/g, '/').split('/').filter(Boolean);
|
||||
const root = normalizeWinGameDir(cfg.game_dir || '');
|
||||
const destAbs = normalizeMpqDestinationPath(path.join(root, ...parts));
|
||||
if (entry.backup) {
|
||||
try {
|
||||
const st = await fs.stat(destAbs);
|
||||
if (st.isFile()) {
|
||||
const bak = `${destAbs}.bak-${backupSuffix()}`;
|
||||
await fs.rename(destAbs, bak);
|
||||
}
|
||||
} catch (e) {
|
||||
if (e.code !== 'ENOENT') throw e;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
await fs.unlink(destAbs);
|
||||
} catch (e) {
|
||||
if (e.code !== 'ENOENT') throw e;
|
||||
}
|
||||
}
|
||||
const tmp = destAbs + '.new';
|
||||
|
||||
if (entry.from_release) {
|
||||
await downloadReleaseAsset(cfg, entry.source, tmp);
|
||||
} else {
|
||||
await downloadGitHubRepoFile(cfg, entry.source, tmp);
|
||||
}
|
||||
await fs.rename(tmp, destAbs);
|
||||
|
||||
async function removeOrBackupExisting() {
|
||||
if (entry.backup) {
|
||||
try {
|
||||
const st = await fs.stat(destAbs);
|
||||
if (st.isFile()) {
|
||||
const bak = `${destAbs}.bak-${backupSuffix()}`;
|
||||
await fs.rename(destAbs, bak);
|
||||
}
|
||||
} catch (e) {
|
||||
if (e.code !== 'ENOENT') throw e;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
await fs.unlink(destAbs);
|
||||
} catch (e) {
|
||||
if (e.code !== 'ENOENT') throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await retryFsLock(() => removeOrBackupExisting());
|
||||
await retryFsLock(() => fs.rename(tmp, destAbs));
|
||||
|
||||
if (process.platform === 'linux' && /\.exe$/i.test(destAbs)) {
|
||||
try {
|
||||
await fs.chmod(destAbs, 0o755);
|
||||
} catch (_) {
|
||||
/* non-fatal */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function applyRealmlist(cfg) {
|
||||
@@ -91,6 +181,8 @@ async function applyRealmlist(cfg) {
|
||||
const content = line + '\n';
|
||||
let paths = cfg.realmlist.paths;
|
||||
if (!paths || !paths.length) paths = ['Data/enUS/realmlist.wtf'];
|
||||
paths = paths.filter(isEnUsRealmlistPath);
|
||||
if (!paths.length) paths = ['Data/enUS/realmlist.wtf'];
|
||||
for (const rel of paths) {
|
||||
const r = String(rel).trim().replace(/\\/g, '/');
|
||||
if (!r) continue;
|
||||
@@ -119,6 +211,12 @@ async function applyPatches(cfg, onStatus) {
|
||||
if (onStatus) onStatus('Applying realmlist …');
|
||||
await applyRealmlist(cfg);
|
||||
}
|
||||
if (onStatus) onStatus('Removing old backup copies …');
|
||||
try {
|
||||
await removeLauncherBackupFiles(cfg.game_dir);
|
||||
} catch (_) {
|
||||
/* Patches and realmlist already applied; leave .bak files if cleanup cannot run. */
|
||||
}
|
||||
if (onStatus) onStatus('All patches applied.');
|
||||
}
|
||||
|
||||
|
||||
@@ -145,9 +145,44 @@ ipcMain.handle('launcher:checkUpdates', async () => {
|
||||
ipcMain.handle('launcher:play', async () => {
|
||||
const { config } = await readMergedConfig();
|
||||
const exe = wowExePath(config);
|
||||
const args = (config.launch && config.launch.args) || [];
|
||||
const child = spawn(exe, args, {
|
||||
cwd: config.game_dir,
|
||||
const gameArgs = (config.launch && config.launch.args) || [];
|
||||
const lc = config.launch || {};
|
||||
const cwd = config.game_dir;
|
||||
|
||||
let cmd;
|
||||
let spawnArgs;
|
||||
if (process.platform === 'linux') {
|
||||
const steamUri = String(lc.linux_steam_uri || '').trim();
|
||||
const steamSpawn = Array.isArray(lc.linux_steam_spawn) ? lc.linux_steam_spawn.filter(Boolean) : [];
|
||||
if (steamUri) {
|
||||
if (steamSpawn.length) {
|
||||
cmd = steamSpawn[0];
|
||||
spawnArgs = [...steamSpawn.slice(1), steamUri];
|
||||
} else {
|
||||
const bin = String(lc.linux_steam_binary || 'steam').trim() || 'steam';
|
||||
cmd = bin;
|
||||
spawnArgs = [steamUri];
|
||||
}
|
||||
} else {
|
||||
const wrap = Array.isArray(lc.linux_wrapper) ? lc.linux_wrapper.filter(Boolean) : [];
|
||||
if (wrap.length) {
|
||||
cmd = wrap[0];
|
||||
spawnArgs = [...wrap.slice(1), exe, ...gameArgs];
|
||||
} else {
|
||||
throw new Error(
|
||||
'On Linux, Wow.exe is a Windows program and cannot be run directly. ' +
|
||||
'Set launch.linux_steam_uri (e.g. steam://rungameid/… for your Steam shortcut) ' +
|
||||
'or launch.linux_wrapper (e.g. ["wine"]) in launcher.json.'
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cmd = exe;
|
||||
spawnArgs = gameArgs;
|
||||
}
|
||||
|
||||
const child = spawn(cmd, spawnArgs, {
|
||||
cwd,
|
||||
detached: true,
|
||||
stdio: 'ignore',
|
||||
windowsHide: true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fractured-launcher-electron",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.12",
|
||||
"description": "Fractured WoW launcher (Electron) — no console window, native folder picker, auto-update",
|
||||
"main": "main.js",
|
||||
"repository": {
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
# Shared filters for GitHub → Gitea / distro release merges and Gitea uploads.
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Skip when copying assets from `gh release download` into combined/: CI-built launcher is authoritative.
|
||||
should_skip_merge_from_github() {
|
||||
local l
|
||||
l=$(printf '%s' "${1##*/}" | tr '[:upper:]' '[:lower:]')
|
||||
case "$l" in
|
||||
fractured-launcher*) return 0 ;;
|
||||
*.blockmap) return 0 ;;
|
||||
builder-debug.yml|builder-debug.yaml) return 0 ;;
|
||||
esac
|
||||
return 1
|
||||
}
|
||||
|
||||
# Skip when POSTing attachments to Gitea (belt-and-suspenders if something slips into combined/).
|
||||
should_skip_gitea_upload() {
|
||||
local l
|
||||
l=$(printf '%s' "${1##*/}" | tr '[:upper:]' '[:lower:]')
|
||||
case "$l" in
|
||||
*.blockmap) return 0 ;;
|
||||
builder-debug.yml|builder-debug.yaml) return 0 ;;
|
||||
esac
|
||||
return 1
|
||||
}
|
||||
@@ -11,6 +11,10 @@
|
||||
#
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=release-sync-filters.sh
|
||||
. "$SCRIPT_DIR/release-sync-filters.sh"
|
||||
|
||||
COMBINED_DIR="${1:?first arg: directory of files to attach}"
|
||||
TAG="${2:?second arg: release tag (e.g. v1.0.0)}"
|
||||
|
||||
@@ -67,12 +71,6 @@ if [ -z "$rel_id" ] || [ "$rel_id" = "null" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while read -r aid; do
|
||||
[ -z "$aid" ] || [ "$aid" = "null" ] && continue
|
||||
curl -fsS -X DELETE "${AUTH_H[@]}" \
|
||||
"$API/repos/${GITEA_OWNER}/${GITEA_REPO}/releases/${rel_id}/assets/${aid}" || true
|
||||
done < <(jq -r '(.attachments // .assets // [])[] | .id' "$REL_JSON")
|
||||
|
||||
shopt -s nullglob
|
||||
files=("$COMBINED_DIR"/*)
|
||||
if [ "${#files[@]}" -eq 0 ]; then
|
||||
@@ -80,12 +78,39 @@ if [ "${#files[@]}" -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
uploadable=0
|
||||
for f in "${files[@]}"; do
|
||||
[ -f "$f" ] || continue
|
||||
echo "Uploading $(basename "$f") …"
|
||||
bn=$(basename "$f")
|
||||
if should_skip_gitea_upload "$bn"; then
|
||||
continue
|
||||
fi
|
||||
uploadable=$((uploadable + 1))
|
||||
done
|
||||
if [ "$uploadable" -eq 0 ]; then
|
||||
echo "No files to upload after exclusions (check $COMBINED_DIR) — not clearing Gitea attachments." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while read -r aid; do
|
||||
[ -z "$aid" ] || [ "$aid" = "null" ] && continue
|
||||
curl -fsS -X DELETE "${AUTH_H[@]}" \
|
||||
"$API/repos/${GITEA_OWNER}/${GITEA_REPO}/releases/${rel_id}/assets/${aid}" || true
|
||||
done < <(jq -r '(.attachments // .assets // [])[] | .id' "$REL_JSON")
|
||||
|
||||
uploaded=0
|
||||
for f in "${files[@]}"; do
|
||||
[ -f "$f" ] || continue
|
||||
bn=$(basename "$f")
|
||||
if should_skip_gitea_upload "$bn"; then
|
||||
echo "Skipping upload (excluded): $bn"
|
||||
continue
|
||||
fi
|
||||
echo "Uploading $bn …"
|
||||
curl -fsS -X POST "${AUTH_H[@]}" \
|
||||
-F "attachment=@${f}" \
|
||||
"$API/repos/${GITEA_OWNER}/${GITEA_REPO}/releases/${rel_id}/assets"
|
||||
uploaded=$((uploaded + 1))
|
||||
done
|
||||
|
||||
echo "Gitea release $TAG (id=$rel_id) updated with ${#files[@]} file(s)."
|
||||
echo "Gitea release $TAG (id=$rel_id) updated with $uploaded file(s)."
|
||||
|
||||
Reference in New Issue
Block a user