Try / OpenGothic

Reimplementation of Gothic 2 Notr
MIT License
1.14k stars 80 forks source link

Issues with merchants after fighting them #345

Closed sirsteve1 closed 1 year ago

sirsteve1 commented 1 year ago

When fighting merchants, there seems to be some problems regarding both the looting inventory and the traders inventory after fighting them. I randomly received both the looting menu or the trading menu after fighting npcs and looting them. Yet when I fought merchants, mostly afterwards their trading menu is either empty or only the looting menu items are accessible. Thus the whole trading items are gone.

Example: I fought Constantino for getting his chest items for the thief guild. Afterwards I used the forget-spell for Ignaz onto Constantino. Constantinos trading inventory (when trading with him) then was empty.

System

Try commented 1 year ago

Hi, @sirsteve1 !

Constantinos trading inventory (when trading with him) then was empty.

This appears to be not a bug. In G2 script, when npc fall unconscious or dead follow routine gets called:

func void B_GiveTradeInv(var C_Npc slf)
{
...
    if(Npc_IsInState(slf,ZS_Dead) || Npc_IsInState(slf,ZS_Unconscious))
    {
        if(Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(Trd_Cronos_NW))
        {
            B_ClearDeadTrader(slf);
        };
                ...
                /* same copy-paste for other traders */

Same can be reproduced in vanilla(steam) version of the game: изображение