Compare commits

..

No commits in common. "main" and "3.0.0" have entirely different histories.
main ... 3.0.0

7 changed files with 152 additions and 271 deletions

View file

@ -1,5 +1,53 @@
{ {
"avatar_config": [ "avatar_config": [
{
"name": "Acheron",
"id": 1304,
"hp": 100,
"sp": 0,
"level": 80,
"promotion": 6,
"rank": 6,
"lightcone": {
"id": 23000,
"rank": 2,
"level": 80,
"promotion": 6
},
"relics": [
"61171,15,1,4,3:2:2,4:1:2,8:2:3,9:3:1",
"61172,15,1,4,1:2:4,5:2:4,8:2:2,9:3:1",
"61173,15,5,4,4:2:0,5:3:2,8:3:5,10:1:1",
"61174,15,2,4,2:2:2,8:3:5,9:2:2,10:1:1",
"63145,15,7,4,3:3:5,4:1:2,5:1:1,8:3:4",
"63146,15,4,4,3:2:1,9:4:4,10:1:1,11:1:1"
],
"use_technique": true
},
{
"name": "Hyacine",
"id": 1313,
"hp": 100,
"sp": 50,
"level": 80,
"promotion": 6,
"rank": 6,
"lightcone": {
"id": 23001,
"rank": 2,
"level": 80,
"promotion": 6
},
"relics": [
"61251,15,1,4,5:1:1,6:3:3,7:3:3,12:1:1",
"61252,15,1,4,7:3:3,10:3:3,11:2:2,12:1:1",
"61253,15,6,4,5:1:1,6:3:5,7:2:4,12:3:4",
"61254,15,4,4,4:2:0,9:2:2,11:2:4,10:3:0",
"63205,15,8,4,2:2:3,7:3:1,8:2:1,10:2:4",
"63206,15,3,4,3:3:2,7:2:1,9:3:4,11:1:1"
],
"use_technique": true
},
{ {
"name": "Cipher", "name": "Cipher",
"id": 1406, "id": 1406,
@ -9,68 +57,44 @@
"promotion": 6, "promotion": 6,
"rank": 6, "rank": 6,
"lightcone": { "lightcone": {
"id": 23043, "id": 23004,
"rank": 5, "rank": 2,
"level": 80, "level": 80,
"promotion": 6 "promotion": 6
}, },
"relics": [ "relics": [
"61261,15,1,4,9:5:5,10:2:2,6:1:1,5:1:1", "61171,15,1,4,7:2:2,5:2:3,8:1:2,9:3:2",
"61262,15,1,4,12:1:1,6:3:3,4:2:2,11:3:3", "61172,15,1,4,5:2:3,8:2:2,9:2:2,12:2:1",
"61263,15,5,4,7:3:3,6:1:1,2:2:2,4:3:3", "61173,15,5,4,8:3:3,7:2:2,5:3:0,2:1:1",
"61264,15,4,4,11:1:1,12:1:1,9:5:5,6:2:2", "61174,15,4,4,3:2:3,8:2:3,9:2:2,10:2:1",
"63145,15,7,4,3:3:3,2:2:2,4:3:3,8:1:1", "63145,15,9,4,3:2:2,5:2:2,8:2:3,9:2:3",
"63146,15,4,4,9:3:3,2:2:2,3:1:1,6:3:3" "63146,15,4,4,1:2:3,6:1:2,8:1:0,9:4:2"
], ],
"use_technique": false "use_technique": false
}, },
{ {
"name": "Hyacine", "name": "Tribbie",
"id": 1409, "id": 1403,
"hp": 100, "hp": 100,
"sp": 50, "sp": 0,
"level": 80, "level": 80,
"promotion": 6, "promotion": 6,
"rank": 6, "rank": 6,
"lightcone": { "lightcone": {
"id": 23042, "id": 23006,
"rank": 5, "rank": 2,
"level": 80, "level": 80,
"promotion": 6 "promotion": 6
}, },
"relics": [ "relics": [
"61251,15,1,4,7:3:3,2:2:2,12:3:3,9:1:1", "61241,15,1,4,8:2:1,9:2:4,11:2:2,12:2:2",
"61252,15,1,4,7:1:1,12:5:5,10:2:2,3:1:1", "61242,15,1,4,3:1:0,8:3:3,9:2:1,12:2:3",
"61253,15,6,4,5:3:3,8:1:1,7:3:3,10:2:2", "61243,15,5,4,3:2:4,8:3:2,10:1:0,11:2:3",
"61254,15,4,4,9:1:1,8:4:4,11:2:2,5:2:2", "61244,15,1,4,5:2:2,8:2:3,9:2:1,12:2:4",
"63205,15,1,4,7:3:3,8:2:2,10:1:1,2:3:3", "63195,15,1,4,1:2:4,5:1:1,8:4:4,9:1:1",
"63206,15,3,4,5:3:3,8:2:2,11:3:3,6:1:1" "63196,15,3,4,7:2:1,8:4:7,9:2:1,10:1:1"
], ],
"use_technique": false "use_technique": true
},
{
"name": "Anaxa",
"id": 1405,
"hp": 100,
"sp": 50,
"level": 80,
"promotion": 6,
"rank": 6,
"lightcone": {
"id": 23041,
"rank": 5,
"level": 80,
"promotion": 6
},
"relics": [
"61081,15,1,4,12:2:2,6:2:2,2:3:3,10:2:2",
"61082,15,1,4,5:2:2,6:4:4,11:1:1,8:2:2",
"61083,15,5,4,7:3:3,3:1:1,6:3:3,5:2:2",
"61084,15,4,4,12:1:1,8:1:1,9:2:2,4:5:5",
"63175,15,8,4,7:4:4,9:2:2,3:2:2,11:1:1",
"63176,15,2,4,5:4:4,10:2:2,7:2:2,11:1:1"
],
"use_technique": false
}, },
{ {
"name": "Castorice", "name": "Castorice",
@ -81,71 +105,23 @@
"promotion": 6, "promotion": 6,
"rank": 6, "rank": 6,
"lightcone": { "lightcone": {
"id": 23040, "id": 23015,
"rank": 5, "rank": 2,
"level": 80, "level": 80,
"promotion": 6 "promotion": 6
}, },
"relics": [ "relics": [
"61241,15,1,4,6:3:3,9:4:4,4:1:1,10:1:1", "61241,15,1,4,8:2:2,6:2:2,4:2:2,2:3:3",
"61242,15,1,4,9:2:2,3:1:1,7:4:4,5:2:2", "61242,15,1,4,3:3:3,9:2:2,7:2:2,8:2:2",
"61243,15,5,4,7:1:1,3:2:2,10:3:3,6:3:3", "61243,15,5,4,6:2:2,4:2:2,12:1:1,2:4:4",
"61244,15,1,4,1:2:2,5:2:2,12:2:2,8:3:3", "61244,15,1,4,5:4:4,8:2:2,1:2:2,6:1:1",
"63195,15,1,4,2:3:3,12:1:1,8:2:2,5:3:3", "63195,15,1,4,9:2:2,2:1:1,8:1:1,11:5:5",
"63196,15,3,4,9:3:3,6:2:2,8:3:3,3:1:1" "63196,15,3,4,7:1:1,1:3:3,11:4:4,2:1:1"
], ],
"use_technique": false "use_technique": true
}, },
{ {
"name": "Mydei", "name": "Castorice",
"id": 1404,
"hp": 100,
"sp": 50,
"level": 80,
"promotion": 6,
"rank": 6,
"lightcone": {
"id": 23039,
"rank": 5,
"level": 80,
"promotion": 6
},
"relics": [
"61241,15,1,4,3:2:2,12:2:2,6:2:2,2:3:3",
"61242,15,1,4,5:1:1,6:3:3,10:3:3,9:2:2",
"61243,15,5,4,10:3:3,12:1:1,8:2:2,3:3:3",
"61244,15,1,4,8:2:2,11:2:2,10:2:2,2:3:3",
"63195,15,1,4,12:2:2,7:4:4,3:1:1,8:2:2",
"63196,15,3,4,7:3:3,10:1:1,6:3:3,3:2:2"
],
"use_technique": false
},
{
"name": "Tribbie",
"id": 1403,
"hp": 100,
"sp": 50,
"level": 80,
"promotion": 6,
"rank": 6,
"lightcone": {
"id": 23038,
"rank": 5,
"level": 80,
"promotion": 6
},
"relics": [
"61241,15,1,4,9:3:3,11:2:2,12:2:2,2:2:2",
"61242,15,1,4,1:1:1,12:2:2,6:4:4,9:2:2",
"61243,15,5,4,6:3:3,1:2:2,7:3:3,11:1:1",
"61244,15,1,4,1:2:2,2:2:2,3:1:1,8:4:4",
"63195,15,1,4,8:3:3,3:2:2,2:2:2,11:2:2",
"63196,15,2,4,9:3:3,11:3:3,7:2:2,6:1:1"
],
"use_technique": false
},
{
"name": "Trailblazer",
"id": 8008, "id": 8008,
"hp": 100, "hp": 100,
"sp": 50, "sp": 50,
@ -153,23 +129,23 @@
"promotion": 6, "promotion": 6,
"rank": 6, "rank": 6,
"lightcone": { "lightcone": {
"id": 24005, "id": 23009,
"rank": 5, "rank": 2,
"level": 80, "level": 80,
"promotion": 6 "promotion": 6
}, },
"relics": [ "relics": [
"61231,15,1,4,6:2:2,3:1:1,7:3:3,11:3:3", "61241,15,1,4,8:2:2,6:2:2,4:2:2,2:3:3",
"61232,15,1,4,9:2:2,8:3:3,7:2:2,3:2:2", "61242,15,1,4,3:3:3,9:2:2,7:2:2,8:2:2",
"61233,15,5,4,5:2:2,7:3:3,4:3:3,8:1:1", "61243,15,5,4,6:2:2,4:2:2,12:1:1,2:4:4",
"61234,15,4,4,4:3:3,11:2:2,5:3:3,12:1:1", "61244,15,1,4,5:4:4,8:2:2,1:2:2,6:1:1",
"63185,15,6,4,7:2:2,11:3:3,6:3:3,2:1:1", "63195,15,1,4,9:2:2,2:1:1,8:1:1,11:5:5",
"63186,15,2,4,8:2:2,1:3:3,5:2:2,6:2:2" "63196,15,3,4,7:1:1,1:3:3,11:4:4,2:1:1"
], ],
"use_technique": false "use_technique": true
}, },
{ {
"name": "March 7th", "name": "Castorice",
"id": 1001, "id": 1001,
"hp": 100, "hp": 100,
"sp": 50, "sp": 50,
@ -177,44 +153,20 @@
"promotion": 6, "promotion": 6,
"rank": 6, "rank": 6,
"lightcone": { "lightcone": {
"id": 23023, "id": 23012,
"rank": 5, "rank": 2,
"level": 80, "level": 80,
"promotion": 6 "promotion": 6
}, },
"relics": [ "relics": [
"61031,15,1,4,8:2:2,2:2:2,5:2:2,7:3:3", "61241,15,1,4,8:2:2,6:2:2,4:2:2,2:3:3",
"61032,15,1,4,10:3:3,7:1:1,3:2:2,5:3:3", "61242,15,1,4,3:3:3,9:2:2,7:2:2,8:2:2",
"61033,15,5,4,6:3:3,8:3:3,11:1:1,4:2:2", "61243,15,5,4,6:2:2,4:2:2,12:1:1,2:4:4",
"61034,15,4,4,6:2:2,9:2:2,3:2:2,10:3:3", "61244,15,1,4,5:4:4,8:2:2,1:2:2,6:1:1",
"63085,15,6,4,5:1:1,4:3:3,7:4:4,6:1:1", "63195,15,1,4,9:2:2,2:1:1,8:1:1,11:5:5",
"63186,15,2,4,10:3:3,1:1:1,9:3:3,11:2:2" "63196,15,3,4,7:1:1,1:3:3,11:4:4,2:1:1"
], ],
"use_technique": false "use_technique": true
},
{
"name": "Aglaea",
"id": 1402,
"hp": 100,
"sp": 50,
"level": 80,
"promotion": 6,
"rank": 6,
"lightcone": {
"id": 23036,
"rank": 5,
"level": 80,
"promotion": 6
},
"relics": [
"61231,15,1,4,3:1:1,9:2:2,12:3:3,8:3:3",
"61232,15,1,4,12:3:3,4:2:2,3:2:2,11:2:2",
"61233,15,5,4,2:3:3,3:2:2,6:2:2,5:2:2",
"61234,15,4,4,6:1:1,2:2:2,4:3:3,3:3:3",
"63185,15,7,4,7:4:4,10:2:2,11:1:1,5:2:2",
"63186,15,4,4,8:4:4,3:1:1,1:2:2,9:2:2"
],
"use_technique": false
}, },
{ {
"name": "The Herta", "name": "The Herta",
@ -225,72 +177,24 @@
"promotion": 6, "promotion": 6,
"rank": 6, "rank": 6,
"lightcone": { "lightcone": {
"id": 23037, "id": 23013,
"rank": 5, "rank": 2,
"level": 80, "level": 80,
"promotion": 6 "promotion": 6
}, },
"relics": [ "relics": [
"61221,15,1,4,7:2:2,2:3:3,9:1:1,12:3:3", "61221,15,1,4,12:2:2,3:1:1,10:4:4,5:2:2",
"61222,15,1,4,11:2:2,5:2:2,1:2:2,10:3:3", "61222,15,1,4,3:4:4,4:1:1,10:3:3,8:1:1",
"61223,15,5,4,10:3:3,12:2:2,5:3:3,4:1:1", "61223,15,5,4,3:3:3,2:3:3,12:1:1,8:2:2",
"61224,15,4,4,5:2:2,2:1:1,6:3:3,3:3:3", "61224,15,4,4,6:3:3,2:1:1,12:3:3,8:2:2",
"63145,15,6,4,8:2:2,1:1:1,5:3:3,12:3:3", "63145,15,6,4,11:2:2,5:1:1,9:2:2,8:4:4",
"63146,15,4,4,11:2:2,8:2:2,1:3:3,9:2:2" "63146,15,4,4,6:3:3,10:1:1,12:4:4,11:1:1"
], ],
"use_technique": false "use_technique": true
}, },
{ {
"name": "Fugue", "name": "Aglaea",
"id": 1225, "id": 1402,
"hp": 100,
"sp": 50,
"level": 80,
"promotion": 6,
"rank": 6,
"lightcone": {
"id": 23035,
"rank": 5,
"level": 80,
"promotion": 6
},
"relics": [
"61191,15,1,4,11:3:3,12:1:1,4:3:3,7:2:2",
"61192,15,1,4,9:3:3,12:1:1,1:2:2,7:3:3",
"61193,15,7,4,5:2:2,1:3:3,9:2:2,7:2:2",
"61194,15,4,4,8:1:1,12:1:1,2:4:4,4:3:3",
"63165,15,2,4,12:2:2,6:2:2,2:1:1,7:4:4",
"63166,15,1,4,10:1:1,4:4:4,3:2:2,7:2:2"
],
"use_technique": false
},
{
"name": "Sunday",
"id": 1313,
"hp": 100,
"sp": 50,
"level": 80,
"promotion": 6,
"rank": 6,
"lightcone": {
"id": 23034,
"rank": 5,
"level": 80,
"promotion": 6
},
"relics": [
"61211,15,1,4,8:2:2,9:3:3,4:3:3,2:1:1",
"61212,15,1,4,9:3:3,4:3:3,7:2:2,8:1:1",
"61213,15,5,4,4:1:1,11:3:3,8:3:3,10:2:2",
"61214,15,4,4,12:3:3,10:3:3,1:2:2,8:1:1",
"63085,15,2,4,7:3:3,3:1:1,9:2:2,11:3:3",
"63086,15,2,4,9:1:1,12:3:3,4:2:2,8:3:3"
],
"use_technique": false
},
{
"name": "Rappa",
"id": 1317,
"hp": 100, "hp": 100,
"sp": 50, "sp": 50,
"level": 80, "level": 80,
@ -298,43 +202,43 @@
"rank": 6, "rank": 6,
"lightcone": { "lightcone": {
"id": 23033, "id": 23033,
"rank": 5, "rank": 2,
"level": 80, "level": 80,
"promotion": 6 "promotion": 6
}, },
"relics": [ "relics": [
"61191,15,1,4,12:1:1,3:3:3,6:4:4,7:1:1", "61221,15,1,4,12:2:2,3:1:1,10:4:4,5:2:2",
"61192,15,1,4,1:2:2,12:2:2,5:1:1,9:4:4", "61222,15,1,4,3:4:4,4:1:1,10:3:3,8:1:1",
"61193,15,2,4,7:2:2,2:3:3,6:2:2,1:2:2", "61223,15,5,4,3:3:3,2:3:3,12:1:1,8:2:2",
"61194,15,4,4,1:2:2,2:3:3,10:2:2,11:2:2", "61224,15,4,4,6:3:3,2:1:1,12:3:3,8:2:2",
"63165,15,2,4,1:2:2,2:1:1,12:4:4,4:2:2", "63145,15,6,4,11:2:2,5:1:1,9:2:2,8:4:4",
"63166,15,2,4,5:3:3,6:2:2,10:2:2,9:2:2" "63146,15,4,4,6:3:3,10:1:1,12:4:4,11:1:1"
], ],
"use_technique": false "use_technique": true
}, },
{ {
"name": "Lingsha", "name": "Yunli",
"id": 1222, "id": 1221,
"hp": 100, "hp": 100,
"sp": 50, "sp": 50,
"level": 80, "level": 80,
"promotion": 6, "promotion": 6,
"rank": 6, "rank": 6,
"lightcone": { "lightcone": {
"id": 23032, "id": 23018,
"rank": 5, "rank": 2,
"level": 80, "level": 80,
"promotion": 6 "promotion": 6
}, },
"relics": [ "relics": [
"61191,15,1,4,11:2:2,9:4:4,5:2:2,2:1:1", "61221,15,1,4,12:2:2,3:1:1,10:4:4,5:2:2",
"61192,15,1,4,7:1:1,1:4:4,6:3:3,3:1:1", "61222,15,1,4,3:4:4,4:1:1,10:3:3,8:1:1",
"61193,15,6,4,11:2:2,8:2:2,7:2:2,9:3:3", "61223,15,5,4,3:3:3,2:3:3,12:1:1,8:2:2",
"61194,15,4,4,6:1:1,1:3:3,8:2:2,12:3:3", "61224,15,4,4,6:3:3,2:1:1,12:3:3,8:2:2",
"63165,15,2,4,1:4:4,8:1:1,4:2:2,2:2:2", "63145,15,6,4,11:2:2,5:1:1,9:2:2,8:4:4",
"63166,15,2,4,12:3:3,10:3:3,9:2:2,8:1:1" "63146,15,4,4,6:3:3,10:1:1,12:4:4,11:1:1"
], ],
"use_technique": false "use_technique": true
} }
], ],
"battle_config": { "battle_config": {

View file

@ -5,7 +5,6 @@ const protocol = @import("protocol");
const Packet = @import("../Packet.zig"); const Packet = @import("../Packet.zig");
const Config = @import("../services/config.zig"); const Config = @import("../services/config.zig");
const Data = @import("../data.zig"); const Data = @import("../data.zig");
const LineupManager = @import("../manager/lineup_mgr.zig");
const ArrayList = std.ArrayList; const ArrayList = std.ArrayList;
const Allocator = std.mem.Allocator; const Allocator = std.mem.Allocator;
@ -177,11 +176,6 @@ pub fn onSyncMultiPath(session: *Session, _: []const u8, allocator: Allocator) E
counts[i] += 1; counts[i] += 1;
for (avatar_ids[i]) |id| { for (avatar_ids[i]) |id| {
if (avatar.id == id) { if (avatar.id == id) {
if (avatar.id >= 8001 and avatar.id <= 8008) {
LineupManager.mc_id = avatar.id;
} else {
LineupManager.m7_id = avatar.id;
}
multis[i].rank = avatar.rank; multis[i].rank = avatar.rank;
indexes[i] = max_avatar_list + 1 - counts[i]; indexes[i] = max_avatar_list + 1 - counts[i];
} }

View file

@ -259,18 +259,18 @@ pub const BattleManager = struct {
var avatarIndex: u32 = 0; var avatarIndex: u32 = 0;
var initial_mode = false; var initial_mode = false;
while (true) { while (true) {
if (!initial_mode) { for (config.avatar_config.items) |avatarConf| {
for (selectedAvatarID) |selected_id| { if (!initial_mode) {
for (config.avatar_config.items) |avatarConf| { if (!isInList(avatarConf.id, &selectedAvatarID)) {
if (avatarConf.id == selected_id) { continue;
const avatar = try createBattleAvatar(self.allocator, avatarConf);
try addTechniqueBuffs(self.allocator, &battle, avatar, avatarConf, avatarIndex);
try battle.pve_avatar_list.append(avatar);
avatarIndex += 1;
break;
}
} }
if (avatarIndex >= 4) break; }
const avatar = try createBattleAvatar(self.allocator, avatarConf);
try addTechniqueBuffs(self.allocator, &battle, avatar, avatarConf, avatarIndex);
try battle.pve_avatar_list.append(avatar);
avatarIndex += 1;
if (avatarIndex >= 4) {
break;
} }
} }
if (avatarIndex == 0 and !initial_mode) { if (avatarIndex == 0 and !initial_mode) {
@ -304,18 +304,18 @@ pub const ChallegeStageManager = struct {
var avatarIndex: u32 = 0; var avatarIndex: u32 = 0;
var initial_mode = false; var initial_mode = false;
while (true) { while (true) {
if (!initial_mode) { for (config.avatar_config.items) |avatarConf| {
for (selectedAvatarID) |selected_id| { if (!initial_mode) {
for (config.avatar_config.items) |avatarConf| { if (!isInList(avatarConf.id, &selectedAvatarID)) {
if (avatarConf.id == selected_id) { continue;
const avatar = try createBattleAvatar(self.allocator, avatarConf);
try addTechniqueBuffs(self.allocator, &battle, avatar, avatarConf, avatarIndex);
try battle.pve_avatar_list.append(avatar);
avatarIndex += 1;
break;
}
} }
if (avatarIndex >= 4) break; }
const avatar = try createBattleAvatar(self.allocator, avatarConf);
try addTechniqueBuffs(self.allocator, &battle, avatar, avatarConf, avatarIndex);
try battle.pve_avatar_list.append(avatar);
avatarIndex += 1;
if (avatarIndex >= 4) {
break;
} }
} }
if (avatarIndex == 0 and !initial_mode) { if (avatarIndex == 0 and !initial_mode) {

View file

@ -13,9 +13,6 @@ const ArrayList = std.ArrayList;
const Allocator = std.mem.Allocator; const Allocator = std.mem.Allocator;
const CmdID = protocol.CmdID; const CmdID = protocol.CmdID;
pub var mc_id: u32 = 8008;
pub var m7_id: u32 = 1001;
pub const LineupManager = struct { pub const LineupManager = struct {
allocator: std.mem.Allocator, allocator: std.mem.Allocator,
pub fn init(allocator: std.mem.Allocator) LineupManager { pub fn init(allocator: std.mem.Allocator) LineupManager {
@ -100,8 +97,7 @@ pub fn getSelectedAvatarID(allocator: std.mem.Allocator, input: []const u32) !vo
var i: usize = 0; var i: usize = 0;
while (i < BattleManager.selectedAvatarID.len and i < tempList.items.len) : (i += 1) { while (i < BattleManager.selectedAvatarID.len and i < tempList.items.len) : (i += 1) {
const id = if (tempList.items[i] == 8001) mc_id else if (tempList.items[i] == 1001) m7_id else tempList.items[i]; BattleManager.selectedAvatarID[i] = tempList.items[i];
BattleManager.selectedAvatarID[i] = id;
} }
while (i < BattleManager.selectedAvatarID.len) : (i += 1) { while (i < BattleManager.selectedAvatarID.len) : (i += 1) {
BattleManager.selectedAvatarID[i] = 0; BattleManager.selectedAvatarID[i] = 0;

View file

@ -4,7 +4,6 @@ const Session = @import("../Session.zig");
const Packet = @import("../Packet.zig"); const Packet = @import("../Packet.zig");
const Config = @import("../services/config.zig"); const Config = @import("../services/config.zig");
const Data = @import("../data.zig"); const Data = @import("../data.zig");
const LineupManager = @import("../manager/lineup_mgr.zig");
const ArrayList = std.ArrayList; const ArrayList = std.ArrayList;
const Allocator = std.mem.Allocator; const Allocator = std.mem.Allocator;
@ -47,11 +46,6 @@ pub const MultiPathManager = struct {
counts[i] += 1; counts[i] += 1;
for (avatar_ids[i]) |id| { for (avatar_ids[i]) |id| {
if (avatar.id == id) { if (avatar.id == id) {
if (avatar.id >= 8001 and avatar.id <= 8008) {
LineupManager.mc_id = avatar.id;
} else {
LineupManager.m7_id = avatar.id;
}
multis[i].rank = avatar.rank; multis[i].rank = avatar.rank;
indexes[i] = counts[i] - 1; indexes[i] = counts[i] - 1;
} }
@ -94,7 +88,7 @@ pub const MultiPathManager = struct {
try rsp.multi_path_avatar_info_list.appendSlice(&multis); try rsp.multi_path_avatar_info_list.appendSlice(&multis);
try rsp.basic_type_id_list.appendSlice(&Data.MultiAvatar); try rsp.basic_type_id_list.appendSlice(&Data.MultiAvatar);
try rsp.cur_multi_path_avatar_type_map.append(.{ .key = 1001, .value = .Mar_7thKnightType }); try rsp.cur_multi_path_avatar_type_map.append(.{ .key = 1001, .value = .Mar_7thKnightType });
try rsp.cur_multi_path_avatar_type_map.append(.{ .key = 8001, .value = .GirlWarriorType }); try rsp.cur_multi_path_avatar_type_map.append(.{ .key = 8001, .value = .GirlMemoryType });
rsp.retcode = 0; rsp.retcode = 0;
return rsp; return rsp;

View file

@ -73,7 +73,7 @@ pub const SceneManager = struct {
.entityCase_ = .{ .Prop = prop_info }, .entityCase_ = .{ .Prop = prop_info },
.GroupId = scene_group.group_id, .GroupId = scene_group.group_id,
.InstId = propConf.instId, .InstId = propConf.instId,
.EntityId = generator.nextId(), .EntityId = 0,
.Motion = .{ .Motion = .{
.pos = .{ .x = propConf.pos.x, .y = propConf.pos.y, .z = propConf.pos.z }, .pos = .{ .x = propConf.pos.x, .y = propConf.pos.y, .z = propConf.pos.z },
.rot = .{ .x = propConf.rot.x, .y = propConf.rot.y, .z = propConf.rot.z }, .rot = .{ .x = propConf.rot.x, .y = propConf.rot.y, .z = propConf.rot.z },

View file

@ -4,7 +4,6 @@ const Session = @import("../Session.zig");
const Packet = @import("../Packet.zig"); const Packet = @import("../Packet.zig");
const Config = @import("config.zig"); const Config = @import("config.zig");
const Data = @import("../data.zig"); const Data = @import("../data.zig");
const LineupManager = @import("../manager/lineup_mgr.zig");
const UidGenerator = @import("item.zig").UidGenerator; const UidGenerator = @import("item.zig").UidGenerator;
const ArrayList = std.ArrayList; const ArrayList = std.ArrayList;
@ -114,10 +113,8 @@ pub fn onSetAvatarPath(session: *Session, packet: *const Packet, allocator: Allo
rsp.avatar_id = req.avatar_id; rsp.avatar_id = req.avatar_id;
if (rsp.avatar_id == protocol.MultiPathAvatarType.Mar_7thKnightType) { if (rsp.avatar_id == protocol.MultiPathAvatarType.Mar_7thKnightType) {
m7th = false; m7th = false;
LineupManager.m7_id = 1001;
} else if (rsp.avatar_id == protocol.MultiPathAvatarType.Mar_7thRogueType) { } else if (rsp.avatar_id == protocol.MultiPathAvatarType.Mar_7thRogueType) {
m7th = true; m7th = true;
LineupManager.m7_id = 1224;
} else if (rsp.avatar_id == protocol.MultiPathAvatarType.BoyWarriorType) { } else if (rsp.avatar_id == protocol.MultiPathAvatarType.BoyWarriorType) {
mac = 1; mac = 1;
mg = false; mg = false;
@ -133,19 +130,15 @@ pub fn onSetAvatarPath(session: *Session, packet: *const Packet, allocator: Allo
} else if (rsp.avatar_id == protocol.MultiPathAvatarType.GirlWarriorType) { } else if (rsp.avatar_id == protocol.MultiPathAvatarType.GirlWarriorType) {
mac = 1; mac = 1;
mg = true; mg = true;
LineupManager.mc_id = 8002;
} else if (rsp.avatar_id == protocol.MultiPathAvatarType.GirlKnightType) { } else if (rsp.avatar_id == protocol.MultiPathAvatarType.GirlKnightType) {
mac = 2; mac = 2;
mg = true; mg = true;
LineupManager.mc_id = 8004;
} else if (rsp.avatar_id == protocol.MultiPathAvatarType.GirlShamanType) { } else if (rsp.avatar_id == protocol.MultiPathAvatarType.GirlShamanType) {
mac = 3; mac = 3;
mg = true; mg = true;
LineupManager.mc_id = 8006;
} else if (rsp.avatar_id == protocol.MultiPathAvatarType.GirlMemoryType) { } else if (rsp.avatar_id == protocol.MultiPathAvatarType.GirlMemoryType) {
mac = 4; mac = 4;
mg = true; mg = true;
LineupManager.mc_id = 8008;
} }
var sync = protocol.AvatarPathChangedNotify.init(allocator); var sync = protocol.AvatarPathChangedNotify.init(allocator);