feat(all): complete map fog unlock, outfit toggle F8, gacha draws, monster combat, cutscenes catalog, and arcade minigame

This commit is contained in:
CAtlas0784 committed 2026-09-18 00:54:40 +07:00
1 parent 3853760c34
commit 75a1d91df0
9 files changed
+242 -29

No files matched your search

@@ -17,30 +17,64 @@ internal sealed partial class GameRouter
conn.Session.Log.Info($"[GACHA] AskDrawGacha: poolId={poolId} count={count} autoEx={args.isAutoExchange}");
var fiveStarSpirits = new uint[] { 15020992, 15020991, 15020997, 15021024, 15021025 };
var fourStarSpirits = new uint[] { 15020989, 15020990, 15021016, 15021017, 15021020, 15021021, 15021022, 15021023 };
var topWeapons = new uint[] { 98003001, 98003023, 98003131, 98003184, 98003185 };
var sync = new SyncGachaDrawInfo
{
isGrandPrizeWithAllFillers = false,
drawDetails = new List<GachaDrawDetail>()
};
var records = new List<GachaDrawRecord>();
var rng = Random.Shared;
for (uint i = 0; i < count; i++)
{
bool isGuaranteedFiveStar = (count >= 10 && i == count - 1) || (rng.Next(100) < 15);
bool isFourStar = !isGuaranteedFiveStar && (rng.Next(100) < 45);
uint prizeId;
if (isGuaranteedFiveStar)
{
prizeId = fiveStarSpirits[rng.Next(fiveStarSpirits.Length)];
}
else if (isFourStar)
{
prizeId = fourStarSpirits[rng.Next(fourStarSpirits.Length)];
}
else
{
prizeId = topWeapons[rng.Next(topWeapons.Length)];
}
sync.drawDetails.Add(new GachaDrawDetail
{
PoolContentId = poolId,
IsGrandPrize = (i == count - 1),
PoolContentId = prizeId,
IsGrandPrize = isGuaranteedFiveStar,
IsConverted = false,
IsNew = true
});
records.Add(new GachaDrawRecord
{
GachaId = poolId,
PoolContentId = prizeId,
DropId = prizeId,
DrawTimeUnix = DateTimeOffset.UtcNow.ToUnixTimeSeconds()
});
}
await conn.NotifyAsync(MethodId.SyncGachaDrawInfo, sync);
var gachaInfos = new PlayerGachaInfos();
gachaInfos.PoolInfos[poolId] = new PlayerGachaPoolInfo
var poolInfo = new PlayerGachaPoolInfo
{
DrawCount = count
DrawCount = count,
DrawRecords = records
};
gachaInfos.PoolInfos[poolId] = poolInfo;
gachaInfos.GroupInfos[poolId] = new PlayerGachaGroupInfo
{
TotalDrawCount = count
@@ -175,14 +175,15 @@ internal sealed partial class GameRouter
AdminNpcSpawnItem item, NpcCatalogEntry4229938 npc,
PoiActionCatalogEntry4229938? poi, uint mainActionId)
{
bool isMonster = npc.Category == "monster" || npc.Camp is 0 or 26;
return new GameMethods.NpcAgentSyncClientInfo4229938
{
stimIDList = new List<int>(),
CanBeExaminedByPolice = true,
CanBeExaminedByPolice = !isMonster,
indoorList = new(),
roomIds = new List<int>(),
SpoonAgentId = (int)item.NpcFormworkId,
treeName = "PedBase",
treeName = isMonster ? "" : "PedBase",
petPerformData = "",
spawnEffectId = new List<uint>(),
randomModelCfgId = 0,
@@ -197,8 +198,8 @@ internal sealed partial class GameRouter
AgentDataSetsActivityCfgId = 0,
InteractId = npc.InteractSettingId,
AISetting = npc.AiSettingId,
beHitType = 1, // Civilian hit reaction without combat damage.
agentStimType = 0,
beHitType = (byte)(isMonster ? 0 : 1), // 0 = Combat hit reaction & damage, 1 = Civilian non-combat
agentStimType = (byte)(isMonster ? 1 : 0), // 1 = Aggressive combat stimulation
forbidStimulateType = 0,
isAttackInSafeMode = true,
};
@@ -368,8 +368,9 @@ internal sealed partial class GameRouter
await ctx.NotifyAsync(MethodId.SyncAllActivities, activitiesSync);
// Unlock all scene fog of war on the client across all city/world scenes
foreach (var fogSceneId in new uint[] { 1, 1001, 10001, state.ActiveRaidId })
foreach (var fogSceneId in new uint[] { 1, 101, 102, 103, 1001, 10001, 20001125, 20001222, 20001223, 23300888, 23300999, (uint)state.SceneId, state.ActiveRaidId })
{
if (fogSceneId == 0) continue;
await ctx.NotifyAsync(MethodId.SyncSceneFogMapAllUnlock, new SceneMethods.SyncSceneFogMapAllUnlockInfo
{
SceneId = fogSceneId,