mirror of
https://git.muiegratis.online/suikoakari/Campofinale
synced 2025-12-24 07:24:35 +01:00
levelscript starting
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
}
|
}
|
||||||
public class ServerOptions
|
public class ServerOptions
|
||||||
{
|
{
|
||||||
public int defaultSceneNumId = 98;
|
public int defaultSceneNumId = 87;
|
||||||
public int maxPlayers = 20;
|
public int maxPlayers = 20;
|
||||||
public CharactersOptions defaultCharacters = new();
|
public CharactersOptions defaultCharacters = new();
|
||||||
public ServerOptions()
|
public ServerOptions()
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
public static string GAME_VERSION = "0.5.28"; //CBT 2
|
public static string GAME_VERSION = "0.5.28"; //CBT 2
|
||||||
public static string
|
|
||||||
public static string GAME_VERSION_ASSET_URL = "https://beyond.hg-cdn.com/uXUuLlNbIYmMMTlN/0.5/update/6/1/Windows/0.5.28_U1mgxrslUitdn3hb/files";//CBT 2
|
public static string GAME_VERSION_ASSET_URL = "https://beyond.hg-cdn.com/uXUuLlNbIYmMMTlN/0.5/update/6/1/Windows/0.5.28_U1mgxrslUitdn3hb/files";//CBT 2
|
||||||
public static int MAX_TEAMS_NUMBER = 5; //Not used yet
|
public static int MAX_TEAMS_NUMBER = 5; //Not used yet
|
||||||
public static (long, string) SERVER_UID = (99, "99"); //Not used yet, no friend chat in current Beta
|
public static (long, string) SERVER_UID = (99, "99"); //Not used yet, no friend chat in current Beta
|
||||||
|
|||||||
@@ -12,11 +12,16 @@ namespace Campofinale.Packets.Cs
|
|||||||
{
|
{
|
||||||
public class HandleCsLogin
|
public class HandleCsLogin
|
||||||
{
|
{
|
||||||
[Server.Handler(CsMsgId.CsCreateRole)]
|
[Server.Handler(CsMsgId.CsSetGender)]
|
||||||
public static void HandleCsCreateRole(Player session, CsMsgId cmdId, Packet packet)
|
public static void HandleCsSetGender(Player session, CsMsgId cmdId, Packet packet)
|
||||||
{
|
{
|
||||||
CsCreateRole req = packet.DecodeBody<CsCreateRole>();
|
CsSetGender req = packet.DecodeBody<CsSetGender>();
|
||||||
|
ScSetGender rsp = new()
|
||||||
|
{
|
||||||
|
Gender = req.Gender,
|
||||||
|
};
|
||||||
|
session.gender = rsp.Gender;
|
||||||
|
session.Send(ScMsgId.ScSetGender, rsp);
|
||||||
|
|
||||||
}
|
}
|
||||||
[Server.Handler(CsMsgId.CsLogin)]
|
[Server.Handler(CsMsgId.CsLogin)]
|
||||||
@@ -121,65 +126,6 @@ namespace Campofinale.Packets.Cs
|
|||||||
session.Send(new PacketScItemBagScopeSync(session, ItemValuableDepotType.SpecialItem));
|
session.Send(new PacketScItemBagScopeSync(session, ItemValuableDepotType.SpecialItem));
|
||||||
session.Send(new PacketScSyncAllMail(session));
|
session.Send(new PacketScSyncAllMail(session));
|
||||||
session.Send(new PacketScSceneCollectionSync(session));
|
session.Send(new PacketScSceneCollectionSync(session));
|
||||||
/*ScSyncAllMission missions = new()
|
|
||||||
{
|
|
||||||
Missions =
|
|
||||||
{
|
|
||||||
{"e0m0",
|
|
||||||
new Mission()
|
|
||||||
{
|
|
||||||
MissionId="e0m0",
|
|
||||||
MissionState=(int)MissionState.Processing,
|
|
||||||
Properties =
|
|
||||||
{
|
|
||||||
{1,new DynamicParameter()
|
|
||||||
{
|
|
||||||
ValueType=1,
|
|
||||||
RealType=1,
|
|
||||||
ValueBoolList =
|
|
||||||
{
|
|
||||||
true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{2,new DynamicParameter()
|
|
||||||
{
|
|
||||||
ValueType=1,
|
|
||||||
RealType=1,
|
|
||||||
ValueBoolList =
|
|
||||||
{
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{3,new DynamicParameter()
|
|
||||||
{
|
|
||||||
ValueType=1,
|
|
||||||
RealType=1,
|
|
||||||
ValueBoolList =
|
|
||||||
{
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
TrackMissionId= "e0m0",
|
|
||||||
CurQuests =
|
|
||||||
{
|
|
||||||
{"e0m0#1", new Quest(){
|
|
||||||
QuestId="e0m0#1",
|
|
||||||
QuestState=2,
|
|
||||||
QuestObjectives =
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
}
|
|
||||||
};*/
|
|
||||||
//session.Send(ScMessageId.ScSyncAllMission, missions);
|
|
||||||
string json1 = File.ReadAllText("44_ScSyncAllMission.json");
|
string json1 = File.ReadAllText("44_ScSyncAllMission.json");
|
||||||
|
|
||||||
|
|
||||||
@@ -187,16 +133,12 @@ namespace Campofinale.Packets.Cs
|
|||||||
m.TrackMissionId = "";
|
m.TrackMissionId = "";
|
||||||
|
|
||||||
|
|
||||||
session.Send(ScMsgId.ScSyncAllMission, m);
|
//session.Send(ScMsgId.ScSyncAllMission, m);
|
||||||
/* session.Send(ScMsgId.ScSyncAllMission, new ScSyncAllMission()
|
session.Send(ScMsgId.ScSyncAllMission, new ScSyncAllMission()
|
||||||
{
|
{
|
||||||
NewMissionTags =
|
NewMissionTags =
|
||||||
{
|
{
|
||||||
new NewMissionTag()
|
|
||||||
{
|
|
||||||
MissionId="e0m0",
|
|
||||||
QuestId="e0m0_q#1",
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
Missions =
|
Missions =
|
||||||
@@ -214,7 +156,7 @@ namespace Campofinale.Packets.Cs
|
|||||||
ValueType=1,
|
ValueType=1,
|
||||||
ValueBoolList =
|
ValueBoolList =
|
||||||
{
|
{
|
||||||
true
|
false
|
||||||
}
|
}
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
@@ -224,6 +166,7 @@ namespace Campofinale.Packets.Cs
|
|||||||
|
|
||||||
CurQuests =
|
CurQuests =
|
||||||
{
|
{
|
||||||
|
|
||||||
{"e0m0_q#1", new Quest()
|
{"e0m0_q#1", new Quest()
|
||||||
{
|
{
|
||||||
QuestId="e0m0_q#1",
|
QuestId="e0m0_q#1",
|
||||||
@@ -239,7 +182,7 @@ namespace Campofinale.Packets.Cs
|
|||||||
}
|
}
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
});*/
|
});
|
||||||
|
|
||||||
session.Send(new PacketScGachaSync(session));
|
session.Send(new PacketScGachaSync(session));
|
||||||
ScSettlementSyncAll settlements = new ScSettlementSyncAll()
|
ScSettlementSyncAll settlements = new ScSettlementSyncAll()
|
||||||
|
|||||||
53
Campofinale/Packets/Cs/HandleCsSceneSetLevelScriptActive.cs
Normal file
53
Campofinale/Packets/Cs/HandleCsSceneSetLevelScriptActive.cs
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
using Campofinale.Game.Character;
|
||||||
|
using Campofinale.Game.Entities;
|
||||||
|
using Campofinale.Network;
|
||||||
|
using Campofinale.Protocol;
|
||||||
|
|
||||||
|
namespace Campofinale.Packets.Cs
|
||||||
|
{
|
||||||
|
public class HandleCsSceneSetLevelScriptActive
|
||||||
|
{
|
||||||
|
[Server.Handler(CsMsgId.CsSceneSetLevelScriptActive)]
|
||||||
|
public static void Handle(Player session, CsMsgId cmdId, Packet packet)
|
||||||
|
{
|
||||||
|
CsSceneSetLevelScriptActive req = packet.DecodeBody<CsSceneSetLevelScriptActive>();
|
||||||
|
|
||||||
|
ScSceneLevelScriptStateNotify rsp = new ScSceneLevelScriptStateNotify()
|
||||||
|
{
|
||||||
|
SceneNumId = req.SceneNumId,
|
||||||
|
ScriptId = req.ScriptId,
|
||||||
|
State = 3
|
||||||
|
};
|
||||||
|
session.Send(ScMsgId.ScSceneLevelScriptStateNotify, rsp);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[Server.Handler(CsMsgId.CsSceneSetLevelScriptStart)]
|
||||||
|
public static void HandleCsSceneSetLevelScriptStart(Player session, CsMsgId cmdId, Packet packet)
|
||||||
|
{
|
||||||
|
CsSceneSetLevelScriptStart req = packet.DecodeBody<CsSceneSetLevelScriptStart>();
|
||||||
|
ScSceneLevelScriptStateNotify rsp = new ScSceneLevelScriptStateNotify()
|
||||||
|
{
|
||||||
|
SceneNumId = req.SceneNumId,
|
||||||
|
ScriptId = req.ScriptId,
|
||||||
|
State = 4
|
||||||
|
};
|
||||||
|
session.Send(ScMsgId.ScSceneLevelScriptStateNotify, rsp);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[Server.Handler(CsMsgId.CsSceneLevelScriptEventTrigger)]
|
||||||
|
public static void HandleCsSceneLevelScriptEventTrigger(Player session, CsMsgId cmdId, Packet packet)
|
||||||
|
{
|
||||||
|
CsSceneLevelScriptEventTrigger req = packet.DecodeBody<CsSceneLevelScriptEventTrigger>();
|
||||||
|
|
||||||
|
ScSceneLevelScriptEventTrigger rsp = new ScSceneLevelScriptEventTrigger()
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
session.Send(ScMsgId.ScSceneLevelScriptEventTrigger, rsp,packet.csHead.UpSeqid);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -66,12 +66,13 @@ namespace Campofinale.Packets.Sc
|
|||||||
{
|
{
|
||||||
ScriptId = l.scriptId,
|
ScriptId = l.scriptId,
|
||||||
IsDone = false,
|
IsDone = false,
|
||||||
State = 1,
|
State = 2,
|
||||||
|
|
||||||
};
|
};
|
||||||
int i = 0;
|
int i = 0;
|
||||||
foreach (var item in l.properties)
|
foreach (var item in l.properties)
|
||||||
{
|
{
|
||||||
|
|
||||||
DynamicParameter p=item.ToProto();
|
DynamicParameter p=item.ToProto();
|
||||||
if (p != null)
|
if (p != null)
|
||||||
script.Properties.Add(l.GetPropertyId(item.key,script.Properties.Keys.ToList()), p);
|
script.Properties.Add(l.GetPropertyId(item.key,script.Properties.Keys.ToList()), p);
|
||||||
|
|||||||
@@ -12,13 +12,12 @@ namespace Campofinale.Packets.Sc
|
|||||||
{
|
{
|
||||||
Roleid = client.roleId,
|
Roleid = client.roleId,
|
||||||
Level = client.level,
|
Level = client.level,
|
||||||
Exp=client.xp,
|
Exp = client.xp,
|
||||||
RoleName = client.nickname,
|
RoleName = client.nickname,
|
||||||
Gender = client.gender,
|
Gender = client.gender,
|
||||||
ShortId="1",
|
ShortId = "1",
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SetData(ScMsgId.ScSyncBaseData, proto);
|
SetData(ScMsgId.ScSyncBaseData, proto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user