Drops now land on the ground as gadgets and are picked up with F instead of appearing in the bag out of nowhere. Chests, ore, crystals and plants all spawn and can be interacted with. Monsters load by scene group rather than by a radius around each one, so a camp shows up as a camp and nothing pops into existence mid fight. The group anchors come out of the scene Lua, which also killed four invented tuning constants. The gateway was creating a whole new session for every handshake datagram, and the client retransmits those until it gets an answer. That is where the piles of duplicated monsters and the chests coming back from the dead were coming from. Also: monster level scales to the party now, path queries return an actual two point path instead of an empty one, NpcTalk closes properly, and the ability and combat invocations are no longer echoed back to the client that sent them.
36 lines
1.3 KiB
C#
36 lines
1.3 KiB
C#
using Yuanshen.Gameserver.Controllers.Attributes;
|
|
using Yuanshen.Gameserver.Controllers.Result;
|
|
using Yuanshen.Gameserver.Game;
|
|
using Yuanshen.Protocol;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace Yuanshen.Gameserver.Controllers;
|
|
|
|
[NetController]
|
|
internal sealed class AbilityController : ControllerBase
|
|
{
|
|
[NetCommand(CmdType.AbilityInvocationsNotify)]
|
|
public ValueTask<IResult> OnAbilityInvocationsNotify() => ValueTask.FromResult(Ok());
|
|
|
|
[NetCommand(CmdType.ClientAbilityChangeNotify)]
|
|
public ValueTask<IResult> OnClientAbilityChangeNotify() => ValueTask.FromResult(Ok());
|
|
|
|
[NetCommand(CmdType.ClientAbilityInitFinishNotify)]
|
|
public async ValueTask<IResult> OnClientAbilityInitFinishNotify(Player player, SceneManager scene)
|
|
{
|
|
ClientAbilityInitFinishNotify notify = Packet!.DecodeBody<ClientAbilityInitFinishNotify>();
|
|
|
|
GameMonster? monster = player.Monsters.FirstOrDefault(candidate => candidate.EntityId == notify.EntityId);
|
|
if (monster is not null)
|
|
await scene.SyncMonsterLevelAsync(monster);
|
|
|
|
return Ok();
|
|
}
|
|
|
|
[NetCommand(CmdType.EvtDoSkillSuccNotify)]
|
|
public ValueTask<IResult> OnEvtDoSkillSuccNotify(ILogger<AbilityController> logger)
|
|
{
|
|
logger.LogDebug("DoSkillSucc raw={body}", Convert.ToHexString(Packet!.Body.Span));
|
|
return ValueTask.FromResult(Ok());
|
|
}
|
|
}
|