Commit Graph

132 Commits

Author SHA1 Message Date
Claude
7a7e63b40e Declare the parameter type enum where both packet structs see it
An enum which is declared inside a packet is generated as a nested type
of its struct. The ref struct of the same packet is generated into
another file and refers to the enum by its plain name, so it didn't
compile.

Declare it next to the other shared enums instead, which puts it into
the namespace - that's also where CharacterStatus lives, which is used
by a structure of another packet in the same way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MSpK6jkyF8ZS5nYXyGwYxA
(cherry picked from commit 33703647e97d9fb13680086d0366f8200fe2865a)
2026-07-27 01:14:05 +03:00
Claude
066894c4f6 Send the available chat commands to clients which can show them
Adds the server side of the chat command list: a view plugin which
sends one ChatCommandInfo per available command, and the handler for
the request of a client which supports it.

Both are limited to the extended protocol, so classic clients don't
receive messages they can't understand. The commands come from
GetAvailableChatCommandInfos, so a player only learns about the ones
he may execute, and deactivated ones stay out.

Executing a command needs nothing new: the client sends the composed
command line as an ordinary chat message, which the chat message
processor already routes to the command without broadcasting it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MSpK6jkyF8ZS5nYXyGwYxA
(cherry picked from commit f3a9cb132c295863942bb0f06f40cde231e57907)
2026-07-27 01:14:05 +03:00
Claude
4f83b72de8 Define the packets for the chat command list
Adds the two message definitions which let a client ask for the chat
commands of its player and receive them in a machine readable form:

- ChatCommandListRequest (C1, F5/00), sent by the client after it
  entered the game world.
- ChatCommandInfo (C2, F5/01), one message per available command. It
  carries the command, its localized name and description, the required
  character status and one entry per parameter with its name, short
  name, kind and accepted values.

F5 is unused in both directions and in the client, and F3 - the other
candidate - is character scoped, so it doesn't fit.

The generated code was produced with the same transformations the
project uses, so the diff only adds the new types and leaves the
existing ones untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MSpK6jkyF8ZS5nYXyGwYxA
(cherry picked from commit 2cd46516f6136cfc7f96f4d3b7db4c8329559d3a)
2026-07-27 01:14:05 +03:00
ze-dom
960664c1c3 Reverted parenthesis, updated update plugin date
(cherry picked from commit b7df2defd31d3ee5eeca13490fd47956f1c06bb4)
2026-07-27 01:03:46 +03:00
ze-dom
6d473a4cf6 Updated update plugin
(cherry picked from commit e56c5c57f02af48d2d8c324282398c06e4ff931d)
2026-07-27 01:03:46 +03:00
ze-dom
5e33f16cdd Fixed frustum dynamic projectile index
(cherry picked from commit 2b30d22c1f49ac3e8ec42815a48cef6fa646e119)
2026-07-27 01:03:46 +03:00
ze-dom
e3c2012ddb Updated updateplugin
(cherry picked from commit 681b0e70e2d22204adba493c0b38369994e8afcc)
2026-07-27 01:03:46 +03:00
ze-dom
ddc9482809 Fixed durations and extra projectiles logic
(cherry picked from commit 2f552938d7057b09210e8fc77ff641b304b7f3f7)
2026-07-27 01:03:45 +03:00
ze-dom
00be181d5c Improved plugin description
(cherry picked from commit 60fc09689d498c6d2fca94a0ef00bdbfa3027042)
2026-07-27 01:03:45 +03:00
ze-dom
b884474fa6 Added updateplugin
(cherry picked from commit daf72d784757ca60a05fc1c897f182a5b82f7665)
2026-07-27 01:03:45 +03:00
ze-dom
7166513681 Fixed elf master skill s and added extra projectile attribute
(cherry picked from commit 983db566e6ac315acdcda5d1ac35cdf12d49c8bf)
2026-07-27 01:02:02 +03:00
nolt
7325e1a1d6 Let strangers pick up party money and split it equally
Money has no owner - unlike a dropped item it can be picked up by anyone
standing on it. Deriving the drop's shares from the killer's party made a
stranger's pick up pay nothing and leave the money on the ground, destroying
zen that was previously taken and split by the picking party.

