fix(npc): wandering merchant Zyro proper model + allow interactions#310
fix(npc): wandering merchant Zyro proper model + allow interactions#310olisikh wants to merge 1 commit intosven-n:mainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the NPC initialization logic to correctly map the Wandering Merchant Zyro to the intended merchant model, preventing the use of an incorrect fallback model. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
The Merchant is showing, however he is not interactive, so something else is missing. |
|
Merchant Zyro is now shown with a proper model (same as Merchant Moss in Elbeland), he can be interacted with, but I'm not sure if interactions are as expected. Well at least he's not showing as a bull anymore :D Thanks @jkok25 for the hint! |
2e94317 to
2d3bde0
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors the monster and NPC classification logic into a centralized DetermineMonsterObjectKind function and introduces the MONSTER_WANDERING_MERCHANT_ZYRO NPC. Review feedback highlights that the manual assignment of the NPC name is redundant and should be handled via data files for better localization. Additionally, it is recommended to move the modification of global model action speeds out of the character creation logic to prevent unintended side effects on other NPC instances.
| case MONSTER_WANDERING_MERCHANT_ZYRO: | ||
| OpenNpc(MODEL_GAMBLE_NPC_MOSS); | ||
| c = CreateCharacter(Key, MODEL_GAMBLE_NPC_MOSS, PositionX, PositionY); | ||
| wcscpy(c->ID, L"떠돌이 상인"); |
There was a problem hiding this comment.
The manual assignment of the NPC name using wcscpy is redundant. Setting_Monster is called at the end of CreateMonster (line 14811), which automatically populates c->ID from the MonsterScript data. Removing this hardcoded string ensures that the name is managed consistently through data files and supports localization.
| for (int i = 0; i < 6; i++) | ||
| { | ||
| Models[MODEL_GAMBLE_NPC_MOSS].Actions[i].PlaySpeed = 0.33f; | ||
| } |
There was a problem hiding this comment.
Modifying the PlaySpeed of global model actions within CreateMonster is inefficient and creates side effects. Since Models is a global array, this change affects every instance using MODEL_GAMBLE_NPC_MOSS (including other NPC types like MONSTER_MOSS_THE_MERCHANT). This initialization should ideally be performed once when the model is loaded or during a central initialization phase, rather than every time an instance is created.

Uses proper model for Wandering Merchant Zyro instead of falling back to a non-interactive Bull model.