Repository navigation
Conversation
The guard in hit() covers two different things: an attacker that has already been extracted, which is a real defect, and a victim that died earlier in the same pulse, which is an ordinary race in a group fight. The line said neither who nor with what, so every occurrence had to be dug out of the syslog by timestamp, and the louder case buried the other one: the two-hander swinging at a corpse produced ~2500 lines a day until #4242 and hid everything else. Append the attacker, the victim and the skill. Mobs are named "name #vnum"; the vnum is read only for NPCs, since GET_MOB_VNUM on a player indexes mob_index with a negative value. The head of the line is left byte for byte as it was, so existing log queries keep matching. No behaviour change: the early return stays exactly where it was. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Откуда это
Часовой дозор сислога, окно 22:24–23:24 МСК 23.11. Одна строка:
Чтобы понять, что произошло, пришлось поднимать окно лога по метке времени — в самой строке нет
ни кто бил, ни по кому, ни чем. Нашлось вот что (комната 80437, групповой бой):
«Приказ всем помочь» — несколько подручных бьют одну цель в одном пульсе. Первый удар убивает,
остальные замахи того же пульса приходят в уже удаленную жертву. Предохранитель срабатывает,
hit()возвращается, ничего не ломается. Это не ошибка, это обычная гонка группового боя.Почему строка важна и почему ее нельзя оставить как есть
Та же строка покрывает второй, совсем другой случай: удаленный бьющий. Вот он — настоящая
ошибка, кто-то держит указатель на мертвого. По прежнему тексту эти два случая отличались
единственным словом
purgedв одном из двух мест, а имен не было вовсе.И одно пряталось за другим. До #4242 замах двуручника по только что убитому давал под две с
половиной тысячи строк в сутки — в таком потоке первый случай увидеть нельзя. На боевом это
видно по числам:
victim = purged#4242 влит в 07:08 МСК, боевой поднят в 10:09 — и поток кончился. Осталась ровно та гонка, что
разобрана выше, с частотой одна строка за полсуток. На такой частоте строка работает как
сторожок: она и нашла двуручник. Глушить ее поэтому не надо — надо, чтобы она сама говорила, что
случилось.
Что сделано
К строке добавлены бьющий, жертва и умение. Моб пишется как
имя #внум; номер читается только уNPC —
GET_MOB_VNUMна игроке лезет вmob_indexпо отрицательному индексу (то жепредостережение уже стоит ниже в этом файле, в расчете предела damroll для поднятых).
Начало строки оставлено байт в байт:
SYSERROR: ch = %s, victim = %s, .... Уже настроенныевыборки по
victim = purgedи поSYSERRпродолжают совпадать — в том числе мой часовой дозор.Поведение не менялось: ранний возврат там же, где был.
Проверка
build_nounity(-Dunity=off,-Dbuild_tests=true): сборка без предупреждений, тесты933 / 930 passed / 3 skipped.
Юнит-теста нет намеренно: правка — текст диагностической строки, проверять в тесте нечего, а
условие срабатывания воспроизводится только гонкой в групповом бою.
🤖 Generated with Claude Code