The recorded shares now apply only when the party picking the money up is the
one which earned it; otherwise there is no experience of theirs to follow and
the money is split equally between the picking party, as it was before and as
share-less money (e.g. from an item box) already is.

Covered by DroppedMoneyTest.StrangerPartySplitsPickedUpMoneyEquallyAsync and
EarningPartyReceivesMoneyByExperienceShareAsync.

(cherry picked from commit ae7cad81da6893cfbd1c28bb29811b7f0a10d540)
2026-07-27 00:54:17 +03:00
nolt
d7c589fc45 Keep a money basis for party members at max level without master quest
AwardExperienceAsync returned 0 for a character at the maximum level which has
not completed the master quest: it gains neither normal nor master experience.
Since the money of a kill is now derived from those returned values, such a
member got no zen at all in a party, while the same character still earns zen
when killing solo - AddExpAfterKillAsync returns the calculated amount there,
regardless of whether it could be applied.

The normal experience is now always calculated and returned, and only awarded
when the character can still gain it.

(cherry picked from commit 7cdb34b7c58f5924427b97ea17f26c3fe0f37719)
2026-07-27 00:54:16 +03:00
nolt
6307ecfc24 Derive each player's zen from the experience they actually gained
The money amount of a monster drop is computed as "gained experience + 7", but
in a party it was neither derived from, nor distributed like, that experience.

DistributeExperienceAfterKillAsync returned a party total without the game rate
and the personal experience rates, while AddExpAfterKillAsync returned a value
which had them applied. Both landed in the same variable in OnDeathAsync, so the
party number was orders of magnitude smaller. That mismatch was worked around by
recalculating the killer's solo experience for money purposes, which pinned the
party pool to a solo-sized amount: with the pool then split by member count, a
party of three received about a third of the solo zen each, while its experience
pool grows with the party size.

AwardExperienceAsync already computes the per member experience with all rates
applied, it just discarded it. It now returns that value, the distribution
returns the per member breakdown, and the money is split proportionally to it.
The workaround is gone, the pool follows the experience, and each member's zen
matches their own level, their own rates and their own master/normal branch. The
units lost to the integer division are handed to the shares which were cut the
most, one each, so no member is systematically favoured over many kills.

Two defects around the money rate are fixed on the way:

- MoneyAmountRate was applied for the killer when the drop was created and again
  for the receiver when a party picked it up, so a rate of 3.0 paid a party 9x.
  On the "money straight into the inventory" path for a solo killer it was not
  applied at all. It is now applied exactly once, for the receiver.
- ClampMoneyOnPickup was only honoured for solo pick ups. A party member at
  MaximumInventoryMoney silently lost their share, because the drop was consumed
  as soon as any other member could take one. The clamp now runs on the shared
  payout path, after the money rate, so it clamps the amount actually credited.

Money without a per player breakdown, such as the fixed amount of an item box,
keeps being split equally. Shares of players who are no longer eligible are
redistributed among the remaining ones instead of being lost.

(cherry picked from commit 53f25aca08e690255571f2bb6c796bb7c10934a2)
2026-07-27 00:54:16 +03:00
nolt
9e0bcede2f Cascade delete mini game ranking entries
A character which has participated in a mini game with enabled ranking
statistics could not be deleted. The database rejected it with

  Npgsql.PostgresException 23503: update or delete on table "Character"
  violates foreign key constraint "FK_MiniGameRankingEntry_Character_CharacterId"

MiniGameRankingEntry is a member of neither the character nor the mini game
definition aggregate, so the model generator doesn't emit a delete behavior
for its references. The entity was registered without any additional
configuration, so Entity Framework fell back to no action for these optional
relationships, which the database translates into a restricting foreign key.

Both references are now configured with a cascading delete, matching the
behavior of the other references to a character. With that, all seven
relationships pointing to Character delete their dependents.

This affects both deletion paths: the one of the player
(DeleteCharacterAction) and the one of an administrator, who can remove a
character from the account in the admin panel.

