-
Notifications
You must be signed in to change notification settings - Fork 83
Fix: Small Fixes for June #1091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
56962d9
9fd49a3
654992a
c6939a8
071f2df
35b8b3d
be209a2
91dbdb0
bd6238c
dbd1254
5fc5505
4eac40f
831f328
48a4364
442024a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,6 +71,18 @@ public override S2CInstanceGetGatheringItemListRes Handle(GameClient client, C2S | |
| client.Enqueue(ntc, queue); | ||
| } | ||
| } | ||
|
|
||
| uint stageNo = StageManager.ConvertIdToStageNo(request.LayoutId.AsStageLayoutId()); | ||
| if (Server.AssetRepository.GatheringSpotInfoAsset.GatheringInfoMap.TryGetValue(stageNo, out var spots) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there not a better way to do this? This looks awful.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could adjust the |
||
| && spots.TryGetValue((request.LayoutId.AsStageLayoutId().GroupId, request.PosId), out var spotInfo)) | ||
| { | ||
| if (spotInfo.GatheringType is GatheringType.OM_GATHER_GRASS | ||
| or GatheringType.OM_GATHER_FLOWER | ||
| or GatheringType.OM_GATHER_MUSHROOM) | ||
| { | ||
| queue.AddRange(Server.AchievementManager.HandleCollect(client, AchievementCollectParam.Herb, connection)); | ||
| } | ||
| } | ||
| }); | ||
|
|
||
| queue.Send(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| using Arrowgene.Ddon.GameServer.Handler; | ||
| using System.Collections.Generic; | ||
|
|
||
| public class ChatCommand : IChatCommand | ||
| { | ||
| public override AccountStateType AccountState => AccountStateType.User; | ||
| public override string CommandName => "affection"; | ||
| public override string HelpText => "usage: `/affection` - Check pawn affection."; | ||
|
|
||
| public override void Execute(DdonGameServer server, string[] command, GameClient client, ChatMessage message, List<ChatResponse> responses) | ||
| { | ||
| List<string> strings = []; | ||
| foreach (var pawn in client.Character.Pawns) | ||
| { | ||
| int level = (int)pawn.PartnerPawnData.CalculateLikability(); | ||
|
|
||
| strings.Add($"{pawn.Name}{(client.Character.PartnerPawnId == pawn.PawnId ? " *" : " ")}"); | ||
| strings.Add($" Affection: {level} / {PartnerPawnData.MaxLevel}"); | ||
| strings.Add($" Progress: {pawn.PartnerPawnData.CalculateLikabilityXP()} / {PartnerPawnData.LikabilityCurve.ElementAtOrDefault(level+1)}"); | ||
| strings.Add($" "); | ||
| } | ||
|
|
||
| client.Send(new S2CConnectionInformationNtc(strings)); | ||
| } | ||
| } | ||
|
|
||
| return new ChatCommand(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| using Arrowgene.Ddon.GameServer.Handler; | ||
| using System.Collections.Generic; | ||
| using System.Globalization; | ||
|
|
||
| public class ChatCommand : IChatCommand | ||
| { | ||
| public override AccountStateType AccountState => AccountStateType.User; | ||
| public override string CommandName => "wallet"; | ||
| public override string HelpText => "usage: `/wallet` - Check hidden wallet amounts."; | ||
|
|
||
| public override void Execute(DdonGameServer server, string[] command, GameClient client, ChatMessage message, List<ChatResponse> responses) | ||
| { | ||
| S2CConnectionInformationNtc ntc = new(client.Character.WalletPointList.Select(x => $"{x.Type} : {x.Value.ToString("N0", CultureInfo.InvariantCulture)} / {server.GameSettings.GameServerSettings.WalletLimits.GetValueOrDefault(x.Type).ToString("N0", CultureInfo.InvariantCulture)}")); | ||
| client.Send(ntc); | ||
| } | ||
| } | ||
|
|
||
| return new ChatCommand(); |
Uh oh!
There was an error while loading. Please reload this page.