The cascade on the mini game definition is deliberate and part of the same
defect: deleting a definition in the admin panel ran into the very same
restriction. It does mean that the ranking history of a mini game is dropped
together with its definition.

Reported in issue 796.

(cherry picked from commit a391bdedbbd3a36ccb37124125bd7ede4f851dca)
2026-07-27 00:53:27 +03:00
Acentech Dev
d03518deac fix(heykel-savasi): allow /starths restart + accept unencrypted team-select
Some checks failed
.NET Core / build (push) Has been cancelled
Two TvT (Heykel Savasi) event fixes found during mobile+PC client work:

- PeriodicTaskBasePlugIn: a forced start (GM /starths) no longer blocked while a
  previous run's TaskDuration window is still open. When an event finished early
  (team won / empty / before the 20-min duration) players are warped out but the
  periodic state stayed Started with a future NextRunUtc, so the guard returned on
  every tick and a re-start only worked after the full duration or a server
  restart. Force-finish the stale run when _isStartForced so the same execution
  falls through and prepares a fresh one; the NextRunUtc wait now applies to
  scheduled runs only.

- HeykelSavasiTeamSelectHandlerPlugIn: IsEncryptionExpected => false. The AdaMu
  client sends client-to-server packets unencrypted (like walk / animation /
  talk-to-npc), so the server was dropping the team-select (JOIN) packet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-26 22:59:38 +03:00
sven-n
67cc57cf31 Merge pull request #840 from nolt/fix-admin-panel-account-search
Search accounts in the database instead of loading all of them

(cherry picked from commit 4e806cbe64f855a765e864c0c2ff45238f487e36)
2026-07-23 11:38:09 +03:00
sven-n
e910845383 Merge pull request #841 from nolt/bot-behaviour
Make the server-side bots hold up as a population

(cherry picked from commit 88535b63a958fee9803d5fc3a4bdac5a3318d221)
2026-07-23 11:38:09 +03:00
sven-n
eb4c05eda2 Merge pull request #839 from vanvonlj/upstream-pr/assume-externally-provisioned-database
Support externally-provisioned databases (opt-in, no drop/create)

(cherry picked from commit 2e117c26764483fb4ee3de9540c9bf7a647d8067)
2026-07-23 11:38:09 +03:00
sven-n
b854565586 Merge pull request #834 from eduardosmaniotto/bugfix/duplicate-rows
fix: duplicate rows in deserialized aggregate collections
(cherry picked from commit f95498770ea1af30530a164f868f571ec30052b5)
2026-07-23 11:38:09 +03:00
sven-n
0e2c94b84b Merge pull request #836 from nolt/speedhack-exempt-offline-players
Don't check offline players for speedhacking

(cherry picked from commit 6380b269770f0c949b03794ca701876c13636513)
2026-07-23 11:38:09 +03:00
sven-n
215f48bfc9 Merge pull request #837 from nolt/fix-money-drop-lock
Release a money drop again when nobody could take it

(cherry picked from commit 83e942e4c778a14eeade8433632a6180ef286e3f)
2026-07-23 11:38:09 +03:00
sven-n
0159849335 Merge pull request #838 from nolt/fix-bot-log-spam
Log the disabled auto-repair once per session

(cherry picked from commit 4636dfaf0832b1c06eee9a2bc4b3b624eb5985e9)
2026-07-23 11:38:09 +03:00
sven-n
93050d5276 Merge pull request #835 from nolt/fix-item-row-leak
Delete item rows when items leave the game

(cherry picked from commit c5eb47f03e726fc300fae352487622b79337911d)
2026-07-23 11:38:08 +03:00
sven-n
dee0e014b1 Merge pull request #832 from eduardosmaniotto/bugfix/pathfind-overflow
bugfix: IndexOutOfRangeException in pathfinding due to byte overflow
(cherry picked from commit 26fc908ba8fccae04c5f7bee0b9a5784d89ae830)
2026-07-23 11:38:08 +03:00
sven-n
54bdf901b8 Merge pull request #833 from eduardosmaniotto/bugfix/account-search
fix: account search typeahead not working
(cherry picked from commit 8f2b32d5d3654d7ef3f271ba3e6a2ad19a2ff212)
2026-07-23 11:38:08 +03:00
sven-n
d04cbecae3 Merge pull request #820 from nolt/feature-bots
(cherry picked from commit b10de0645a869485fbb5771a739abd06b5708c2d)
2026-07-23 11:38:08 +03:00
sven-n
8baf329654 Merge pull request #786 from ze-dom/DW_master_tree_finishup
(cherry picked from commit 06cc3489b92cc4b83a3a743ac9e29d00c144a303)
2026-07-23 11:38:08 +03:00
sven-n
30feae5a26 Merge pull request #819 from eduardosmaniotto/bugfix/merchant-and-loading
bugfix: standardize loading states and add save spinner to Create pages
(cherry picked from commit 7fb61714feea55d4c765b094c2e5f513ee5da3ba)
2026-07-23 11:37:22 +03:00
sven-n
d22ec20a04 Merge pull request #825 from eduardosmaniotto/feature/configurable-npc-buffs
feature: configurable npc buffs
(cherry picked from commit 6a061fcad756e644dadf3721e84e3cce2a25bceb)
2026-07-23 11:37:22 +03:00
sven-n
ed32ebdfd3 Merge pull request #827 from Rhefew/feature/ip-connection-limit
feat(plugins): implement customizable maximum concurrent connections

(cherry picked from commit 0e30df9ae22a265c3486dea1eba259567631eb87)
2026-07-23 11:35:43 +03:00
sven-n
77df5d1145 Merge pull request #828 from Rhefew/feature/admin-account-search
feat(admin): add account & character search to accounts page

(cherry picked from commit 75a435d7d3ac424f32a271c5275eac102881a80a)
2026-07-23 11:35:43 +03:00
sven-n
e9aec9540f Merge pull request #830 from valentinoConti/fix/modals-crashing-app
Fix modals making app crash

(cherry picked from commit 55ac67312448f4d851c44a1c77734703c9b1d3dd)
2026-07-23 11:35:43 +03:00
Acentech Dev
a76647265c docs(packets): add TvT scoreboard packet documentation
Some checks failed
.NET Core / build (push) Has been cancelled
2026-07-23 10:54:13 +03:00
Acentech Dev
107513aeb0 feat(tvt): scoreboard shows up to 10 players (was 8) 2026-07-21 22:42:25 +03:00
Acentech Dev
49ffa5bd89 fix(tvt): count event kills, respawn on the game's own map, end-ceremony countdown
- Kills now credited from OnDeathAsync (the AfterKilledPlayerAsync/PK path is skipped when
  AllowPlayerKilling is true, so event kills never reached the scoreboard).
- Respawn after death now stays on the mini-game's OWN map instance (older-client path fetched the
  shared world map of the same number -> respawned player saw no statues/participants).
- On game end: announce the winner + run a 60s ceremony broadcast loop sending phase-3 HUD countdown
  and the final scoreboard until the Lorencia teleport.
2026-07-21 16:57:12 +03:00
Acentech Dev
538189ea7c feat(tvt): per-character scoreboard (kills, statues, statue damage)
Server: new 0xFD HeykelSavasiScoreboard packet + view plugin; HeykelSavasiContext tracks per-player
kills (Player.AfterKilledPlayerAsync hook), statues broken (OnDestructibleDied), and statue damage
(AttackableNpcBase.AttackByAsync hook); broadcast top-8 by damage (desc) every ~1s, omitting zero-damage
characters.
2026-07-21 16:34:15 +03:00
Acentech Dev
586590e06f feat(tvt): test-phase statue HP override, stationary guards, in-game rename
- Statue HP overridden to 100k at spawn (MaximumHealthOverride) for the test phase - no DB change.
- Guards made fully stationary by overriding their definition's IntelligenceTypeName to
  NullMonsterIntelligence at runtime (no wander, no chase); no DB change.
- Statue/guard in-game names rebranded to 'TvT Statue' / 'TvT Guard' (runtime designation override).
2026-07-21 16:19:07 +03:00
Acentech Dev
a2119b272e feat(tvt): 4 arena bosses at 3 statues, robust guard/boss spawn, reliable GM restart, English strings
- Bosses: 306/309/357/459 spawn once at (55,42)/(32,42)/(31,59)/(56,58) after 3 total statues broken.
- Guards/bosses spawn in a walkable BOX (retry) instead of a fixed point; several statue-guard
  offsets landed on non-walkable terrain and silently failed, leaving statues unbreakable.
- Guard-alive gate uses the ACTUAL spawned count so a statue can always reach 0 -> breakable.
- HeykelSavasiStartPlugIn.OnStartedAsync force-disposes a lingering finished context so GM /starths
  restarts the event immediately (no server restart).
- Statue-break + join messages translated to English.
2026-07-21 15:40:45 +03:00
Acentech Dev
bd5cda12dd fix(minigame): GM ForceStart bypasses the previous-run TaskDuration guard
A forced start (e.g. /starths) was blocked for the whole TaskDuration after a
run even though the event had already ended, so re-starting needed a server
restart. ForceStart now skips the 'previous event still running' guard;
scheduled auto-starts still respect it.
2026-07-21 15:02:45 +03:00
Acentech Dev
0f9db37a92 feat(hs): all statues visible at fixed coords, guard-gated, any-order break with counter+killer message
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:54:43 +03:00
Acentech Dev
a76708c899 chore(hs): statue spawn coordinate message in English 2026-07-21 13:27:37 +03:00
Acentech Dev
ae68e15f77 feat(hs): announce statue spawn coordinates as yellow center message to event players 2026-07-21 13:25:02 +03:00
Acentech Dev
d41d46f24f chore(hs): rename event display name 'Heykel Savasi' -> 'TvT Event' (strings only)
Display strings/messages/designations changed everywhere (Name, entrance
messages, NPC designation, HUD title). Code identifiers/namespaces/commands
unchanged. DB rows updated separately.
2026-07-21 13:01:36 +03:00
Acentech Dev
7312b0e20d fix(minigame): announce entrance-opened for sub-minute registration windows
SendOpenedNotificationsAsync only looped per full minute, so a <1min entrance
(e.g. a 30s test window) sent no golden 'event opened' notification. Now sends
one up front when TotalMinutes==0. >=1min windows unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 12:55:00 +03:00
Acentech Dev
e45ad4f8d7 feat(hs): spawn statues+guards at random walkable spots (hunt-the-statue)
Instead of a fixed lane, each statue (and its 4 guards) now spawns at a random
walkable coordinate anywhere on the map; breaking one reveals the next at a new
random spot, so players must search for it. Falls back to the fixed positions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 12:35:17 +03:00
Acentech Dev
fcf2e80570 feat(hs): disable monster transform (EventFormSkin=0); team look via client cape override 2026-07-21 11:16:50 +03:00
Acentech Dev
1e8478fe70 feat(hs): raise statue HP, transform players in-battle, per-player team roster packet, drop wing-unequip
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 10:25:07 +03:00
Acentech Dev
7aae9dff0c feat(hs): disable wings in-event + periodic HUD-state packet/broadcast
- HeykelSavasiContext.IsItemAllowedToEquip disallows wings/capes during
  Playing only (so entry is never rejected for wearing wings); auto-unequips
  any equipped wing/cape into a free inventory slot in OnGameStartAsync.
- New S2C packet HeykelSavasiHudState (C1, code FB, length 11) carrying
  phase, team, counts, statue progress and remaining seconds, plus its view
  plugin/interface, broadcast once per second across registration/prep/
  battle and one-shot on join/statue-break/game-end.
2026-07-21 03:16:29 +03:00
Acentech Dev
5750ab6511 fix(hs): no PvP before battle + clean team assignment on leave
#1: block all player-vs-player damage while State != Playing (registration/
prep), keep same-team friendly-fire off during battle. Prevents pre-battle
kills (which also caused deaths to route to Lorencia instead of a base).
#3: remove a player from their team on OnObjectRemovedFromMapAsync (real
leave to another map), not on same-map death-respawn, so team counts stay
accurate and re-joining works.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 02:18:49 +03:00